summaryrefslogtreecommitdiffstats
path: root/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
committeremaste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
commit0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (patch)
tree09bc83f73246ee3c7a779605cd0122093d2a8a19 /source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
parent01ee1789d6aa7294e5966a97f8d29387f6f81699 (diff)
downloadFreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.zip
FreeBSD-src-0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531.tar.gz
Import LLDB as of upstream SVN r225923 (git 2b588ecd)
This corresponds with the branchpoint for the 3.6 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Plugins/Process/gdb-remote/ProcessGDBRemote.h')
-rw-r--r--source/Plugins/Process/gdb-remote/ProcessGDBRemote.h97
1 files changed, 45 insertions, 52 deletions
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index 942b31c..e0c460a 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -25,6 +25,7 @@
#include "lldb/Core/StringList.h"
#include "lldb/Core/StructuredData.h"
#include "lldb/Core/ThreadSafeValue.h"
+#include "lldb/Host/HostThread.h"
#include "lldb/lldb-private-forward.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Thread.h"
@@ -74,148 +75,148 @@ public:
//------------------------------------------------------------------
virtual bool
CanDebug (lldb_private::Target &target,
- bool plugin_specified_by_name);
+ bool plugin_specified_by_name) override;
virtual lldb_private::CommandObject *
- GetPluginCommandObject();
+ GetPluginCommandObject() override;
//------------------------------------------------------------------
// Creating a new process, or attaching to an existing one
//------------------------------------------------------------------
virtual lldb_private::Error
- WillLaunch (lldb_private::Module* module);
+ WillLaunch (lldb_private::Module* module) override;
virtual lldb_private::Error
DoLaunch (lldb_private::Module *exe_module,
- lldb_private::ProcessLaunchInfo &launch_info);
+ lldb_private::ProcessLaunchInfo &launch_info) override;
virtual void
- DidLaunch ();
+ DidLaunch () override;
virtual lldb_private::Error
- WillAttachToProcessWithID (lldb::pid_t pid);
+ WillAttachToProcessWithID (lldb::pid_t pid) override;
virtual lldb_private::Error
- WillAttachToProcessWithName (const char *process_name, bool wait_for_launch);
+ WillAttachToProcessWithName (const char *process_name, bool wait_for_launch) override;
virtual lldb_private::Error
- DoConnectRemote (lldb_private::Stream *strm, const char *remote_url);
+ DoConnectRemote (lldb_private::Stream *strm, const char *remote_url) override;
lldb_private::Error
WillLaunchOrAttach ();
virtual lldb_private::Error
- DoAttachToProcessWithID (lldb::pid_t pid);
+ DoAttachToProcessWithID (lldb::pid_t pid) override;
virtual lldb_private::Error
- DoAttachToProcessWithID (lldb::pid_t pid, const lldb_private::ProcessAttachInfo &attach_info);
+ DoAttachToProcessWithID (lldb::pid_t pid, const lldb_private::ProcessAttachInfo &attach_info) override;
virtual lldb_private::Error
DoAttachToProcessWithName (const char *process_name,
- const lldb_private::ProcessAttachInfo &attach_info);
+ const lldb_private::ProcessAttachInfo &attach_info) override;
virtual void
- DidAttach (lldb_private::ArchSpec &process_arch);
+ DidAttach (lldb_private::ArchSpec &process_arch) override;
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
virtual lldb_private::ConstString
- GetPluginName();
+ GetPluginName() override;
virtual uint32_t
- GetPluginVersion();
+ GetPluginVersion() override;
//------------------------------------------------------------------
// Process Control
//------------------------------------------------------------------
virtual lldb_private::Error
- WillResume ();
+ WillResume () override;
virtual lldb_private::Error
- DoResume ();
+ DoResume () override;
virtual lldb_private::Error
- DoHalt (bool &caused_stop);
+ DoHalt (bool &caused_stop) override;
virtual lldb_private::Error
- DoDetach (bool keep_stopped);
+ DoDetach (bool keep_stopped) override;
virtual bool
- DetachRequiresHalt() { return true; }
+ DetachRequiresHalt() override { return true; }
virtual lldb_private::Error
- DoSignal (int signal);
+ DoSignal (int signal) override;
virtual lldb_private::Error
- DoDestroy ();
+ DoDestroy () override;
virtual void
- RefreshStateAfterStop();
+ RefreshStateAfterStop() override;
//------------------------------------------------------------------
// Process Queries
//------------------------------------------------------------------
virtual bool
- IsAlive ();
+ IsAlive () override;
virtual lldb::addr_t
- GetImageInfoAddress();
+ GetImageInfoAddress() override;
//------------------------------------------------------------------
// Process Memory
//------------------------------------------------------------------
virtual size_t
- DoReadMemory (lldb::addr_t addr, void *buf, size_t size, lldb_private::Error &error);
+ DoReadMemory (lldb::addr_t addr, void *buf, size_t size, lldb_private::Error &error) override;
virtual size_t
- DoWriteMemory (lldb::addr_t addr, const void *buf, size_t size, lldb_private::Error &error);
+ DoWriteMemory (lldb::addr_t addr, const void *buf, size_t size, lldb_private::Error &error) override;
virtual lldb::addr_t
- DoAllocateMemory (size_t size, uint32_t permissions, lldb_private::Error &error);
+ DoAllocateMemory (size_t size, uint32_t permissions, lldb_private::Error &error) override;
virtual lldb_private::Error
GetMemoryRegionInfo (lldb::addr_t load_addr,
- lldb_private::MemoryRegionInfo &region_info);
+ lldb_private::MemoryRegionInfo &region_info) override;
virtual lldb_private::Error
- DoDeallocateMemory (lldb::addr_t ptr);
+ DoDeallocateMemory (lldb::addr_t ptr) override;
//------------------------------------------------------------------
// Process STDIO
//------------------------------------------------------------------
virtual size_t
- PutSTDIN (const char *buf, size_t buf_size, lldb_private::Error &error);
+ PutSTDIN (const char *buf, size_t buf_size, lldb_private::Error &error) override;
//----------------------------------------------------------------------
// Process Breakpoints
//----------------------------------------------------------------------
virtual lldb_private::Error
- EnableBreakpointSite (lldb_private::BreakpointSite *bp_site);
+ EnableBreakpointSite (lldb_private::BreakpointSite *bp_site) override;
virtual lldb_private::Error
- DisableBreakpointSite (lldb_private::BreakpointSite *bp_site);
+ DisableBreakpointSite (lldb_private::BreakpointSite *bp_site) override;
//----------------------------------------------------------------------
// Process Watchpoints
//----------------------------------------------------------------------
virtual lldb_private::Error
- EnableWatchpoint (lldb_private::Watchpoint *wp, bool notify = true);
+ EnableWatchpoint (lldb_private::Watchpoint *wp, bool notify = true) override;
virtual lldb_private::Error
- DisableWatchpoint (lldb_private::Watchpoint *wp, bool notify = true);
+ DisableWatchpoint (lldb_private::Watchpoint *wp, bool notify = true) override;
virtual lldb_private::Error
- GetWatchpointSupportInfo (uint32_t &num);
+ GetWatchpointSupportInfo (uint32_t &num) override;
virtual lldb_private::Error
- GetWatchpointSupportInfo (uint32_t &num, bool& after);
+ GetWatchpointSupportInfo (uint32_t &num, bool& after) override;
virtual bool
- StartNoticingNewThreads();
+ StartNoticingNewThreads() override;
virtual bool
- StopNoticingNewThreads();
+ StopNoticingNewThreads() override;
GDBRemoteCommunicationClient &
GetGDBRemote()
@@ -224,13 +225,13 @@ public:
}
virtual lldb_private::Error
- SendEventData(const char *data);
+ SendEventData(const char *data) override;
//----------------------------------------------------------------------
// Override SetExitStatus so we can disconnect from the remote GDB server
//----------------------------------------------------------------------
virtual bool
- SetExitStatus (int exit_status, const char *cstr);
+ SetExitStatus (int exit_status, const char *cstr) override;
void
SetUserSpecifiedMaxMemoryTransferSize (uint64_t user_specified_max);
@@ -286,7 +287,7 @@ protected:
virtual bool
UpdateThreadList (lldb_private::ThreadList &old_thread_list,
- lldb_private::ThreadList &new_thread_list);
+ lldb_private::ThreadList &new_thread_list) override;
lldb_private::Error
LaunchAndConnectToDebugserver (const lldb_private::ProcessInfo &process_info);
@@ -324,23 +325,15 @@ protected:
eBroadcastBitAsyncThreadShouldExit = (1 << 1),
eBroadcastBitAsyncThreadDidExit = (1 << 2)
};
-
- typedef enum AsyncThreadState
- {
- eAsyncThreadNotStarted,
- eAsyncThreadRunning,
- eAsyncThreadDone
- } AsyncThreadState;
lldb_private::Flags m_flags; // Process specific flags (see eFlags enums)
GDBRemoteCommunicationClient m_gdb_comm;
- lldb::pid_t m_debugserver_pid;
+ std::atomic<lldb::pid_t> m_debugserver_pid;
StringExtractorGDBRemote m_last_stop_packet;
lldb_private::Mutex m_last_stop_packet_mutex;
GDBRemoteDynamicRegisterInfo m_register_info;
lldb_private::Broadcaster m_async_broadcaster;
- lldb::thread_t m_async_thread;
- AsyncThreadState m_async_thread_state;
+ lldb_private::HostThread m_async_thread;
lldb_private::Mutex m_async_thread_state_mutex;
typedef std::vector<lldb::tid_t> tid_collection;
typedef std::vector< std::pair<lldb::tid_t,int> > tid_sig_collection;
@@ -395,7 +388,7 @@ protected:
std::string &dispatch_queue_name);
lldb_private::DynamicLoader *
- GetDynamicLoader ();
+ GetDynamicLoader () override;
private:
//------------------------------------------------------------------
OpenPOWER on IntegriCloud