From 85d240c04c89a4e63bf68a3433106534ac2f0df2 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Mon, 6 Sep 2010 19:05:34 +0000 Subject: [PATCH] Move debug_setup() call to after the device_debug class is created. --- src/emu/debug/debugcmd.c | 3 --- src/emu/devintrf.c | 16 +++------------- src/emu/devintrf.h | 1 - 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c index 8c1fddbea75..e7deb65a964 100644 --- a/src/emu/debug/debugcmd.c +++ b/src/emu/debug/debugcmd.c @@ -364,9 +364,6 @@ void debug_command_init(running_machine *machine) debug_console_register_command(machine, "softreset", CMDFLAG_NONE, 0, 0, 1, execute_softreset); debug_console_register_command(machine, "hardreset", CMDFLAG_NONE, 0, 0, 1, execute_hardreset); - /* ask all the devices if they would like to register functions or symbols */ - machine->m_devicelist.debug_setup_all(); - machine->add_notifier(MACHINE_NOTIFY_EXIT, debug_command_exit); /* set up the initial debugscript if specified */ diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c index 9ae1a55a225..af628927a90 100644 --- a/src/emu/devintrf.c +++ b/src/emu/devintrf.c @@ -163,19 +163,6 @@ void device_list::start_all() } -//------------------------------------------------- -// debug_setup_all - tell all the devices to set -// up any debugging they need -//------------------------------------------------- - -void device_list::debug_setup_all() -{ - // iterate over devices and stop them - for (device_t *device = first(); device != NULL; device = device->next()) - device->debug_setup(); -} - - //------------------------------------------------- // reset_all - reset all devices in the list //------------------------------------------------- @@ -735,7 +722,10 @@ void device_t::start() // if we're debugging, create a device_debug object if ((m_machine.debug_flags & DEBUG_FLAG_ENABLED) != 0) + { m_debug = auto_alloc(&m_machine, device_debug(*this)); + debug_setup(); + } // register our save states state_save_register_device_item(this, 0, m_clock); diff --git a/src/emu/devintrf.h b/src/emu/devintrf.h index a1bd84ce4c7..fe46a6d0fb8 100644 --- a/src/emu/devintrf.h +++ b/src/emu/devintrf.h @@ -199,7 +199,6 @@ public: void import_config_list(const device_config_list &list, running_machine &machine); void start_all(); - void debug_setup_all(); void reset_all(); };