summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-03-10 01:15:28 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-03-10 01:15:28 +0000
commit63acdfdeb26616dfa1d9657fa666afc9b9440a2a (patch)
treee16c9b93f68e2a5ddd835845a4801ec1dead78c5 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
parent8fb05ac9987bb2fe210e3d0d02ef762793524c45 (diff)
downloadbcm5719-llvm-63acdfdeb26616dfa1d9657fa666afc9b9440a2a.tar.gz
bcm5719-llvm-63acdfdeb26616dfa1d9657fa666afc9b9440a2a.zip
Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer - in order to allow modules caching from remote targets.
http://reviews.llvm.org/D8037 llvm-svn: 231734
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index e2b459196a7..389608e5ed9 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -19,7 +19,6 @@
// Other libraries and framework includes
#include "llvm/ADT/Triple.h"
#include "lldb/Core/Log.h"
-#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/StreamGDBRemote.h"
#include "lldb/Core/StreamString.h"
@@ -1149,19 +1148,16 @@ GDBRemoteCommunicationServerCommon::Handle_qModuleInfo (StringExtractorGDBRemote
if (!module_specs.FindMatchingModuleSpec(module_spec, matched_module_spec))
return SendErrorResponse (4);
- const ModuleSP module(new Module(matched_module_spec));
-
- const auto obj_file(module->GetObjectFile());
- const auto file_offset = obj_file->GetFileOffset();
- const auto file_size = obj_file->GetByteSize();
+ const auto file_offset = matched_module_spec.GetObjectOffset();
+ const auto file_size = matched_module_spec.GetObjectSize();
+ const auto uuid_str = matched_module_spec.GetUUID().GetAsString("");
StreamGDBRemote response;
- const auto uuid_str = module->GetUUID().GetAsString();
if (uuid_str.empty())
{
std::string md5_hash;
- if (!FileSystem::CalculateMD5AsString(module_path_spec, file_offset, file_size, md5_hash))
+ if (!FileSystem::CalculateMD5AsString(matched_module_spec.GetFileSpec(), file_offset, file_size, md5_hash))
return SendErrorResponse (5);
response.PutCString ("md5:");
response.PutCStringAsRawHex8(md5_hash.c_str());
OpenPOWER on IntegriCloud