summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/debug/debugcmd.c')
-rw-r--r--src/emu/debug/debugcmd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c
index ec9f9afe344..75cf528cd18 100644
--- a/src/emu/debug/debugcmd.c
+++ b/src/emu/debug/debugcmd.c
@@ -1163,17 +1163,21 @@ static void execute_comment_save(running_machine *machine, int ref, int params,
static void execute_bpset(running_machine *machine, int ref, int params, const char *param[])
{
- parsed_expression condition(debug_cpu_get_global_symtable(machine));
device_t *cpu;
const char *action = NULL;
UINT64 address;
int bpnum;
+ /* CPU is implicit */
+ if (!debug_command_parameter_cpu(machine, NULL, &cpu))
+ return;
+
/* param 1 is the address */
if (!debug_command_parameter_number(machine, param[0], &address))
return;
/* param 2 is the condition */
+ parsed_expression condition(&cpu->debug()->symtable());
if (!debug_command_parameter_expression(machine, param[1], condition))
return;
@@ -1181,10 +1185,6 @@ static void execute_bpset(running_machine *machine, int ref, int params, const c
if (!debug_command_parameter_command(machine, action = param[2]))
return;
- /* CPU is implicit */
- if (!debug_command_parameter_cpu(machine, NULL, &cpu))
- return;
-
/* set the breakpoint */
bpnum = cpu->debug()->breakpoint_set(address, (condition.is_empty()) ? NULL : condition.original_string(), action);
debug_console_printf(machine, "Breakpoint %X set\n", bpnum);
@@ -1303,13 +1303,16 @@ static void execute_bplist(running_machine *machine, int ref, int params, const
static void execute_wpset(running_machine *machine, int ref, int params, const char *param[])
{
- parsed_expression condition(debug_cpu_get_global_symtable(machine));
address_space *space;
const char *action = NULL;
UINT64 address, length;
int type = 0;
int wpnum;
+ /* CPU is implicit */
+ if (!debug_command_parameter_cpu_space(machine, NULL, ref, &space))
+ return;
+
/* param 1 is the address */
if (!debug_command_parameter_number(machine, param[0], &address))
return;
@@ -1332,6 +1335,7 @@ static void execute_wpset(running_machine *machine, int ref, int params, const c
}
/* param 4 is the condition */
+ parsed_expression condition(&space->cpu->debug()->symtable());
if (!debug_command_parameter_expression(machine, param[3], condition))
return;
@@ -1339,10 +1343,6 @@ static void execute_wpset(running_machine *machine, int ref, int params, const c
if (!debug_command_parameter_command(machine, action = param[4]))
return;
- /* CPU is implicit */
- if (!debug_command_parameter_cpu_space(machine, NULL, ref, &space))
- return;
-
/* set the watchpoint */
wpnum = space->cpu->debug()->watchpoint_set(*space, type, address, length, (condition.is_empty()) ? NULL : condition.original_string(), action);
debug_console_printf(machine, "Watchpoint %X set\n", wpnum);