diff options
author | 2019-12-07 12:20:07 -0500 | |
---|---|---|
committer | 2019-12-07 12:20:07 -0500 | |
commit | e50ec3ae1dd3633ccce3ae16ef72e0ecebc61271 (patch) | |
tree | e0ae5d9bf9bd6f522121c44316e0a0bef4048d44 /src/emu/debug/debugcmd.cpp | |
parent | df39f376af50bde16db320b4ae748b2687ca40a8 (diff) |
Add cpulist command to debugger
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r-- | src/emu/debug/debugcmd.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index cd9d9dcf743..fa877cafd34 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -169,6 +169,7 @@ debugger_commands::debugger_commands(running_machine& machine, debugger_cpu& cpu m_console.register_command("observe", CMDFLAG_NONE, 0, 0, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_observe, this, _1, _2)); m_console.register_command("suspend", CMDFLAG_NONE, 0, 0, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_suspend, this, _1, _2)); m_console.register_command("resume", CMDFLAG_NONE, 0, 0, MAX_COMMAND_PARAMS, std::bind(&debugger_commands::execute_resume, this, _1, _2)); + m_console.register_command("cpulist", CMDFLAG_NONE, 0, 0, 0, std::bind(&debugger_commands::execute_cpulist, this, _1, _2)); m_console.register_command("comadd", CMDFLAG_NONE, 0, 1, 2, std::bind(&debugger_commands::execute_comment_add, this, _1, _2)); m_console.register_command("//", CMDFLAG_NONE, 0, 1, 2, std::bind(&debugger_commands::execute_comment_add, this, _1, _2)); @@ -1178,6 +1179,21 @@ void debugger_commands::execute_resume(int ref, const std::vector<std::string> & } } +//------------------------------------------------- +// execute_cpulist - list all CPUs +//------------------------------------------------- + +void debugger_commands::execute_cpulist(int ref, const std::vector<std::string> ¶ms) +{ + int index = 0; + for (device_execute_interface &exec : execute_interface_iterator(m_machine.root_device())) + { + device_state_interface *state; + if (exec.device().interface(state) && state->state_find_entry(STATE_GENPCBASE) != nullptr) + m_console.printf("[%s%d] %s\n", &exec.device() == m_cpu.get_visible_cpu() ? "*" : "", index++, exec.device().tag()); + } +} + /*------------------------------------------------- execute_comment - add a comment to a line -------------------------------------------------*/ |