diff options
author | Greg Clayton <gclayton@apple.com> | 2011-01-18 19:36:39 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-01-18 19:36:39 +0000 |
commit | c4e411ffc09a77abe9957f83827fc1745d7e0408 (patch) | |
tree | 78a1107cecd93fdb0cda97b735d5ff23751f2c4a /lldb/tools/debugserver/source/MacOSX/MachProcess.h | |
parent | 4dc73fa075db86bc6a07d755d972e9f8ad7336cc (diff) | |
download | bcm5719-llvm-c4e411ffc09a77abe9957f83827fc1745d7e0408.tar.gz bcm5719-llvm-c4e411ffc09a77abe9957f83827fc1745d7e0408.zip |
Thread safety changes in debugserver and also in the process GDB remote plugin.
I added support for asking if the GDB remote server supports thread suffixes
for packets that should be thread specific (register read/write packets) because
the way the GDB remote protocol does it right now is to have a notion of a
current thread for register and memory reads/writes (set via the "$Hg%x" packet)
and a current thread for running ("$Hc%x"). Now we ask the remote GDB server
if it supports adding the thread ID to the register packets and we enable
that feature in LLDB if supported. This stops us from having to send a bunch
of packets that update the current thread ID to some value which is prone to
error, or extra packets.
llvm-svn: 123762
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachProcess.h')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachProcess.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.h b/lldb/tools/debugserver/source/MacOSX/MachProcess.h index 04ad02eb634..8866187b56a 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachProcess.h +++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.h @@ -17,6 +17,7 @@ #include "DNBDefs.h" #include "DNBBreakpoint.h" #include "DNBError.h" +#include "DNBThreadResumeActions.h" //#include "MachDYLD.h" #include "MachException.h" #include "MachVMMemory.h" @@ -219,8 +220,8 @@ private: eMachProcessFlagsUsingSBS = (1 << 1) }; void Clear (); - void ReplyToAllExceptions (const DNBThreadResumeActions& thread_actions); - void PrivateResume (const DNBThreadResumeActions& thread_actions); + void ReplyToAllExceptions (); + void PrivateResume (); nub_size_t RemoveTrapsFromBuffer (nub_addr_t addr, nub_size_t size, uint8_t *buf) const; uint32_t Flags () const { return m_flags; } @@ -239,6 +240,7 @@ private: pthread_t m_stdio_thread; // Thread ID for the thread that watches for child process stdio PThreadMutex m_stdio_mutex; // Multithreaded protection for stdio std::string m_stdout_data; + DNBThreadResumeActions m_thread_actions; // The thread actions for the current MachProcess::Resume() call MachException::Message::collection m_exception_messages; // A collection of exception messages caught when listening to the exception port PThreadMutex m_exception_messages_mutex; // Multithreaded protection for m_exception_messages |