summaryrefslogtreecommitdiffstats
path: root/src/emu/debug/debugcmd.cpp
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2017-01-17 12:20:59 -0500
committer GitHub <noreply@github.com>2017-01-17 12:20:59 -0500
commitec4b0ff9f70dfb4b2d453d671ef7fb2acff642dd (patch)
tree3cfb963f349f42369af783c23e0c0b37b513f4a1 /src/emu/debug/debugcmd.cpp
parentc0c623883ed01d5d698cdd104fc62c2cf8c0e7ed (diff)
parente5d662adf7b991d1bdf3a374dd2b64ce408e04bd (diff)
Merge pull request #1992 from npwoods/tracelogerror_debugger_option
Tracelogerror debugger option
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r--src/emu/debug/debugcmd.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 5469670caa6..871dda1df22 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -2496,6 +2496,7 @@ void debugger_commands::execute_trace_internal(int ref, int params, const char *
{
const char *action = nullptr;
bool detect_loops = true;
+ bool logerror = false;
device_t *cpu;
FILE *f = nullptr;
const char *mode;
@@ -2507,8 +2508,25 @@ void debugger_commands::execute_trace_internal(int ref, int params, const char *
/* validate parameters */
if (!validate_cpu_parameter((params > 1) ? param[1] : nullptr, &cpu))
return;
- if (!validate_boolean_parameter((params > 2) ? param[2] : nullptr, &detect_loops))
- return;
+ if (params > 2)
+ {
+ std::stringstream stream;
+ stream.str(param[2]);
+
+ std::string flag;
+ while (std::getline(stream, flag, '|'))
+ {
+ if (!core_stricmp(flag.c_str(), "noloop"))
+ detect_loops = false;
+ else if (!core_stricmp(flag.c_str(), "logerror"))
+ logerror = true;
+ else
+ {
+ m_console.printf("Invalid flag '%s'\n", flag.c_str());
+ return;
+ }
+ }
+ }
if (!debug_command_parameter_command(action = (params > 3) ? param[3] : nullptr))
return;
@@ -2533,7 +2551,7 @@ void debugger_commands::execute_trace_internal(int ref, int params, const char *
}
/* do it */
- cpu->debug()->trace(f, trace_over, detect_loops, action);
+ cpu->debug()->trace(f, trace_over, detect_loops, logerror, action);
if (f)
m_console.printf("Tracing CPU '%s' to file %s\n", cpu->tag(), filename.c_str());
else