From 2f1fbaebe25a4637cf75ec9ab1877c64584ede24 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 8 Sep 2016 10:07:04 +0000 Subject: 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 --- lldb/source/Utility/StringExtractorGDBRemote.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp') diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index c2f8f5a4a8c..dd13be9a763 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -279,6 +279,8 @@ StringExtractorGDBRemote::GetServerPacketType() const { break; case 'j': + if (PACKET_STARTS_WITH("jModulesInfo:")) + return eServerPacketType_jModulesInfo; if (PACKET_MATCHES("jSignalsInfo")) return eServerPacketType_jSignalsInfo; if (PACKET_MATCHES("jThreadsInfo")) -- cgit v1.2.3