summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorStephane Sezer <sas@cd80.net>2016-01-08 00:00:17 +0000
committerStephane Sezer <sas@cd80.net>2016-01-08 00:00:17 +0000
commit6f455290465f4e1f9094769d496fc9734a2cfc33 (patch)
tree890bc3914a8c72761f9a95d303c64a3db293ded7 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent54a7c69a34f913c4681ddf2d9088ecdc6babddfe (diff)
downloadbcm5719-llvm-6f455290465f4e1f9094769d496fc9734a2cfc33.tar.gz
bcm5719-llvm-6f455290465f4e1f9094769d496fc9734a2cfc33.zip
Make sure we don't send qModuleInfo packets unnecessarily.
Summary: Some debug servers don't support it so there's no point in spamming this. Reviewers: clayborg Subscribers: fjricci, lldb-commits Differential Revision: http://reviews.llvm.org/D15972 llvm-svn: 257116
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 5c7f6caca51..ab24368c10c 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -101,6 +101,7 @@ GDBRemoteCommunicationClient::GDBRemoteCommunicationClient() :
m_supports_QEnvironment (true),
m_supports_QEnvironmentHexEncoded (true),
m_supports_qSymbol (true),
+ m_supports_qModuleInfo (true),
m_supports_jThreadsInfo (true),
m_curr_pid (LLDB_INVALID_PROCESS_ID),
m_curr_tid (LLDB_INVALID_THREAD_ID),
@@ -376,6 +377,7 @@ GDBRemoteCommunicationClient::ResetDiscoverableSettings (bool did_exec)
m_supports_QEnvironment = true;
m_supports_QEnvironmentHexEncoded = true;
m_supports_qSymbol = true;
+ m_supports_qModuleInfo = true;
m_host_arch.Clear();
m_os_version_major = UINT32_MAX;
m_os_version_minor = UINT32_MAX;
@@ -4284,6 +4286,9 @@ GDBRemoteCommunicationClient::GetModuleInfo (const FileSpec& module_file_spec,
const lldb_private::ArchSpec& arch_spec,
ModuleSpec &module_spec)
{
+ if (!m_supports_qModuleInfo)
+ return false;
+
std::string module_path = module_file_spec.GetPath (false);
if (module_path.empty ())
return false;
@@ -4299,8 +4304,14 @@ GDBRemoteCommunicationClient::GetModuleInfo (const FileSpec& module_file_spec,
if (SendPacketAndWaitForResponse (packet.GetData(), packet.GetSize(), response, false) != PacketResult::Success)
return false;
- if (response.IsErrorResponse () || response.IsUnsupportedResponse ())
+ if (response.IsErrorResponse ())
+ return false;
+
+ if (response.IsUnsupportedResponse ())
+ {
+ m_supports_qModuleInfo = false;
return false;
+ }
std::string name;
std::string value;
OpenPOWER on IntegriCloud