Move debug_setup() call to after the device_debug class is created.

This commit is contained in:
Aaron Giles 2010-09-06 19:05:34 +00:00
parent 1f7f4877e4
commit 85d240c04c
3 changed files with 3 additions and 17 deletions

View File

@ -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, "softreset", CMDFLAG_NONE, 0, 0, 1, execute_softreset);
debug_console_register_command(machine, "hardreset", CMDFLAG_NONE, 0, 0, 1, execute_hardreset); 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); machine->add_notifier(MACHINE_NOTIFY_EXIT, debug_command_exit);
/* set up the initial debugscript if specified */ /* set up the initial debugscript if specified */

View File

@ -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 // 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 we're debugging, create a device_debug object
if ((m_machine.debug_flags & DEBUG_FLAG_ENABLED) != 0) if ((m_machine.debug_flags & DEBUG_FLAG_ENABLED) != 0)
{
m_debug = auto_alloc(&m_machine, device_debug(*this)); m_debug = auto_alloc(&m_machine, device_debug(*this));
debug_setup();
}
// register our save states // register our save states
state_save_register_device_item(this, 0, m_clock); state_save_register_device_item(this, 0, m_clock);

View File

@ -199,7 +199,6 @@ public:
void import_config_list(const device_config_list &list, running_machine &machine); void import_config_list(const device_config_list &list, running_machine &machine);
void start_all(); void start_all();
void debug_setup_all();
void reset_all(); void reset_all();
}; };