mirror of
https://github.com/holub/mame
synced 2025-05-23 22:20:01 +03:00
Move debug_setup() call to after the device_debug class is created.
This commit is contained in:
parent
1f7f4877e4
commit
85d240c04c
@ -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 */
|
||||||
|
@ -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);
|
||||||
|
@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user