summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-07-23 19:37:24 +0000
committeremaste <emaste@FreeBSD.org>2014-07-23 19:37:24 +0000
commit85a76dca417dfd2a3df49fd95644ec03d97d379b (patch)
tree8b0e28de9f99046403754efc395e9008e23d63b1 /contrib/llvm/tools
parentaa794b38fedea0f2e99519975acab0b289714b41 (diff)
downloadFreeBSD-src-85a76dca417dfd2a3df49fd95644ec03d97d379b.zip
FreeBSD-src-85a76dca417dfd2a3df49fd95644ec03d97d379b.tar.gz
MFC r263678: lldb: Invoke PT_KILL from ProcessPosix::DoDestroy
We previously sent SIGKILL to the debuggee in DoDestroy, but did not actually detach or kill via ptrace. It seems that this somehow didn't matter on Linux, but did on FreeBSD. This would happen when quitting LLDB while stopped at a breakpoint, for example. The debuggee remained stopped in ptrace (with the signal either pending or lost). After a timeout of a second or two LLDB exits, which caused the debuggee to resume and dump core from an unhandled SIGTRAP. BringProcessIntoLimbo is a poorly named wrapper for ptrace(PT_KILL) which is the desired behaviour from DoDestroy. http://llvm.org/pr18894 Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools')
-rw-r--r--contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
index 6239462..1a8bf89 100644
--- a/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
+++ b/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
@@ -335,11 +335,9 @@ ProcessPOSIX::DoDestroy()
if (!HasExited())
{
- // Drive the exit event to completion (do not keep the inferior in
- // limbo).
+ assert (m_monitor);
m_exit_now = true;
-
- if ((m_monitor == NULL || kill(m_monitor->GetPID(), SIGKILL)) && error.Success())
+ if (m_monitor->BringProcessIntoLimbo())
{
error.SetErrorToErrno();
return error;
OpenPOWER on IntegriCloud