summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index 74e28639180..3e9ad7c3fdb 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -1144,12 +1144,7 @@ GDBRemoteCommunicationServerCommon::Handle_qModuleInfo (StringExtractorGDBRemote
packet.GetHexByteString(triple);
ArchSpec arch(triple.c_str());
-#ifdef __ANDROID__
- const FileSpec module_path_spec = HostInfoAndroid::ResolveLibraryPath(module_path, arch);
-#else
- const FileSpec module_path_spec(module_path.c_str(), true);
-#endif
-
+ const FileSpec module_path_spec = FindModuleFile(module_path, arch);
const ModuleSpec module_spec(module_path_spec, arch);
ModuleSpecList module_specs;
@@ -1293,3 +1288,14 @@ GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle (
response.PutCString ("ptrsize:2;");
}
}
+
+FileSpec
+GDBRemoteCommunicationServerCommon::FindModuleFile(const std::string& module_path,
+ const ArchSpec& arch)
+{
+#ifdef __ANDROID__
+ return HostInfoAndroid::ResolveLibraryPath(module_path, arch);
+#else
+ return FileSpec(module_path.c_str(), true);
+#endif
+}
OpenPOWER on IntegriCloud