summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-04-30 01:09:13 +0000
committerGreg Clayton <gclayton@apple.com>2011-04-30 01:09:13 +0000
commit2289fa48209997bbda285c8ba2f25fa0f4eac39f (patch)
tree9923690777bc045d842494ee8a206c91ce1810eb /lldb/source/Target/Process.cpp
parent3909e037abf5d411c2cdbf0b5ec7d8a0f1dffdc9 (diff)
downloadbcm5719-llvm-2289fa48209997bbda285c8ba2f25fa0f4eac39f.tar.gz
bcm5719-llvm-2289fa48209997bbda285c8ba2f25fa0f4eac39f.zip
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. llvm-svn: 130565
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 5ad5ac22445..8e96c716e74 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2065,8 +2065,10 @@ Process::Launch
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 @@ Process::Launch
// 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 @@ Process::Launch
}
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;
OpenPOWER on IntegriCloud