Date: Wed, 23 Jul 2014 19:37:24 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r269025 - stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX Message-ID: <201407231937.s6NJbOEW034802@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Jul 23 19:37:24 2014 New Revision: 269025 URL: http://svnweb.freebsd.org/changeset/base/269025 Log: 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 Modified: stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp ============================================================================== --- stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Wed Jul 23 19:35:02 2014 (r269024) +++ stable/10/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Wed Jul 23 19:37:24 2014 (r269025) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407231937.s6NJbOEW034802>