Skip to content

Commit

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

This commit fixes that.
  • Loading branch information
dzhidzhoev authored and aaryanshukla committed Jul 14, 2024
1 parent ebf7645 commit a3b8883
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 a3b8883

Please sign in to comment.