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/GDBRemoteCommunicationServerCommon.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/GDBRemoteCommunicationServerCommon.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h index d6be24a0e4b..321a92266bd 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h @@ -86,6 +86,8 @@ protected: PacketResult Handle_qModuleInfo(StringExtractorGDBRemote &packet); + PacketResult Handle_jModulesInfo(StringExtractorGDBRemote &packet); + PacketResult Handle_qPlatform_shell(StringExtractorGDBRemote &packet); PacketResult Handle_qPlatform_mkdir(StringExtractorGDBRemote &packet); @@ -149,6 +151,10 @@ protected: virtual FileSpec FindModuleFile(const std::string &module_path, const ArchSpec &arch); + +private: + ModuleSpec GetModuleInfo(const std::string &module_path, + const std::string &triple); }; } // namespace process_gdb_remote |