From edb35d95d1ffa14fca9dfdb97d30cc0f834155ba Mon Sep 17 00:00:00 2001 From: Eugene Zelenko Date: Sat, 24 Oct 2015 01:08:35 +0000 Subject: Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. llvm-svn: 251167 --- .../Plugins/Process/gdb-remote/ProcessGDBRemote.h | 111 ++++++++++----------- 1 file changed, 53 insertions(+), 58 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h') diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h index c3b201bddeb..0a0f32e69be 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -11,12 +11,14 @@ #define liblldb_ProcessGDBRemote_h_ // C Includes - // C++ Includes -#include +#include +#include +#include #include // Other libraries and framework includes +// Project includes #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Broadcaster.h" #include "lldb/Core/ConstString.h" @@ -42,9 +44,10 @@ class ThreadGDBRemote; class ProcessGDBRemote : public Process { public: - //------------------------------------------------------------------ - // Constructors and Destructors - //------------------------------------------------------------------ + ProcessGDBRemote(lldb::TargetSP target_sp, Listener &listener); + + ~ProcessGDBRemote() override; + static lldb::ProcessSP CreateInstance (lldb::TargetSP target_sp, Listener &listener, @@ -65,14 +68,6 @@ public: static const char * GetPluginDescriptionStatic(); - //------------------------------------------------------------------ - // Constructors and Destructors - //------------------------------------------------------------------ - ProcessGDBRemote(lldb::TargetSP target_sp, Listener &listener); - - virtual - ~ProcessGDBRemote(); - //------------------------------------------------------------------ // Check if a given Process //------------------------------------------------------------------ @@ -263,20 +258,62 @@ protected: class GDBLoadedModuleInfoList; + //------------------------------------------------------------------ + /// Broadcaster event bits definitions. + //------------------------------------------------------------------ + enum + { + eBroadcastBitAsyncContinue = (1 << 0), + eBroadcastBitAsyncThreadShouldExit = (1 << 1), + eBroadcastBitAsyncThreadDidExit = (1 << 2) + }; + + Flags m_flags; // Process specific flags (see eFlags enums) + GDBRemoteCommunicationClient m_gdb_comm; + std::atomic m_debugserver_pid; + std::vector m_stop_packet_stack; // The stop packet stack replaces the last stop packet variable + Mutex m_last_stop_packet_mutex; + GDBRemoteDynamicRegisterInfo m_register_info; + Broadcaster m_async_broadcaster; + Listener m_async_listener; + HostThread m_async_thread; + Mutex m_async_thread_state_mutex; + typedef std::vector tid_collection; + typedef std::vector< std::pair > tid_sig_collection; + typedef std::map MMapMap; + typedef std::map ExpeditedRegisterMap; + tid_collection m_thread_ids; // Thread IDs for all threads. This list gets updated after stopping + StructuredData::ObjectSP m_jstopinfo_sp; // Stop info only for any threads that have valid stop infos + StructuredData::ObjectSP m_jthreadsinfo_sp; // Full stop info, expedited registers and memory for all threads if "jThreadsInfo" packet is supported + tid_collection m_continue_c_tids; // 'c' for continue + tid_sig_collection m_continue_C_tids; // 'C' for continue with signal + tid_collection m_continue_s_tids; // 's' for step + tid_sig_collection m_continue_S_tids; // 'S' for step with signal + uint64_t m_max_memory_size; // The maximum number of bytes to read/write when reading and writing memory + uint64_t m_remote_stub_max_memory_size; // The maximum memory size the remote gdb stub can handle + MMapMap m_addr_to_mmap_size; + lldb::BreakpointSP m_thread_create_bp_sp; + bool m_waiting_for_attach; + bool m_destroy_tried_resuming; + lldb::CommandObjectSP m_command_sp; + int64_t m_breakpoint_pc_offset; + lldb::tid_t m_initial_tid; // The initial thread ID, given by stub on attach + //---------------------------------------------------------------------- // Accessors //---------------------------------------------------------------------- bool IsRunning ( lldb::StateType state ) { - return state == lldb::eStateRunning || IsStepping(state); + return state == lldb::eStateRunning || IsStepping(state); } bool IsStepping ( lldb::StateType state) { - return state == lldb::eStateStepping; + return state == lldb::eStateStepping; } + bool CanResume ( lldb::StateType state) { @@ -341,47 +378,6 @@ protected: size_t UpdateThreadIDsFromStopReplyThreadsValue (std::string &value); - //------------------------------------------------------------------ - /// Broadcaster event bits definitions. - //------------------------------------------------------------------ - enum - { - eBroadcastBitAsyncContinue = (1 << 0), - eBroadcastBitAsyncThreadShouldExit = (1 << 1), - eBroadcastBitAsyncThreadDidExit = (1 << 2) - }; - - Flags m_flags; // Process specific flags (see eFlags enums) - GDBRemoteCommunicationClient m_gdb_comm; - std::atomic m_debugserver_pid; - std::vector m_stop_packet_stack; // The stop packet stack replaces the last stop packet variable - Mutex m_last_stop_packet_mutex; - GDBRemoteDynamicRegisterInfo m_register_info; - Broadcaster m_async_broadcaster; - Listener m_async_listener; - HostThread m_async_thread; - Mutex m_async_thread_state_mutex; - typedef std::vector tid_collection; - typedef std::vector< std::pair > tid_sig_collection; - typedef std::map MMapMap; - typedef std::map ExpeditedRegisterMap; - tid_collection m_thread_ids; // Thread IDs for all threads. This list gets updated after stopping - StructuredData::ObjectSP m_jstopinfo_sp; // Stop info only for any threads that have valid stop infos - StructuredData::ObjectSP m_jthreadsinfo_sp; // Full stop info, expedited registers and memory for all threads if "jThreadsInfo" packet is supported - tid_collection m_continue_c_tids; // 'c' for continue - tid_sig_collection m_continue_C_tids; // 'C' for continue with signal - tid_collection m_continue_s_tids; // 's' for step - tid_sig_collection m_continue_S_tids; // 'S' for step with signal - uint64_t m_max_memory_size; // The maximum number of bytes to read/write when reading and writing memory - uint64_t m_remote_stub_max_memory_size; // The maximum memory size the remote gdb stub can handle - MMapMap m_addr_to_mmap_size; - lldb::BreakpointSP m_thread_create_bp_sp; - bool m_waiting_for_attach; - bool m_destroy_tried_resuming; - lldb::CommandObjectSP m_command_sp; - int64_t m_breakpoint_pc_offset; - lldb::tid_t m_initial_tid; // The initial thread ID, given by stub on attach - bool HandleNotifyPacket(StringExtractorGDBRemote &packet); @@ -469,10 +465,9 @@ private: lldb::user_id_t break_loc_id); DISALLOW_COPY_AND_ASSIGN (ProcessGDBRemote); - }; } // namespace process_gdb_remote } // namespace lldb_private -#endif // liblldb_ProcessGDBRemote_h_ +#endif // liblldb_ProcessGDBRemote_h_ -- cgit v1.2.3