Added the ability to get JSON thread stop info with thread ID and stop info only in the normal stop reply packets using the new "jthreads" key value pair.
This allows stepping operations that don't ever do a public stop to get all the info they need without having to send a jThreadsInfo packet since those tend to be large.
This patch will be followed by a patch that will detect when we do a public stop, and when that happens we will send a jThreadsInfo packet at that time to get all expedited registers and memory.
llvm-svn: 242352
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 0bcc8ca..dbd68b4 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2341,6 +2341,18 @@
if (tid != LLDB_INVALID_THREAD_ID)
m_thread_ids.push_back (tid);
}
+ else if (key.compare("jthreads") == 0)
+ {
+ StringExtractor json_extractor;
+ // Swap "value" over into "name_extractor"
+ json_extractor.GetStringRef().swap(value);
+ // Now convert the HEX bytes into a string value
+ json_extractor.GetHexByteString (value);
+
+ // This JSON contains thread IDs and thread stop info for all threads.
+ // It doesn't contain expedited registers, memory or queue info.
+ m_threads_info_sp = StructuredData::ParseJSON (value);
+ }
else if (key.compare("hexname") == 0)
{
StringExtractor name_extractor;