summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/DNB.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-01-22 23:43:18 +0000
committerGreg Clayton <gclayton@apple.com>2011-01-22 23:43:18 +0000
commit6779606a7c4853a32b19439c65a808a7dd3cb3ae (patch)
tree86d2fd8d304faa2a9f376049c758c47b38de2f39 /lldb/tools/debugserver/source/DNB.cpp
parent5a72fdb05b6474d02bc22444240d6b7fc7acb6fe (diff)
downloadbcm5719-llvm-6779606a7c4853a32b19439c65a808a7dd3cb3ae.tar.gz
bcm5719-llvm-6779606a7c4853a32b19439c65a808a7dd3cb3ae.zip
Fixed an issue in "SBError SBProcess::Destroy ()" where it wasn't properly
checking the validity of the shared pointer prior to using it. Fixed the GDB remote plug-in to once again watch for a reply from the "k" packet, and fixed the logic to make sure the thread requesting the kill and the async thread play nice (and very quickly) by synchronizing the packet sending and reply. I also tweaked some of the shut down packet ("k" kill, "D" detach, and the halt packet) to make sure they do the right thing. Fixed "StateType Process::WaitForProcessStopPrivate (...)" to correctly pass the timeout along to WaitForStateChangedEventsPrivate() and made the function behave correctly with respect to timing out. Added separate STDIN, STDOUT, and STDERR support to debugserver. Also added the start of being able to set the working directory for the inferior process. llvm-svn: 124049
Diffstat (limited to 'lldb/tools/debugserver/source/DNB.cpp')
-rw-r--r--lldb/tools/debugserver/source/DNB.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp
index 0a8eb59b114..92cdf582039 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -175,7 +175,10 @@ nub_process_t
DNBProcessLaunch (const char *path,
char const *argv[],
const char *envp[],
- const char *stdio_path,
+ const char *working_directory, // NULL => dont' change, non-NULL => set working directory for inferior to this
+ const char *stdin_path,
+ const char *stdout_path,
+ const char *stderr_path,
bool no_stdio,
nub_launch_flavor_t launch_flavor,
int disable_aslr,
@@ -199,7 +202,17 @@ DNBProcessLaunch (const char *path,
if (processSP.get())
{
DNBError launch_err;
- pid_t pid = processSP->LaunchForDebug(path, argv, envp, stdio_path, no_stdio, launch_flavor, disable_aslr, launch_err);
+ pid_t pid = processSP->LaunchForDebug (path,
+ argv,
+ envp,
+ working_directory,
+ stdin_path,
+ stdout_path,
+ stderr_path,
+ no_stdio,
+ launch_flavor,
+ disable_aslr,
+ launch_err);
if (err_str)
{
*err_str = '\0';
OpenPOWER on IntegriCloud