[Lldb-commits] [PATCH] D11163: Use target.exec-search-paths setting when resolving executable path for remote target.
Oleksiy Vyalov
ovyalov at google.com
Tue Jul 14 11:48:08 PDT 2015
ovyalov updated this revision to Diff 29694.
ovyalov added a comment.
Review fixes.
http://reviews.llvm.org/D11163
Files:
source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
source/Plugins/Platform/Linux/PlatformLinux.cpp
source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
Index: source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
===================================================================
--- source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
+++ source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
@@ -139,13 +139,14 @@
// Resolve any executable within an apk on Android?
//Host::ResolveExecutableInBundle (resolved_module_spec.GetFileSpec());
- if (resolved_module_spec.GetFileSpec().Exists())
+ if (resolved_module_spec.GetFileSpec().Exists() ||
+ module_spec.GetUUID().IsValid())
{
if (resolved_module_spec.GetArchitecture().IsValid() || resolved_module_spec.GetUUID().IsValid())
{
error = ModuleList::GetSharedModule (resolved_module_spec,
exe_module_sp,
- NULL,
+ module_search_paths_ptr,
NULL,
NULL);
@@ -161,7 +162,7 @@
{
error = ModuleList::GetSharedModule (resolved_module_spec,
exe_module_sp,
- NULL,
+ module_search_paths_ptr,
NULL,
NULL);
// Did we find an executable using one of the
Index: source/Plugins/Platform/Linux/PlatformLinux.cpp
===================================================================
--- source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -276,7 +276,7 @@
{
if (m_remote_platform_sp)
{
- error = GetCachedExecutable (resolved_module_spec, exe_module_sp, nullptr, *m_remote_platform_sp);
+ error = GetCachedExecutable (resolved_module_spec, exe_module_sp, module_search_paths_ptr, *m_remote_platform_sp);
}
else
{
Index: source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
===================================================================
--- source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -667,7 +667,9 @@
if (module_sp && module_sp->MatchesModuleSpec (module_spec))
return;
- auto error = platform_sp->ResolveExecutable (module_spec, module_sp, nullptr);
+ const auto executable_search_paths (Target::GetDefaultExecutableSearchPaths());
+ auto error = platform_sp->ResolveExecutable (
+ module_spec, module_sp, executable_search_paths.IsEmpty() ? nullptr : &executable_search_paths);
if (error.Fail ())
{
StreamString stream;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11163.29694.patch
Type: text/x-patch
Size: 2913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150714/995b8773/attachment.bin>
More information about the lldb-commits
mailing list