From b9c1b51e45b845debb76d8658edabca70ca56079 Mon Sep 17 00:00:00 2001 From: Kate Stone Date: Tue, 6 Sep 2016 20:57:50 +0000 Subject: =?UTF-8?q?***=20This=20commit=20represents=20a=20complete=20refor?= =?UTF-8?q?matting=20of=20the=20LLDB=20source=20code=20***=20to=20conform?= =?UTF-8?q?=20to=20clang-format=E2=80=99s=20LLVM=20style.=20=20This=20kind?= =?UTF-8?q?=20of=20mass=20change=20has=20***=20two=20obvious=20implication?= =?UTF-8?q?s:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751 --- .../Plugins/Process/gdb-remote/ProcessGDBRemote.h | 774 +++++++++------------ 1 file changed, 336 insertions(+), 438 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 3a0dd2f..f2a58db 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -24,16 +24,16 @@ #include "lldb/Core/Broadcaster.h" #include "lldb/Core/ConstString.h" #include "lldb/Core/Error.h" +#include "lldb/Core/LoadedModuleInfoList.h" #include "lldb/Core/StreamString.h" #include "lldb/Core/StringList.h" #include "lldb/Core/StructuredData.h" #include "lldb/Core/ThreadSafeValue.h" -#include "lldb/Core/LoadedModuleInfoList.h" #include "lldb/Host/HostThread.h" -#include "lldb/lldb-private-forward.h" -#include "lldb/Utility/StringExtractor.h" #include "lldb/Target/Process.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/StringExtractor.h" +#include "lldb/lldb-private-forward.h" #include "GDBRemoteCommunicationClient.h" #include "GDBRemoteRegisterContext.h" @@ -43,478 +43,376 @@ namespace process_gdb_remote { class ThreadGDBRemote; -class ProcessGDBRemote : public Process, private GDBRemoteClientBase::ContinueDelegate -{ +class ProcessGDBRemote : public Process, + private GDBRemoteClientBase::ContinueDelegate { public: - ProcessGDBRemote(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp); + ProcessGDBRemote(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp); + + ~ProcessGDBRemote() override; + + static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, + lldb::ListenerSP listener_sp, + const FileSpec *crash_file_path); + + static void Initialize(); + + static void DebuggerInitialize(Debugger &debugger); + + static void Terminate(); + + static ConstString GetPluginNameStatic(); + + static const char *GetPluginDescriptionStatic(); + + //------------------------------------------------------------------ + // Check if a given Process + //------------------------------------------------------------------ + bool CanDebug(lldb::TargetSP target_sp, + bool plugin_specified_by_name) override; + + CommandObject *GetPluginCommandObject() override; + + //------------------------------------------------------------------ + // Creating a new process, or attaching to an existing one + //------------------------------------------------------------------ + Error WillLaunch(Module *module) override; + + Error DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override; + + void DidLaunch() override; + + Error WillAttachToProcessWithID(lldb::pid_t pid) override; + + Error WillAttachToProcessWithName(const char *process_name, + bool wait_for_launch) override; + + Error DoConnectRemote(Stream *strm, const char *remote_url) override; + + Error WillLaunchOrAttach(); + + Error DoAttachToProcessWithID(lldb::pid_t pid, + const ProcessAttachInfo &attach_info) override; + + Error + DoAttachToProcessWithName(const char *process_name, + const ProcessAttachInfo &attach_info) override; + + void DidAttach(ArchSpec &process_arch) override; + + //------------------------------------------------------------------ + // PluginInterface protocol + //------------------------------------------------------------------ + ConstString GetPluginName() override; + + uint32_t GetPluginVersion() override; + + //------------------------------------------------------------------ + // Process Control + //------------------------------------------------------------------ + Error WillResume() override; + + Error DoResume() override; + + Error DoHalt(bool &caused_stop) override; + + Error DoDetach(bool keep_stopped) override; + + bool DetachRequiresHalt() override { return true; } + + Error DoSignal(int signal) override; + + Error DoDestroy() override; + + void RefreshStateAfterStop() override; + + void SetUnixSignals(const lldb::UnixSignalsSP &signals_sp); + + //------------------------------------------------------------------ + // Process Queries + //------------------------------------------------------------------ + bool IsAlive() override; + + lldb::addr_t GetImageInfoAddress() override; + + void WillPublicStop() override; + + //------------------------------------------------------------------ + // Process Memory + //------------------------------------------------------------------ + size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size, + Error &error) override; - ~ProcessGDBRemote() override; + size_t DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size, + Error &error) override; - static lldb::ProcessSP - CreateInstance (lldb::TargetSP target_sp, - lldb::ListenerSP listener_sp, - const FileSpec *crash_file_path); + lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions, + Error &error) override; - static void - Initialize(); + Error GetMemoryRegionInfo(lldb::addr_t load_addr, + MemoryRegionInfo ®ion_info) override; - static void - DebuggerInitialize (Debugger &debugger); + Error DoDeallocateMemory(lldb::addr_t ptr) override; - static void - Terminate(); + //------------------------------------------------------------------ + // Process STDIO + //------------------------------------------------------------------ + size_t PutSTDIN(const char *buf, size_t buf_size, Error &error) override; - static ConstString - GetPluginNameStatic(); + //---------------------------------------------------------------------- + // Process Breakpoints + //---------------------------------------------------------------------- + Error EnableBreakpointSite(BreakpointSite *bp_site) override; - static const char * - GetPluginDescriptionStatic(); + Error DisableBreakpointSite(BreakpointSite *bp_site) override; - //------------------------------------------------------------------ - // Check if a given Process - //------------------------------------------------------------------ - bool - CanDebug (lldb::TargetSP target_sp, bool plugin_specified_by_name) override; + //---------------------------------------------------------------------- + // Process Watchpoints + //---------------------------------------------------------------------- + Error EnableWatchpoint(Watchpoint *wp, bool notify = true) override; - CommandObject * - GetPluginCommandObject() override; + Error DisableWatchpoint(Watchpoint *wp, bool notify = true) override; - //------------------------------------------------------------------ - // Creating a new process, or attaching to an existing one - //------------------------------------------------------------------ - Error - WillLaunch (Module* module) override; + Error GetWatchpointSupportInfo(uint32_t &num) override; - Error - DoLaunch (Module *exe_module, ProcessLaunchInfo &launch_info) override; + Error GetWatchpointSupportInfo(uint32_t &num, bool &after) override; - void - DidLaunch () override; - - Error - WillAttachToProcessWithID (lldb::pid_t pid) override; - - Error - WillAttachToProcessWithName (const char *process_name, bool wait_for_launch) override; + bool StartNoticingNewThreads() override; - Error - DoConnectRemote (Stream *strm, const char *remote_url) override; - - Error - WillLaunchOrAttach (); - - Error - DoAttachToProcessWithID (lldb::pid_t pid, const ProcessAttachInfo &attach_info) override; - - Error - DoAttachToProcessWithName (const char *process_name, - const ProcessAttachInfo &attach_info) override; - - void - DidAttach (ArchSpec &process_arch) override; - - //------------------------------------------------------------------ - // PluginInterface protocol - //------------------------------------------------------------------ - ConstString - GetPluginName() override; - - uint32_t - GetPluginVersion() override; - - //------------------------------------------------------------------ - // Process Control - //------------------------------------------------------------------ - Error - WillResume () override; - - Error - DoResume () override; - - Error - DoHalt (bool &caused_stop) override; - - Error - DoDetach (bool keep_stopped) override; - - bool - DetachRequiresHalt() override { return true; } - - Error - DoSignal (int signal) override; - - Error - DoDestroy () override; - - void - RefreshStateAfterStop() override; - - void - SetUnixSignals(const lldb::UnixSignalsSP &signals_sp); - - //------------------------------------------------------------------ - // Process Queries - //------------------------------------------------------------------ - bool - IsAlive () override; - - lldb::addr_t - GetImageInfoAddress() override; - - void - WillPublicStop () override; - - //------------------------------------------------------------------ - // Process Memory - //------------------------------------------------------------------ - size_t - DoReadMemory (lldb::addr_t addr, void *buf, size_t size, Error &error) override; - - size_t - DoWriteMemory (lldb::addr_t addr, const void *buf, size_t size, Error &error) override; - - lldb::addr_t - DoAllocateMemory (size_t size, uint32_t permissions, Error &error) override; - - Error - GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo ®ion_info) override; - - Error - DoDeallocateMemory (lldb::addr_t ptr) override; - - //------------------------------------------------------------------ - // Process STDIO - //------------------------------------------------------------------ - size_t - PutSTDIN (const char *buf, size_t buf_size, Error &error) override; - - //---------------------------------------------------------------------- - // Process Breakpoints - //---------------------------------------------------------------------- - Error - EnableBreakpointSite (BreakpointSite *bp_site) override; - - Error - DisableBreakpointSite (BreakpointSite *bp_site) override; - - //---------------------------------------------------------------------- - // Process Watchpoints - //---------------------------------------------------------------------- - Error - EnableWatchpoint (Watchpoint *wp, bool notify = true) override; - - Error - DisableWatchpoint (Watchpoint *wp, bool notify = true) override; - - Error - GetWatchpointSupportInfo (uint32_t &num) override; - - Error - GetWatchpointSupportInfo (uint32_t &num, bool& after) override; - - bool - StartNoticingNewThreads() override; - - bool - StopNoticingNewThreads() override; + bool StopNoticingNewThreads() override; - GDBRemoteCommunicationClient & - GetGDBRemote() - { - return m_gdb_comm; - } - - Error - SendEventData(const char *data) override; + GDBRemoteCommunicationClient &GetGDBRemote() { return m_gdb_comm; } - //---------------------------------------------------------------------- - // Override DidExit so we can disconnect from the remote GDB server - //---------------------------------------------------------------------- - void - DidExit () override; - - void - SetUserSpecifiedMaxMemoryTransferSize (uint64_t user_specified_max); - - bool - GetModuleSpec(const FileSpec& module_file_spec, - const ArchSpec& arch, - ModuleSpec &module_spec) override; - - bool - GetHostOSVersion(uint32_t &major, - uint32_t &minor, - uint32_t &update) override; + Error SendEventData(const char *data) override; - size_t - LoadModules(LoadedModuleInfoList &module_list) override; - - size_t - LoadModules() override; - - Error - GetFileLoadAddress(const FileSpec& file, bool& is_loaded, lldb::addr_t& load_addr) override; - - void - ModulesDidLoad (ModuleList &module_list) override; + //---------------------------------------------------------------------- + // Override DidExit so we can disconnect from the remote GDB server + //---------------------------------------------------------------------- + void DidExit() override; - StructuredData::ObjectSP - GetLoadedDynamicLibrariesInfos (lldb::addr_t image_list_address, lldb::addr_t image_count) override; - - Error - ConfigureStructuredData(const ConstString &type_name, - const StructuredData::ObjectSP &config_sp) override; - - StructuredData::ObjectSP - GetLoadedDynamicLibrariesInfos () override; - - StructuredData::ObjectSP - GetLoadedDynamicLibrariesInfos (const std::vector &load_addresses) override; - - StructuredData::ObjectSP - GetLoadedDynamicLibrariesInfos_sender (StructuredData::ObjectSP args); - - StructuredData::ObjectSP - GetSharedCacheInfo () override; - - std::string - HarmonizeThreadIdsForProfileData(StringExtractorGDBRemote &inputStringExtractor); + void SetUserSpecifiedMaxMemoryTransferSize(uint64_t user_specified_max); + + bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch, + ModuleSpec &module_spec) override; + + bool GetHostOSVersion(uint32_t &major, uint32_t &minor, + uint32_t &update) override; + + size_t LoadModules(LoadedModuleInfoList &module_list) override; + + size_t LoadModules() override; + + Error GetFileLoadAddress(const FileSpec &file, bool &is_loaded, + lldb::addr_t &load_addr) override; + + void ModulesDidLoad(ModuleList &module_list) override; + + StructuredData::ObjectSP + GetLoadedDynamicLibrariesInfos(lldb::addr_t image_list_address, + lldb::addr_t image_count) override; + + Error + ConfigureStructuredData(const ConstString &type_name, + const StructuredData::ObjectSP &config_sp) override; + + StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos() override; + + StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos( + const std::vector &load_addresses) override; + + StructuredData::ObjectSP + GetLoadedDynamicLibrariesInfos_sender(StructuredData::ObjectSP args); + + StructuredData::ObjectSP GetSharedCacheInfo() override; + + std::string HarmonizeThreadIdsForProfileData( + StringExtractorGDBRemote &inputStringExtractor); protected: - friend class ThreadGDBRemote; - friend class GDBRemoteCommunicationClient; - friend class GDBRemoteRegisterContext; - - //------------------------------------------------------------------ - /// 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 - std::recursive_mutex m_last_stop_packet_mutex; - GDBRemoteDynamicRegisterInfo m_register_info; - Broadcaster m_async_broadcaster; - lldb::ListenerSP m_async_listener_sp; - HostThread m_async_thread; - std::recursive_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 - std::vector m_thread_pcs; // PC values for all the threads. - 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); - } - - bool - IsStepping ( lldb::StateType state) - { - return state == lldb::eStateStepping; - } - - bool - CanResume ( lldb::StateType state) - { - return state == lldb::eStateStopped; - } - - bool - HasExited (lldb::StateType state) - { - return state == lldb::eStateExited; - } - - bool - ProcessIDIsValid ( ) const; - - void - Clear ( ); - - Flags & - GetFlags () - { - return m_flags; - } - - const Flags & - GetFlags () const - { - return m_flags; - } - - bool - UpdateThreadList (ThreadList &old_thread_list, - ThreadList &new_thread_list) override; - - Error - EstablishConnectionIfNeeded (const ProcessInfo &process_info); - - Error - LaunchAndConnectToDebugserver (const ProcessInfo &process_info); - - void - KillDebugserverProcess (); - - void - BuildDynamicRegisterInfo (bool force); - - void - SetLastStopPacket (const StringExtractorGDBRemote &response); - - bool - ParsePythonTargetDefinition(const FileSpec &target_definition_fspec); - - const lldb::DataBufferSP - GetAuxvData() override; - - StructuredData::ObjectSP - GetExtendedInfoForThread (lldb::tid_t tid); - - void - GetMaxMemorySize(); - - bool - CalculateThreadStopInfo (ThreadGDBRemote *thread); - - size_t - UpdateThreadPCsFromStopReplyThreadsValue (std::string &value); - - size_t - UpdateThreadIDsFromStopReplyThreadsValue (std::string &value); - - bool - HandleNotifyPacket(StringExtractorGDBRemote &packet); - - bool - StartAsyncThread (); - - void - StopAsyncThread (); - - static lldb::thread_result_t - AsyncThread (void *arg); + friend class ThreadGDBRemote; + friend class GDBRemoteCommunicationClient; + friend class GDBRemoteRegisterContext; + + //------------------------------------------------------------------ + /// 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 + std::recursive_mutex m_last_stop_packet_mutex; + GDBRemoteDynamicRegisterInfo m_register_info; + Broadcaster m_async_broadcaster; + lldb::ListenerSP m_async_listener_sp; + HostThread m_async_thread; + std::recursive_mutex m_async_thread_state_mutex; + typedef std::vector tid_collection; + typedef std::vector> 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 + std::vector m_thread_pcs; // PC values for all the threads. + 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); + } + + bool IsStepping(lldb::StateType state) { + return state == lldb::eStateStepping; + } + + bool CanResume(lldb::StateType state) { return state == lldb::eStateStopped; } + + bool HasExited(lldb::StateType state) { return state == lldb::eStateExited; } + + bool ProcessIDIsValid() const; + + void Clear(); + + Flags &GetFlags() { return m_flags; } + + const Flags &GetFlags() const { return m_flags; } + + bool UpdateThreadList(ThreadList &old_thread_list, + ThreadList &new_thread_list) override; + + Error EstablishConnectionIfNeeded(const ProcessInfo &process_info); + + Error LaunchAndConnectToDebugserver(const ProcessInfo &process_info); + + void KillDebugserverProcess(); + + void BuildDynamicRegisterInfo(bool force); + + void SetLastStopPacket(const StringExtractorGDBRemote &response); + + bool ParsePythonTargetDefinition(const FileSpec &target_definition_fspec); + + const lldb::DataBufferSP GetAuxvData() override; + + StructuredData::ObjectSP GetExtendedInfoForThread(lldb::tid_t tid); + + void GetMaxMemorySize(); + + bool CalculateThreadStopInfo(ThreadGDBRemote *thread); + + size_t UpdateThreadPCsFromStopReplyThreadsValue(std::string &value); + + size_t UpdateThreadIDsFromStopReplyThreadsValue(std::string &value); + + bool HandleNotifyPacket(StringExtractorGDBRemote &packet); + + bool StartAsyncThread(); + + void StopAsyncThread(); + + static lldb::thread_result_t AsyncThread(void *arg); - static bool - MonitorDebugserverProcess(std::weak_ptr process_wp, lldb::pid_t pid, bool exited, int signo, - int exit_status); + static bool + MonitorDebugserverProcess(std::weak_ptr process_wp, + lldb::pid_t pid, bool exited, int signo, + int exit_status); - lldb::StateType - SetThreadStopInfo (StringExtractor& stop_packet); + lldb::StateType SetThreadStopInfo(StringExtractor &stop_packet); - bool - GetThreadStopInfoFromJSON (ThreadGDBRemote *thread, const StructuredData::ObjectSP &thread_infos_sp); + bool + GetThreadStopInfoFromJSON(ThreadGDBRemote *thread, + const StructuredData::ObjectSP &thread_infos_sp); - lldb::ThreadSP - SetThreadStopInfo (StructuredData::Dictionary *thread_dict); + lldb::ThreadSP SetThreadStopInfo(StructuredData::Dictionary *thread_dict); - lldb::ThreadSP - SetThreadStopInfo (lldb::tid_t tid, - ExpeditedRegisterMap &expedited_register_map, - uint8_t signo, - const std::string &thread_name, - const std::string &reason, - const std::string &description, - uint32_t exc_type, - const std::vector &exc_data, - lldb::addr_t thread_dispatch_qaddr, - bool queue_vars_valid, - lldb_private::LazyBool associated_with_libdispatch_queue, - lldb::addr_t dispatch_queue_t, - std::string &queue_name, - lldb::QueueKind queue_kind, - uint64_t queue_serial); + lldb::ThreadSP + SetThreadStopInfo(lldb::tid_t tid, + ExpeditedRegisterMap &expedited_register_map, uint8_t signo, + const std::string &thread_name, const std::string &reason, + const std::string &description, uint32_t exc_type, + const std::vector &exc_data, + lldb::addr_t thread_dispatch_qaddr, bool queue_vars_valid, + lldb_private::LazyBool associated_with_libdispatch_queue, + lldb::addr_t dispatch_queue_t, std::string &queue_name, + lldb::QueueKind queue_kind, uint64_t queue_serial); - void - HandleStopReplySequence (); + void HandleStopReplySequence(); - void - ClearThreadIDList (); + void ClearThreadIDList(); - bool - UpdateThreadIDList (); + bool UpdateThreadIDList(); - void - DidLaunchOrAttach (ArchSpec& process_arch); + void DidLaunchOrAttach(ArchSpec &process_arch); - Error - ConnectToDebugserver (const char *host_port); + Error ConnectToDebugserver(const char *host_port); - const char * - GetDispatchQueueNameForThread (lldb::addr_t thread_dispatch_qaddr, - std::string &dispatch_queue_name); + const char *GetDispatchQueueNameForThread(lldb::addr_t thread_dispatch_qaddr, + std::string &dispatch_queue_name); - DynamicLoader * - GetDynamicLoader () override; + DynamicLoader *GetDynamicLoader() override; - // Query remote GDBServer for register information - bool - GetGDBServerRegisterInfo (ArchSpec &arch); + // Query remote GDBServer for register information + bool GetGDBServerRegisterInfo(ArchSpec &arch); - // Query remote GDBServer for a detailed loaded library list - Error - GetLoadedModuleList (LoadedModuleInfoList &); + // Query remote GDBServer for a detailed loaded library list + Error GetLoadedModuleList(LoadedModuleInfoList &); - lldb::ModuleSP - LoadModuleAtAddress (const FileSpec &file, lldb::addr_t link_map, lldb::addr_t base_addr, - bool value_is_offset); + lldb::ModuleSP LoadModuleAtAddress(const FileSpec &file, + lldb::addr_t link_map, + lldb::addr_t base_addr, + bool value_is_offset); private: - //------------------------------------------------------------------ - // For ProcessGDBRemote only - //------------------------------------------------------------------ - std::string m_partial_profile_data; - std::map m_thread_id_to_used_usec_map; - - static bool - NewThreadNotifyBreakpointHit (void *baton, - StoppointCallbackContext *context, - lldb::user_id_t break_id, - lldb::user_id_t break_loc_id); - - //------------------------------------------------------------------ - // ContinueDelegate interface - //------------------------------------------------------------------ - void - HandleAsyncStdout(llvm::StringRef out) override; - void - HandleAsyncMisc(llvm::StringRef data) override; - void - HandleStopReply() override; - bool - HandleAsyncStructuredData(const StructuredData::ObjectSP - &object_sp) override; - - DISALLOW_COPY_AND_ASSIGN (ProcessGDBRemote); + //------------------------------------------------------------------ + // For ProcessGDBRemote only + //------------------------------------------------------------------ + std::string m_partial_profile_data; + std::map m_thread_id_to_used_usec_map; + + static bool NewThreadNotifyBreakpointHit(void *baton, + StoppointCallbackContext *context, + lldb::user_id_t break_id, + lldb::user_id_t break_loc_id); + + //------------------------------------------------------------------ + // ContinueDelegate interface + //------------------------------------------------------------------ + void HandleAsyncStdout(llvm::StringRef out) override; + void HandleAsyncMisc(llvm::StringRef data) override; + void HandleStopReply() override; + bool + HandleAsyncStructuredData(const StructuredData::ObjectSP &object_sp) override; + + DISALLOW_COPY_AND_ASSIGN(ProcessGDBRemote); }; } // namespace process_gdb_remote -- cgit v1.1