Skip to content

Commit

Permalink
[LLDB] Fix remote executables load and caching (#98623)
Browse files Browse the repository at this point in the history
Seemingly, #96256 removed the only call to
Platform::GetCachedExecutable, which broke the resolution of executable
modules in the remote debugging mode
(#97410).

This commit fixes that.
  • Loading branch information
dzhidzhoev authored Jul 12, 2024
1 parent b96c012 commit 73dad7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lldb/source/Target/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,8 @@ Platform::GetCachedExecutable(ModuleSpec &module_spec,
Status error = GetRemoteSharedModule(
module_spec, nullptr, module_sp,
[&](const ModuleSpec &spec) {
return ResolveExecutable(spec, module_sp, module_search_paths_ptr);
return Platform::ResolveExecutable(spec, module_sp,
module_search_paths_ptr);
},
nullptr);
if (error.Success()) {
Expand Down
3 changes: 3 additions & 0 deletions lldb/source/Target/RemoteAwarePlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ Status RemoteAwarePlatform::ResolveExecutable(

if (!FileSystem::Instance().Exists(resolved_file_spec))
FileSystem::Instance().ResolveExecutableLocation(resolved_file_spec);
} else if (m_remote_platform_sp) {
return GetCachedExecutable(resolved_module_spec, exe_module_sp,
module_search_paths_ptr);
}

return Platform::ResolveExecutable(resolved_module_spec, exe_module_sp,
Expand Down

0 comments on commit 73dad7a

Please sign in to comment.