forked from OSchip/llvm-project
parent
15467df982
commit
a64fafc7b6
|
@ -692,7 +692,7 @@ void DarwinLogCollector::CancelActivityStream() {
|
|||
|
||||
DNBLogThreadedIf(LOG_DARWIN_LOG, "DarwinLogCollector::%s(): canceling "
|
||||
"activity stream %p",
|
||||
__FUNCTION__, m_activity_stream);
|
||||
__FUNCTION__, reinterpret_cast<void *>(m_activity_stream));
|
||||
(*s_os_activity_stream_cancel)(m_activity_stream);
|
||||
m_activity_stream = nullptr;
|
||||
}
|
||||
|
|
|
@ -1269,7 +1269,7 @@ bool MachProcess::Interrupt() {
|
|||
bool MachProcess::Signal(int signal, const struct timespec *timeout_abstime) {
|
||||
DNBLogThreadedIf(LOG_PROCESS,
|
||||
"MachProcess::Signal (signal = %d, timeout = %p)", signal,
|
||||
timeout_abstime);
|
||||
reinterpret_cast<const void *>(timeout_abstime));
|
||||
nub_state_t state = GetState();
|
||||
if (::kill(ProcessID(), signal) == 0) {
|
||||
// If we were running and we have a timeout, wait for the signal to stop
|
||||
|
@ -1277,20 +1277,21 @@ bool MachProcess::Signal(int signal, const struct timespec *timeout_abstime) {
|
|||
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Signal (signal = %d, timeout "
|
||||
"= %p) waiting for signal to stop "
|
||||
"process...",
|
||||
signal, timeout_abstime);
|
||||
signal, reinterpret_cast<const void *>(timeout_abstime));
|
||||
m_private_events.WaitForSetEvents(eEventProcessStoppedStateChanged,
|
||||
timeout_abstime);
|
||||
state = GetState();
|
||||
DNBLogThreadedIf(
|
||||
LOG_PROCESS,
|
||||
"MachProcess::Signal (signal = %d, timeout = %p) state = %s", signal,
|
||||
timeout_abstime, DNBStateAsString(state));
|
||||
reinterpret_cast<const void *>(timeout_abstime),
|
||||
DNBStateAsString(state));
|
||||
return !IsRunning(state);
|
||||
}
|
||||
DNBLogThreadedIf(
|
||||
LOG_PROCESS,
|
||||
"MachProcess::Signal (signal = %d, timeout = %p) not waiting...",
|
||||
signal, timeout_abstime);
|
||||
signal, reinterpret_cast<const void *>(timeout_abstime));
|
||||
return true;
|
||||
}
|
||||
DNBError err(errno, DNBError::POSIX);
|
||||
|
@ -1596,7 +1597,8 @@ DNBBreakpoint *MachProcess::CreateBreakpoint(nub_addr_t addr, nub_size_t length,
|
|||
if (EnableBreakpoint(addr)) {
|
||||
DNBLogThreadedIf(LOG_BREAKPOINTS, "MachProcess::CreateBreakpoint ( addr = "
|
||||
"0x%8.8llx, length = %llu) => %p",
|
||||
(uint64_t)addr, (uint64_t)length, bp);
|
||||
(uint64_t)addr, (uint64_t)length,
|
||||
reinterpret_cast<void *>(bp));
|
||||
return bp;
|
||||
} else if (bp->Release() == 0) {
|
||||
m_breakpoints.Remove(addr);
|
||||
|
@ -1627,7 +1629,8 @@ DNBBreakpoint *MachProcess::CreateWatchpoint(nub_addr_t addr, nub_size_t length,
|
|||
if (EnableWatchpoint(addr)) {
|
||||
DNBLogThreadedIf(LOG_WATCHPOINTS, "MachProcess::CreateWatchpoint ( addr = "
|
||||
"0x%8.8llx, length = %llu) => %p",
|
||||
(uint64_t)addr, (uint64_t)length, wp);
|
||||
(uint64_t)addr, (uint64_t)length,
|
||||
reinterpret_cast<void *>(wp));
|
||||
return wp;
|
||||
} else {
|
||||
DNBLogThreadedIf(LOG_WATCHPOINTS, "MachProcess::CreateWatchpoint ( addr = "
|
||||
|
@ -2156,7 +2159,7 @@ void MachProcess::AppendSTDOUT(char *s, size_t len) {
|
|||
|
||||
size_t MachProcess::GetAvailableSTDOUT(char *buf, size_t buf_size) {
|
||||
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::%s (&%p[%llu]) ...", __FUNCTION__,
|
||||
buf, (uint64_t)buf_size);
|
||||
reinterpret_cast<void *>(buf), (uint64_t)buf_size);
|
||||
PTHREAD_MUTEX_LOCKER(locker, m_stdio_mutex);
|
||||
size_t bytes_available = m_stdout_data.size();
|
||||
if (bytes_available > 0) {
|
||||
|
@ -2316,7 +2319,7 @@ void MachProcess::SignalAsyncProfileData(const char *info) {
|
|||
|
||||
size_t MachProcess::GetAsyncProfileData(char *buf, size_t buf_size) {
|
||||
DNBLogThreadedIf(LOG_PROCESS, "MachProcess::%s (&%p[%llu]) ...", __FUNCTION__,
|
||||
buf, (uint64_t)buf_size);
|
||||
reinterpret_cast<void *>(buf), (uint64_t)buf_size);
|
||||
PTHREAD_MUTEX_LOCKER(locker, m_profile_data_mutex);
|
||||
if (m_profile_data.empty())
|
||||
return 0;
|
||||
|
@ -2839,9 +2842,12 @@ pid_t MachProcess::LaunchForDebug(
|
|||
// Clear out and clean up from any current state
|
||||
Clear();
|
||||
|
||||
DNBLogThreadedIf(LOG_PROCESS, "%s( path = '%s', argv = %p, envp = %p, "
|
||||
"launch_flavor = %u, disable_aslr = %d )",
|
||||
__FUNCTION__, path, argv, envp, launch_flavor, disable_aslr);
|
||||
DNBLogThreadedIf(LOG_PROCESS,
|
||||
"%s( path = '%s', argv = %p, envp = %p, "
|
||||
"launch_flavor = %u, disable_aslr = %d )",
|
||||
__FUNCTION__, path, reinterpret_cast<const void *>(argv),
|
||||
reinterpret_cast<const void *>(envp), launch_flavor,
|
||||
disable_aslr);
|
||||
|
||||
// Fork a child process for debugging
|
||||
SetState(eStateLaunching);
|
||||
|
@ -2984,7 +2990,8 @@ pid_t MachProcess::PosixSpawnChildForPTraceDebugging(
|
|||
DNBLogThreadedIf(LOG_PROCESS, "%s ( path='%s', argv=%p, envp=%p, "
|
||||
"working_dir=%s, stdin=%s, stdout=%s "
|
||||
"stderr=%s, no-stdio=%i)",
|
||||
__FUNCTION__, path, argv, envp, working_directory,
|
||||
__FUNCTION__, path, reinterpret_cast<const void *>(argv),
|
||||
reinterpret_cast<const void *>(envp), working_directory,
|
||||
stdin_path, stdout_path, stderr_path, no_stdio);
|
||||
|
||||
err.SetError(::posix_spawnattr_init(&attr), DNBError::POSIX);
|
||||
|
|
|
@ -50,7 +50,7 @@ MachThread::MachThread(MachProcess *process, bool is_64_bit,
|
|||
DNBLogThreadedIf(LOG_THREAD | LOG_VERBOSE,
|
||||
"MachThread::MachThread ( process = %p, tid = 0x%8.8" PRIx64
|
||||
", seq_id = %u )",
|
||||
&m_process, m_unique_id, m_seq_id);
|
||||
reinterpret_cast<void *>(&m_process), m_unique_id, m_seq_id);
|
||||
}
|
||||
|
||||
MachThread::~MachThread() {
|
||||
|
|
Loading…
Reference in New Issue