[Lldb-commits] [lldb] r356626 - Change the logging on ptrace(PT_KILL) in MachProcess::Kill to log
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 20 15:59:17 PDT 2019
Author: jmolenda
Date: Wed Mar 20 15:59:16 2019
New Revision: 356626
URL: http://llvm.org/viewvc/llvm-project?rev=356626&view=rev
Log:
Change the logging on ptrace(PT_KILL) in MachProcess::Kill to log
if LOG_PROCESS is enabled or if there was an error making that call.
<rdar://problem/49036508>
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=356626&r1=356625&r2=356626&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Wed Mar 20 15:59:16 2019
@@ -1290,9 +1290,11 @@ bool MachProcess::Kill(const struct time
::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();
More information about the lldb-commits
mailing list