summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-09-11 15:57:52 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-09-11 15:57:52 +0000
commit3d1dbafcc2b45b57207201850ac69e486ed0f648 (patch)
tree0e8f2fb24788aa01ef5326d3f890abef25f5fdd7 /src/emu/debug/debugcpu.c
parentf67c8732b288cd5bbf7b8c80134e979697d57dfc (diff)
From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: Machine -> machine This is a big patch adding running_machine* parameters and using "machine" where available.
Diffstat (limited to 'src/emu/debug/debugcpu.c')
-rw-r--r--src/emu/debug/debugcpu.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index ff22acc8f3d..d164e2ac0de 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -91,10 +91,10 @@ static debugger_private global;
***************************************************************************/
static void debug_cpu_exit(running_machine *machine);
-static void perform_trace(debug_cpu_info *info);
+static void perform_trace(running_machine *machine, debug_cpu_info *info);
static void prepare_for_step_overout(debug_cpu_info *info);
-static void process_source_file(void);
-static void breakpoint_check(debug_cpu_info *info, offs_t pc);
+static void process_source_file(running_machine *machine);
+static void breakpoint_check(running_machine *machine, debug_cpu_info *info, offs_t pc);
static void watchpoint_check(running_machine *machine, int cpunum, int spacenum, int type, offs_t address, UINT64 value_to_write, UINT64 mem_mask);
static void check_hotspots(int cpunum, int spacenum, offs_t address);
@@ -384,7 +384,7 @@ static void compute_debug_flags(running_machine *machine, const debug_cpu_info *
/* if any of the watchpoint flags are set and we're live, tell the memory system */
if (global.livecpu != NULL && ((info->flags & DEBUG_FLAG_WATCHPOINT) != 0))
- memory_set_context(-1);
+ memory_set_context(machine, -1);
}
@@ -533,7 +533,7 @@ void debug_cpu_instruction_hook(running_machine *machine, offs_t curpc)
/* are we tracing? */
if (info->flags & DEBUG_FLAG_TRACING_ANY)
- perform_trace(info);
+ perform_trace(machine, info);
/* per-instruction hook? */
if (global.execution_state != EXECUTION_STATE_STOPPED && (info->flags & DEBUG_FLAG_HOOKED) != 0 && (*info->instrhook)(curpc))
@@ -581,7 +581,7 @@ void debug_cpu_instruction_hook(running_machine *machine, offs_t curpc)
/* check for execution breakpoints */
else if ((info->flags & DEBUG_FLAG_LIVE_BP) != 0)
- breakpoint_check(info, curpc);
+ breakpoint_check(machine, info, curpc);
}
/* if we are supposed to halt, do it now */
@@ -613,7 +613,7 @@ void debug_cpu_instruction_hook(running_machine *machine, offs_t curpc)
}
/* check for commands in the source file */
- process_source_file();
+ process_source_file(machine);
/* if an event got scheduled, resume */
if (mame_is_scheduled_event_pending(machine))
@@ -976,7 +976,7 @@ static UINT32 dasm_wrapped(char *buffer, offs_t pc)
}
-static void perform_trace(debug_cpu_info *info)
+static void perform_trace(running_machine *machine, debug_cpu_info *info)
{
offs_t pc = activecpu_get_pc();
int offset, count, i;
@@ -1006,7 +1006,7 @@ static void perform_trace(debug_cpu_info *info)
/* execute any trace actions first */
if (info->trace.action != NULL)
- debug_console_execute_command(info->trace.action, 0);
+ debug_console_execute_command(machine, info->trace.action, 0);
/* print the address */
offset = sprintf(buffer, "%0*X: ", info->space[ADDRESS_SPACE_PROGRAM].logchars, pc);
@@ -1083,7 +1083,7 @@ static void prepare_for_step_overout(debug_cpu_info *info)
a source file
-------------------------------------------------*/
-static void process_source_file(void)
+static void process_source_file(running_machine *machine)
{
/* loop until the file is exhausted or until we are executing again */
while (debug_source_file != NULL && global.execution_state == EXECUTION_STATE_STOPPED)
@@ -1116,7 +1116,7 @@ static void process_source_file(void)
/* execute the command */
if (buf[0])
- debug_console_execute_command(buf, 1);
+ debug_console_execute_command(machine, buf, 1);
}
}
@@ -1173,7 +1173,7 @@ static void breakpoint_update_flags(running_machine *machine, debug_cpu_info *in
a given CPU
-------------------------------------------------*/
-static void breakpoint_check(debug_cpu_info *info, offs_t pc)
+static void breakpoint_check(running_machine *machine, debug_cpu_info *info, offs_t pc)
{
debug_cpu_breakpoint *bp;
UINT64 result;
@@ -1190,7 +1190,7 @@ static void breakpoint_check(debug_cpu_info *info, offs_t pc)
/* if we hit, evaluate the action */
if (bp->action != NULL)
- debug_console_execute_command(bp->action, 0);
+ debug_console_execute_command(machine, bp->action, 0);
/* print a notification, unless the action made us go again */
if (global.execution_state == EXECUTION_STATE_STOPPED)
@@ -1409,7 +1409,7 @@ static void watchpoint_check(running_machine *machine, int cpunum, int spacenum,
/* if we hit, evaluate the action */
if (wp->action != NULL)
- debug_console_execute_command(wp->action, 0);
+ debug_console_execute_command(machine, wp->action, 0);
/* print a notification, unless the action made us go again */
if (global.execution_state == EXECUTION_STATE_STOPPED)
@@ -2111,7 +2111,7 @@ UINT64 debug_read_opcode(offs_t address, int size, int arg)
/* get pointer to data */
/* note that we query aligned to the bus width, and then add back the low bits */
lowbits_mask = info->space[ADDRESS_SPACE_PROGRAM].databytes - 1;
- ptr = memory_get_op_ptr(cpu_getactivecpu(), address & ~lowbits_mask, arg);
+ ptr = memory_get_op_ptr(Machine, cpu_getactivecpu(), address & ~lowbits_mask, arg);
if (!ptr)
return ~(UINT64)0 & (~(UINT64)0 >> (64 - 8*size));
ptr = (UINT8 *)ptr + (address & lowbits_mask);
@@ -2265,7 +2265,7 @@ static UINT64 expression_read_program_direct(int cpuindex, int opcode, offs_t ad
/* get the base of memory, aligned to the address minus the lowbits */
if (opcode & 1)
- base = memory_get_op_ptr(cpuindex, address & ~lowmask, FALSE);
+ base = memory_get_op_ptr(Machine, cpuindex, address & ~lowmask, FALSE);
else
base = memory_get_read_ptr(cpuindex, ADDRESS_SPACE_PROGRAM, address & ~lowmask);
@@ -2479,7 +2479,7 @@ static void expression_write_program_direct(int cpuindex, int opcode, offs_t add
/* get the base of memory, aligned to the address minus the lowbits */
if (opcode & 1)
- base = memory_get_op_ptr(cpuindex, address & ~lowmask, FALSE);
+ base = memory_get_op_ptr(Machine, cpuindex, address & ~lowmask, FALSE);
else
base = memory_get_read_ptr(cpuindex, ADDRESS_SPACE_PROGRAM, address & ~lowmask);