mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 01:55:08 +00:00
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> llvm-svn: 356626
This commit is contained in:
parent
db5edebea2
commit
9d760a0a76
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user