From a714997f439ed763fff423b95ea3243ea1245f61 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Sat, 23 Jun 2018 22:41:01 +0700 Subject: [PATCH] debugger: add command for go_exception (#3682) --- src/emu/debug/debugcmd.cpp | 17 +++++++++++++++++ src/emu/debug/debugcmd.h | 1 + src/emu/debug/debughlp.cpp | 1 + 3 files changed, 19 insertions(+) diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index c0ef82c8d36..cc3b8d4c481 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -156,6 +156,8 @@ debugger_commands::debugger_commands(running_machine& machine, debugger_cpu& cpu m_console.register_command("gv", CMDFLAG_NONE, 0, 0, 0, std::bind(&debugger_commands::execute_go_vblank, this, _1, _2)); m_console.register_command("gint", CMDFLAG_NONE, 0, 0, 1, std::bind(&debugger_commands::execute_go_interrupt, this, _1, _2)); m_console.register_command("gi", CMDFLAG_NONE, 0, 0, 1, std::bind(&debugger_commands::execute_go_interrupt, this, _1, _2)); + m_console.register_command("gex", CMDFLAG_NONE, 0, 0, 1, std::bind(&debugger_commands::execute_go_exception, this, _1, _2)); + m_console.register_command("ge", CMDFLAG_NONE, 0, 0, 1, std::bind(&debugger_commands::execute_go_exception, this, _1, _2)); m_console.register_command("gtime", CMDFLAG_NONE, 0, 0, 1, std::bind(&debugger_commands::execute_go_time, this, _1, _2)); m_console.register_command("gt", CMDFLAG_NONE, 0, 0, 1, std::bind(&debugger_commands::execute_go_time, this, _1, _2)); m_console.register_command("next", CMDFLAG_NONE, 0, 0, 0, std::bind(&debugger_commands::execute_next, this, _1, _2)); @@ -865,6 +867,21 @@ void debugger_commands::execute_go_interrupt(int ref, const std::vectordebug()->go_interrupt(irqline); } +/*------------------------------------------------- + execute_go_exception - execute the goex command +-------------------------------------------------*/ + +void debugger_commands::execute_go_exception(int ref, const std::vector ¶ms) +{ + u64 exception = -1; + + /* if we have a parameter, use it instead */ + if (params.size() > 0 && !validate_number_parameter(params[0], exception)) + return; + + m_cpu.get_visible_cpu()->debug()->go_exception(exception); +} + /*------------------------------------------------- execute_go_time - execute the gtime command diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h index 71f27cb4ac5..36257e0e4e0 100644 --- a/src/emu/debug/debugcmd.h +++ b/src/emu/debug/debugcmd.h @@ -106,6 +106,7 @@ private: void execute_go(int ref, const std::vector ¶ms); void execute_go_vblank(int ref, const std::vector ¶ms); void execute_go_interrupt(int ref, const std::vector ¶ms); + void execute_go_exception(int ref, const std::vector ¶ms); void execute_go_time(int ref, const std::vector ¶ms); void execute_focus(int ref, const std::vector ¶ms); void execute_ignore(int ref, const std::vector ¶ms); diff --git a/src/emu/debug/debughlp.cpp b/src/emu/debug/debughlp.cpp index 058af8904c2..5a272c85a1b 100644 --- a/src/emu/debug/debughlp.cpp +++ b/src/emu/debug/debughlp.cpp @@ -136,6 +136,7 @@ static const help_item static_help_list[] = " o[ver] [=1] -- single steps over instructions (F10)\n" " out -- single steps until the current subroutine/exception handler is exited (Shift-F11)\n" " g[o] [
] -- resumes execution, sets temp breakpoint at
(F5)\n" + " ge[x] [] -- resumes execution, setting temp breakpoint if is raised\n" " gi[nt] [] -- resumes execution, setting temp breakpoint if is taken (F7)\n" " gt[ime] -- resumes execution until the given delay has elapsed\n" " gv[blank] -- resumes execution, setting temp breakpoint on the next VBLANK (F8)\n"