summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/StringExtractor.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-01-18 19:36:39 +0000
committerGreg Clayton <gclayton@apple.com>2011-01-18 19:36:39 +0000
commitc4e411ffc09a77abe9957f83827fc1745d7e0408 (patch)
tree78a1107cecd93fdb0cda97b735d5ff23751f2c4a /lldb/source/Utility/StringExtractor.h
parent4dc73fa075db86bc6a07d755d972e9f8ad7336cc (diff)
downloadbcm5719-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/source/Utility/StringExtractor.h')
-rw-r--r--lldb/source/Utility/StringExtractor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Utility/StringExtractor.h b/lldb/source/Utility/StringExtractor.h
index ed67b926c2a..bb65f707f7d 100644
--- a/lldb/source/Utility/StringExtractor.h
+++ b/lldb/source/Utility/StringExtractor.h
@@ -113,6 +113,14 @@ public:
size_t
GetHexByteString (std::string &str);
+ const char *
+ Peek ()
+ {
+ if (m_index < m_packet.size())
+ return m_packet.c_str() + m_index;
+ return NULL;
+ }
+
protected:
//------------------------------------------------------------------
// For StringExtractor only
OpenPOWER on IntegriCloud