Skip to content

Commit b86d6f9

Browse files
committed
[LLDB] Fix remote executables load and caching
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.
1 parent c471d36 commit b86d6f9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lldb/source/Target/Platform.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,8 @@ Platform::GetCachedExecutable(ModuleSpec &module_spec,
14461446
Status error = GetRemoteSharedModule(
14471447
module_spec, nullptr, module_sp,
14481448
[&](const ModuleSpec &spec) {
1449-
return ResolveExecutable(spec, module_sp, module_search_paths_ptr);
1449+
return Platform::ResolveExecutable(spec, module_sp,
1450+
module_search_paths_ptr);
14501451
},
14511452
nullptr);
14521453
if (error.Success()) {

lldb/source/Target/RemoteAwarePlatform.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ Status RemoteAwarePlatform::ResolveExecutable(
4646

4747
if (!FileSystem::Instance().Exists(resolved_file_spec))
4848
FileSystem::Instance().ResolveExecutableLocation(resolved_file_spec);
49+
} else if (m_remote_platform_sp) {
50+
return GetCachedExecutable(resolved_module_spec, exe_module_sp,
51+
module_search_paths_ptr);
4952
}
5053

5154
return Platform::ResolveExecutable(resolved_module_spec, exe_module_sp,

0 commit comments

Comments
 (0)