Octalize watchpoint hit message for memory spaces defined as octal

This commit is contained in:
AJR 2021-08-27 11:47:49 -04:00
parent aa4ca64ecb
commit aef90f0db9

View File

@ -371,19 +371,29 @@ void debug_watchpoint::triggered(read_or_write type, offs_t address, u64 data, u
{ {
std::string buffer; std::string buffer;
buffer = string_format(type == read_or_write::READ ? if (m_space.is_octal())
"Stopped at watchpoint %X reading %0*X from %08X" : buffer = string_format(type == read_or_write::READ ?
"Stopped at watchpoint %X writing %0*X to %08X", "Stopped at watchpoint %X reading %0*o from %0*o" :
m_index, "Stopped at watchpoint %X writing %0*o to %0*o",
size * unit_size / 4, m_index,
data, (size * unit_size + 2) / 3,
address); data,
(m_space.addr_width() + 2) / 3,
address);
else
buffer = string_format(type == read_or_write::READ ?
"Stopped at watchpoint %X reading %0*X from %0*X" :
"Stopped at watchpoint %X writing %0*X to %0*X",
m_index,
size * unit_size / 4,
data,
m_space.addr_width() / 4,
address);
const device_state_interface *state; const device_state_interface *state;
if (debug.cpu().live_cpu() == &m_debugInterface->device() && m_debugInterface->device().interface(state)) if (debug.cpu().live_cpu() == &m_debugInterface->device() && m_debugInterface->device().interface(state))
{ {
offs_t pc = state->pcbase(); debug.console().printf("%s (PC=%s)\n", buffer, state->state_string(STATE_GENPCBASE));
debug.console().printf("%s (PC=%X)\n", buffer, pc);
m_debugInterface->compute_debug_flags(); m_debugInterface->compute_debug_flags();
} }
else if (!was_stopped) else if (!was_stopped)