summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Platform.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-11-17 04:46:02 +0000
committerGreg Clayton <gclayton@apple.com>2011-11-17 04:46:02 +0000
commite24c4acf6cd5ecbfed993c3b598dbc2fe24ab7ab (patch)
treedced64b42d76833da5cbbbc9da056f4c23fc57b2 /lldb/source/Target/Platform.cpp
parent857f9d6e5eef4efe9a9df1fd22f20210eeac5fc6 (diff)
downloadbcm5719-llvm-e24c4acf6cd5ecbfed993c3b598dbc2fe24ab7ab.tar.gz
bcm5719-llvm-e24c4acf6cd5ecbfed993c3b598dbc2fe24ab7ab.zip
Fixed the issue that was causing our monitor process threads to crash, it
turned out to be unitialized data in the ProcessLaunchInfo default constructor. Turning on MallocScribble in the environment helped track this down. When we launch and attach using the host layer, we now inform the process that it shouldn't detach when by calling an accessor. llvm-svn: 144882
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r--lldb/source/Target/Platform.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 3b780428836..dbd4e405809 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -581,6 +581,14 @@ Platform::DebugProcess (ProcessLaunchInfo &launch_info,
{
ProcessAttachInfo attach_info (launch_info);
process_sp = Attach (attach_info, debugger, target, listener, error);
+ if (process_sp)
+ {
+ // Since we attached to the process, it will think it needs to detach
+ // if the process object just goes away without an explicit call to
+ // Process::Kill() or Process::Detach(), so let it know to kill the
+ // process if this happens.
+ process_sp->SetShouldDetach (false);
+ }
}
}
return process_sp;
OpenPOWER on IntegriCloud