Added the ability to set the Platform path for a module through the SBModule
interface.
Added a quick way to set the platform though the SBDebugger interface. I will
actually an a SBPlatform support soon, but for now this will do.
ConnectionFileDescriptor can be passed a url formatted as: "fd://<fd>" where
<fd> is a file descriptor in the current process. This is handy if you have
services, deamons, or other tools that can spawn processes and give you a
file handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130565 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Process.cpp b/source/Target/Process.cpp
index 5ad5ac2..8e96c71 100644
--- a/source/Target/Process.cpp
+++ b/source/Target/Process.cpp
@@ -2065,8 +2065,10 @@
Module *exe_module = m_target.GetExecutableModule().get();
if (exe_module)
{
- char exec_file_path[PATH_MAX];
- exe_module->GetFileSpec().GetPath(exec_file_path, sizeof(exec_file_path));
+ char local_exec_file_path[PATH_MAX];
+ char platform_exec_file_path[PATH_MAX];
+ exe_module->GetFileSpec().GetPath(local_exec_file_path, sizeof(local_exec_file_path));
+ exe_module->GetPlatformFileSpec().GetPath(platform_exec_file_path, sizeof(platform_exec_file_path));
if (exe_module->GetFileSpec().Exists())
{
if (PrivateStateThreadIsValid ())
@@ -2089,7 +2091,7 @@
// Make a new argument vector
std::vector<const char *> exec_path_plus_argv;
// Append the resolved executable path
- exec_path_plus_argv.push_back (exec_file_path);
+ exec_path_plus_argv.push_back (platform_exec_file_path);
// Push all args if there are any
if (argv)
@@ -2156,7 +2158,7 @@
}
else
{
- error.SetErrorStringWithFormat("File doesn't exist: '%s'.\n", exec_file_path);
+ error.SetErrorStringWithFormat("File doesn't exist: '%s'.\n", local_exec_file_path);
}
}
return error;