Merge pull request #2155 from shattered/_9330d35

debugger: print octal addresses in the trace if CPU is octal.
This commit is contained in:
R. Belmont 2017-03-19 08:40:08 -04:00 committed by GitHub
commit 49a67f2eea
2 changed files with 9 additions and 1 deletions

View File

@ -3318,7 +3318,14 @@ void device_debug::tracer::update(offs_t pc)
// print the address
std::string buffer;
int logaddrchars = m_debug.logaddrchars();
buffer = string_format("%0*X: ", logaddrchars, pc);
if (m_debug.is_octal())
{
buffer = string_format("%0*o: ", logaddrchars*3/2, pc);
}
else
{
buffer = string_format("%0*X: ", logaddrchars, pc);
}
// print the disassembly
std::string dasm;

View File

@ -171,6 +171,7 @@ public:
// commonly-used pass-throughs
int logaddrchars() const { return (m_memory != nullptr && m_memory->has_space(AS_PROGRAM)) ? m_memory->space(AS_PROGRAM).logaddrchars() : 8; }
bool is_octal() const { return (m_memory != nullptr && m_memory->has_space(AS_PROGRAM)) ? m_memory->space(AS_PROGRAM).is_octal() : false; }
device_t& device() const { return m_device; }
// hooks used by the rest of the system