void MachException::Data::DumpStopReason() const { int soft_signal = SoftSignal(); if (soft_signal) { const char *signal_str = SysSignal::Name(soft_signal); if (signal_str) DNBLog("signal(%s)", signal_str); else DNBLog("signal(%i)", soft_signal); return; } DNBLog("%s", Name(exc_type)); }
void MachThread::DumpRegisterState(int regSet) { if (regSet == REGISTER_SET_ALL) { for (regSet = 1; regSet < n_num_reg_sets; regSet++) DumpRegisterState(regSet); } else { if (m_arch_ap->RegisterSetStateIsValid(regSet)) { const size_t numRegisters = GetNumRegistersInSet(regSet); size_t regIndex = 0; DNBRegisterValueClass reg; for (regIndex = 0; regIndex < numRegisters; ++regIndex) { if (m_arch_ap->GetRegisterValue(regSet, regIndex, ®)) { reg.Dump(NULL, NULL); } } } else { DNBLog("%s: registers are not currently valid.", GetRegisterSetName(regSet)); } } }
rnb_err_t RNBSocket::ConnectToService() { DNBLog("Connecting to com.apple.%s service...", DEBUGSERVER_PROGRAM_NAME); // Disconnect from any previous connections Disconnect(false); m_fd = ::lockdown_checkin (NULL, NULL); if (m_fd == -1) { DNBLogThreadedIf(LOG_RNB_COMM, "::lockdown_checkin(NULL, NULL) failed"); return rnb_not_connected; } m_fd_from_lockdown = true; return rnb_success; }