diff options
author | Greg Clayton <gclayton@apple.com> | 2015-06-23 21:27:50 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-06-23 21:27:50 +0000 |
commit | 0b90be1c4f151dd3f8eda2a291a68554e67a3742 (patch) | |
tree | d69bddb32f34798f9d99cb97c2c1d0dcd7dbdc1c /lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h | |
parent | a0d5c5924af5ede48b367723874a0efb7993d041 (diff) | |
download | llvm-0b90be1c4f151dd3f8eda2a291a68554e67a3742.zip llvm-0b90be1c4f151dd3f8eda2a291a68554e67a3742.tar.gz llvm-0b90be1c4f151dd3f8eda2a291a68554e67a3742.tar.bz2 |
Implement the "qSymbol" packet in order to be able to read queue information in debugserver and return the info in the stop reply packets.
A "qSymbol::" is sent when shared libraries have been loaded by hooking into the Process::ModulesDidLoad() function from within ProcessGDBRemote. This function was made virtual so that the ProcessGDBRemote version is called, which then first calls the Process::ModulesDidLoad(), and then it queries for any symbol lookups that the remote GDB server might want to do.
This allows debugserver to request the "dispatch_queue_offsets" symbol so that it can read the queue name, queue kind and queue serial number and include this data as part of the stop reply packet. Previously each thread would have to do 3 memory reads in order to read the queue name.
This is part of reducing the number of packets that are sent between LLDB and the remote GDB server.
<rdar://problem/21494354>
llvm-svn: 240466
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h index 8bff544..175433a 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h @@ -91,6 +91,12 @@ public: m_thread_dispatch_qaddr = thread_dispatch_qaddr; } + void + ClearQueueInfo (); + + void + SetQueueInfo (std::string &&queue_name, lldb::QueueKind queue_kind, uint64_t queue_serial); + StructuredData::ObjectSP FetchThreadExtendedInfo () override; @@ -101,13 +107,20 @@ protected: bool PrivateSetRegisterValue (uint32_t reg, StringExtractor &response); - + + bool + CachedQueueInfoIsValid() const + { + return m_queue_kind != lldb::eQueueKindUnknown; + } //------------------------------------------------------------------ // Member variables. //------------------------------------------------------------------ std::string m_thread_name; std::string m_dispatch_queue_name; lldb::addr_t m_thread_dispatch_qaddr; + lldb::QueueKind m_queue_kind; // Queue info from stop reply/stop info for thread + uint64_t m_queue_serial; // Queue info from stop reply/stop info for thread //------------------------------------------------------------------ // Member variables. //------------------------------------------------------------------ |