[Lldb-commits] [lldb] r242183 - Use target.exec-search-paths setting when resolving executable path for remote target.
Oleksiy Vyalov
ovyalov at google.com
Tue Jul 14 11:59:32 PDT 2015
Author: ovyalov
Date: Tue Jul 14 13:59:32 2015
New Revision: 242183
URL: http://llvm.org/viewvc/llvm-project?rev=242183&view=rev
Log:
Use target.exec-search-paths setting when resolving executable path for remote target.
http://reviews.llvm.org/D11163
Modified:
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=242183&r1=242182&r2=242183&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Tue Jul 14 13:59:32 2015
@@ -667,7 +667,9 @@ DynamicLoaderPOSIXDYLD::ResolveExecutabl
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() ? &executable_search_paths : nullptr);
if (error.Fail ())
{
StreamString stream;
Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=242183&r1=242182&r2=242183&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Tue Jul 14 13:59:32 2015
@@ -276,7 +276,7 @@ PlatformLinux::ResolveExecutable (const
{
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
{
Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=242183&r1=242182&r2=242183&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Tue Jul 14 13:59:32 2015
@@ -141,13 +141,14 @@ PlatformRemoteGDBServer::ResolveExecutab
// 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);
@@ -163,7 +164,7 @@ PlatformRemoteGDBServer::ResolveExecutab
{
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
More information about the lldb-commits
mailing list