summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/debug/debugcon.cpp')
-rw-r--r--src/emu/debug/debugcon.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp
index 55edea82c46..692c7945445 100644
--- a/src/emu/debug/debugcon.cpp
+++ b/src/emu/debug/debugcon.cpp
@@ -35,6 +35,7 @@
debugger_console::debugger_console(running_machine &machine)
: m_machine(machine)
+ , m_visiblecpu(nullptr)
, m_console_textbuf(nullptr)
, m_errorlog_textbuf(nullptr)
, m_logfile(nullptr)
@@ -64,6 +65,17 @@ debugger_console::debugger_console(running_machine &machine)
/* register our own custom-command help */
register_command("helpcustom", CMDFLAG_NONE, 0, 0, 0, std::bind(&debugger_console::execute_help_custom, this, _1, _2));
+
+ /* first CPU is visible by default */
+ for (device_t &device : device_iterator(m_machine.root_device()))
+ {
+ auto *cpu = dynamic_cast<cpu_device *>(&device);
+ if (cpu != nullptr)
+ {
+ m_visiblecpu = cpu;
+ break;
+ }
+ }
}
@@ -128,6 +140,18 @@ void debugger_console::execute_help_custom(int ref, const std::vector<std::strin
}
+//-------------------------------------------------
+// visible_symtable - return the locally-visible
+// symbol table
+//-------------------------------------------------
+
+symbol_table &debugger_console::visible_symtable()
+{
+ return m_visiblecpu->debug()->symtable();
+}
+
+
+
/*-------------------------------------------------
trim_parameter - executes a
command
@@ -341,7 +365,7 @@ CMDERR debugger_console::internal_parse_command(const std::string &original_comm
{
try
{
- parsed_expression(m_machine.debugger().cpu().visible_symtable(), command_start).execute();
+ parsed_expression(visible_symtable(), command_start).execute();
}
catch (expression_error &err)
{