Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/emu/debug/debugcpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,16 +575,21 @@ device_debug::device_debug(device_t &device)
}

// Use own table for CPU and the global for others
symbol_table *symtable = m_symtable != nullptr ? m_symtable.get() : &device.machine().debugger().cpu().global_symtable();
const bool is_exec_syms = m_symtable != nullptr;
symbol_table *symtable = is_exec_syms ? m_symtable.get() : &device.machine().debugger().cpu().global_symtable();

// add all registers into it
std::string sym_name_prefix = "";
for (auto d = &device; !is_exec_syms && d->owner() != nullptr; d = d->owner())
sym_name_prefix = std::string(d->tag()).substr(1) + "_" + sym_name_prefix;

for (const auto &entry : m_state->state_entries())
{
// TODO: floating point registers
if (!entry->is_float())
{
using namespace std::placeholders;
std::string tempstr(strmakelower(entry->symbol()));
std::string tempstr(sym_name_prefix + strmakelower(entry->symbol()));
symtable->add(
tempstr.c_str(),
std::bind(&device_state_entry::value, entry.get()),
Expand Down
Loading