summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/debug/debugcpu.c')
-rw-r--r--src/emu/debug/debugcpu.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index 3654248079c..4038edd8883 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -978,7 +978,7 @@ int debug_cpu_breakpoint_set(const device_config *device, offs_t address, parsed
assert_always(device != NULL, "debug_cpu_breakpoint_set() called with invalid cpu!");
/* allocate breakpoint */
- bp = alloc_or_die(debug_cpu_breakpoint);
+ bp = auto_alloc(device->machine, debug_cpu_breakpoint);
bp->index = global->bpindex++;
bp->enabled = TRUE;
bp->address = address;
@@ -986,7 +986,7 @@ int debug_cpu_breakpoint_set(const device_config *device, offs_t address, parsed
bp->action = NULL;
if (action != NULL)
{
- bp->action = alloc_array_or_die(char, strlen(action) + 1);
+ bp->action = auto_alloc_array(device->machine, char, strlen(action) + 1);
strcpy(bp->action, action);
}
@@ -1027,8 +1027,8 @@ int debug_cpu_breakpoint_clear(running_machine *machine, int bpnum)
if (bp->condition != NULL)
expression_free(bp->condition);
if (bp->action != NULL)
- free(bp->action);
- free(bp);
+ auto_free(machine, bp->action);
+ auto_free(machine, bp);
/* update the flags */
breakpoint_update_flags(info);
@@ -1082,7 +1082,7 @@ int debug_cpu_watchpoint_set(const address_space *space, int type, offs_t addres
{
debugcpu_private *global = space->machine->debugcpu_data;
cpu_debug_data *info = cpu_get_debug_data(space->cpu);
- debug_cpu_watchpoint *wp = alloc_or_die(debug_cpu_watchpoint);
+ debug_cpu_watchpoint *wp = auto_alloc(space->machine, debug_cpu_watchpoint);
/* fill in the structure */
wp->index = global->wpindex++;
@@ -1094,7 +1094,7 @@ int debug_cpu_watchpoint_set(const address_space *space, int type, offs_t addres
wp->action = NULL;
if (action != NULL)
{
- wp->action = alloc_array_or_die(char, strlen(action) + 1);
+ wp->action = auto_alloc_array(space->machine, char, strlen(action) + 1);
strcpy(wp->action, action);
}
@@ -1138,8 +1138,8 @@ int debug_cpu_watchpoint_clear(running_machine *machine, int wpnum)
if (wp->condition != NULL)
expression_free(wp->condition);
if (wp->action != NULL)
- free(wp->action);
- free(wp);
+ auto_free(machine, wp->action);
+ auto_free(machine, wp);
watchpoint_update_flags(cpu_get_address_space(cpu, spacenum));
return TRUE;
@@ -1231,7 +1231,7 @@ void debug_cpu_trace(const device_config *device, FILE *file, int trace_over, co
info->trace.file = NULL;
if (info->trace.action != NULL)
- free(info->trace.action);
+ auto_free(device->machine, info->trace.action);
info->trace.action = NULL;
/* open any new files */
@@ -1240,7 +1240,7 @@ void debug_cpu_trace(const device_config *device, FILE *file, int trace_over, co
info->trace.trace_over_target = ~0;
if (action != NULL)
{
- info->trace.action = alloc_array_or_die(char, strlen(action) + 1);
+ info->trace.action = auto_alloc_array(device->machine, char, strlen(action) + 1);
strcpy(info->trace.action, action);
}
@@ -1301,14 +1301,14 @@ int debug_cpu_hotspot_track(const device_config *device, int numspots, int thres
/* if we already have tracking info, kill it */
if (info->hotspots)
- free(info->hotspots);
+ auto_free(device->machine, info->hotspots);
info->hotspots = NULL;
/* only start tracking if we have a non-zero count */
if (numspots > 0)
{
/* allocate memory for hotspots */
- info->hotspots = alloc_array_or_die(debug_hotspot_entry, numspots);
+ info->hotspots = auto_alloc_array(device->machine, debug_hotspot_entry, numspots);
memset(info->hotspots, 0xff, sizeof(*info->hotspots) * numspots);
/* fill in the info */
@@ -1937,7 +1937,7 @@ static void debug_cpu_exit(running_machine *machine)
if (info->trace.file != NULL)
fclose(info->trace.file);
if (info->trace.action != NULL)
- free(info->trace.action);
+ auto_free(machine, info->trace.action);
/* free the symbol table */
if (info->symtable != NULL)