summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachProcess.mm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index ca68339d782..15a347778cf 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -1290,9 +1290,11 @@ bool MachProcess::Kill(const struct timespec *timeout_abstime) {
::ptrace(PT_KILL, m_pid, 0, 0);
DNBError err;
err.SetErrorToErrno();
- DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Kill() DoSIGSTOP() ::ptrace "
- "(PT_KILL, pid=%u, 0, 0) => 0x%8.8x (%s)",
- m_pid, err.Status(), err.AsString());
+ if (DNBLogCheckLogBit(LOG_PROCESS) || err.Fail()) {
+ err.LogThreaded("MachProcess::Kill() DoSIGSTOP() ::ptrace "
+ "(PT_KILL, pid=%u, 0, 0) => 0x%8.8x (%s)",
+ m_pid, err.Status(), err.AsString());
+ }
m_thread_actions = DNBThreadResumeActions(eStateRunning, 0);
PrivateResume();
OpenPOWER on IntegriCloud