diff options
| author | Jason Molenda <jmolenda@apple.com> | 2013-01-05 06:08:51 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2013-01-05 06:08:51 +0000 |
| commit | 153c8e0cc2a96368ac4f16e6ded1e0cf33110cb7 (patch) | |
| tree | f5f04b8fae98054aa223a8f776194d0fd5e3d2c4 /lldb/tools/debugserver | |
| parent | a76a7c902ad4daa8b8d20f73ee2ed5e6f3d63d9b (diff) | |
| download | bcm5719-llvm-153c8e0cc2a96368ac4f16e6ded1e0cf33110cb7.tar.gz bcm5719-llvm-153c8e0cc2a96368ac4f16e6ded1e0cf33110cb7.zip | |
<rdar://problem/12602653>
Add unconditional logging messages to every place in debugserver
where we send a SIGKILL signal or do a ptrace PT_KILL call to
terminate the inferior process. When the debuggee is silently
killed off, the console logging from debugserver can disambiguate
whether debugserver killed off the process because it failed to
completely set it up, becuase it was told to (via the "k" packet),
or if some external daemon killed it.
llvm-svn: 171606
Diffstat (limited to 'lldb/tools/debugserver')
| -rw-r--r-- | lldb/tools/debugserver/source/DNB.cpp | 1 | ||||
| -rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachProcess.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index c0e2fcec5a6..5d0cdfb7c88 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -255,6 +255,7 @@ DNBProcessLaunch (const char *path, // We failed to get the task for our process ID which is bad. // Kill our process otherwise it will be stopped at the entry // point and get reparented to someone else and never go away. + DNBLog ("Could not get task port for process, sending SIGKILL and exiting."); kill (SIGKILL, pid); if (err_str && err_len > 0) diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp index f17bf444f7f..a7ab89206db 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp @@ -364,6 +364,7 @@ MachProcess::Kill (const struct timespec *timeout_abstime) nub_state_t state = DoSIGSTOP(true, false, NULL); DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Kill() DoSIGSTOP() state = %s", DNBStateAsString(state)); errno = 0; + DNBLog ("Sending ptrace PT_KILL to terminate inferior process."); ::ptrace (PT_KILL, m_pid, 0, 0); DNBError err; err.SetErrorToErrno(); @@ -1690,6 +1691,7 @@ MachProcess::LaunchForDebug { if (launch_err.AsString() == NULL) launch_err.SetErrorString("unable to start the exception thread"); + DNBLog ("Could not get inferior's Mach exception port, sending ptrace PT_KILL and exiting."); ::ptrace (PT_KILL, m_pid, 0, 0); m_pid = INVALID_NUB_PROCESS; return INVALID_NUB_PROCESS; @@ -2030,6 +2032,7 @@ MachProcess::SBLaunchForDebug (const char *path, char const *argv[], char const { if (launch_err.AsString() == NULL) launch_err.SetErrorString("unable to start the exception thread"); + DNBLog ("Could not get inferior's Mach exception port, sending ptrace PT_KILL and exiting."); ::ptrace (PT_KILL, m_pid, 0, 0); m_pid = INVALID_NUB_PROCESS; return INVALID_NUB_PROCESS; |

