diff options
author | Pavel Labath <labath@google.com> | 2016-09-08 10:07:04 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-09-08 10:07:04 +0000 |
commit | 2f1fbaebe25a4637cf75ec9ab1877c64584ede24 (patch) | |
tree | cca4e3ae0fd9afec5fbeeccd59b2b964262b3b88 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | |
parent | 2b7ed1339cea63180bc3203ac57b4c5b12219589 (diff) | |
download | bcm5719-llvm-2f1fbaebe25a4637cf75ec9ab1877c64584ede24.tar.gz bcm5719-llvm-2f1fbaebe25a4637cf75ec9ab1877c64584ede24.zip |
gdb-remote: Add jModulesInfo packet
Summary:
This adds the jModulesInfo packet, which is the equivalent of qModulesInfo, but it enables us to
query multiple modules at once. This makes a significant speed improvement in case the
application has many (over a hundred) modules, and the communication link has a non-negligible
latency. This functionality is accessed by ProcessGdbRemote::PrefetchModuleSpecs(), which does
the caching. GetModuleSpecs() is modified to first consult the cache before asking the remote
stub. PrefetchModuleSpecs is currently only called from POSIX-DYLD dynamic loader plugin, after
it reads the list of modules from the inferior memory, but other uses are possible.
This decreases the attach time to an android application by about 40%.
Reviewers: clayborg
Subscribers: tberghammer, lldb-commits, danalbert
Differential Revision: https://reviews.llvm.org/D24236
llvm-svn: 280919
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index e40c08cc681..cfdcc881d76 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -26,6 +26,8 @@ #include "lldb/Core/StructuredData.h" #include "lldb/Target/Process.h" +#include "llvm/ADT/Optional.h" + namespace lldb_private { namespace process_gdb_remote { @@ -437,6 +439,10 @@ public: bool GetModuleInfo(const FileSpec &module_file_spec, const ArchSpec &arch_spec, ModuleSpec &module_spec); + llvm::Optional<std::vector<ModuleSpec>> + GetModulesInfo(llvm::ArrayRef<FileSpec> module_file_specs, + const llvm::Triple &triple); + bool ReadExtFeature(const lldb_private::ConstString object, const lldb_private::ConstString annex, std::string &out, lldb_private::Error &err); @@ -527,7 +533,8 @@ protected: m_supports_z2 : 1, m_supports_z3 : 1, m_supports_z4 : 1, m_supports_QEnvironment : 1, m_supports_QEnvironmentHexEncoded : 1, m_supports_qSymbol : 1, m_qSymbol_requests_done : 1, - m_supports_qModuleInfo : 1, m_supports_jThreadsInfo : 1; + m_supports_qModuleInfo : 1, m_supports_jThreadsInfo : 1, + m_supports_jModulesInfo : 1; lldb::pid_t m_curr_pid; lldb::tid_t m_curr_tid; // Current gdb remote protocol thread index for all |