aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/RemoteAwarePlatform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/RemoteAwarePlatform.cpp')
-rw-r--r--lldb/source/Target/RemoteAwarePlatform.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/lldb/source/Target/RemoteAwarePlatform.cpp b/lldb/source/Target/RemoteAwarePlatform.cpp
index 63243d6..5fc2d63 100644
--- a/lldb/source/Target/RemoteAwarePlatform.cpp
+++ b/lldb/source/Target/RemoteAwarePlatform.cpp
@@ -29,6 +29,29 @@ bool RemoteAwarePlatform::GetModuleSpec(const FileSpec &module_file_spec,
return false;
}
+Status RemoteAwarePlatform::ResolveExecutable(
+ const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp,
+ const FileSpecList *module_search_paths_ptr) {
+ ModuleSpec resolved_module_spec(module_spec);
+
+ // The host platform can resolve the path more aggressively.
+ if (IsHost()) {
+ FileSpec &resolved_file_spec = resolved_module_spec.GetFileSpec();
+
+ if (!FileSystem::Instance().Exists(resolved_file_spec)) {
+ resolved_module_spec.GetFileSpec().SetFile(resolved_file_spec.GetPath(),
+ FileSpec::Style::native);
+ FileSystem::Instance().Resolve(resolved_file_spec);
+ }
+
+ if (!FileSystem::Instance().Exists(resolved_file_spec))
+ FileSystem::Instance().ResolveExecutableLocation(resolved_file_spec);
+ }
+
+ return Platform::ResolveExecutable(resolved_module_spec, exe_module_sp,
+ module_search_paths_ptr);
+}
+
Status RemoteAwarePlatform::RunShellCommand(
llvm::StringRef command, const FileSpec &working_dir, int *status_ptr,
int *signo_ptr, std::string *command_output,