Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Mar 2014 01:21:37 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263678 - head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX
Message-ID:  <201403240121.s2O1Lbkd005016@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Mar 24 01:21:37 2014
New Revision: 263678
URL: http://svnweb.freebsd.org/changeset/base/263678

Log:
  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:
  head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp

Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
==============================================================================
--- head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp	Mon Mar 24 00:50:12 2014	(r263677)
+++ head/contrib/llvm/tools/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp	Mon Mar 24 01:21:37 2014	(r263678)
@@ -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?201403240121.s2O1Lbkd005016>