diff options
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r-- | lldb/source/Target/Platform.cpp | 8 |
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; |