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.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp
index e19d23e6b55..0fc33d32f10 100644
--- a/src/emu/debug/debugcon.cpp
+++ b/src/emu/debug/debugcon.cpp
@@ -58,6 +58,9 @@ debugger_console::debugger_console(running_machine &machine)
/* listen in on the errorlog */
using namespace std::placeholders;
m_machine.add_logerror_callback(std::bind(&debugger_console::errorlog_write_line, this, _1));
+
+ /* register our own custom-command help */
+ register_command("helpcustom", CMDFLAG_NONE, 0, 0, 0, std::bind(&debugger_console::execute_help_custom, this, _1, _2));
}
@@ -92,6 +95,28 @@ void debugger_console::exit()
***************************************************************************/
+/*------------------------------------------------------------
+ execute_help_custom - execute the helpcustom command
+------------------------------------------------------------*/
+
+void debugger_console::execute_help_custom(int ref, const std::vector<std::string> &params)
+{
+ debug_command *cmd = m_commandlist;
+ char buf[64];
+ while (cmd)
+ {
+ if (cmd->flags & CMDFLAG_CUSTOM_HELP)
+ {
+ snprintf(buf, 63, "%s help", cmd->command);
+ buf[63] = 0;
+ char *temp_params[1] = { buf };
+ internal_execute_command(true, 1, &temp_params[0]);
+ }
+ cmd = cmd->next;
+ }
+}
+
+
/*-------------------------------------------------
trim_parameter - executes a
command