Skip to content

Commit 73dad7a

Browse files
authored
[LLDB] Fix remote executables load and caching (#98623)
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.
1 parent b96c012 commit 73dad7a

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)