Fixed compile error, and fixed crash when handling an exception when the

debugger is disabled.
This commit is contained in:
Aaron Giles 2008-12-11 11:03:11 +00:00
parent 9ff9434146
commit 7eaa676d90
2 changed files with 7 additions and 2 deletions

View File

@ -273,10 +273,12 @@ INLINE void invalid_instruction(UINT32 op)
/*************************************************************************** /***************************************************************************
IRQ HANDLING IRQ HANDLING
***************************************************************************/ ***************************************************************************/
#ifdef UNUSED_FUNCTION
static void check_irqs(void) static void check_irqs(void)
{ {
//logerror("Dsp56k check irqs\n"); //logerror("Dsp56k check irqs\n");
} }
#endif
static void set_irq_line(int irqline, int state) static void set_irq_line(int irqline, int state)
{ {

View File

@ -272,12 +272,15 @@ void debug_cpu_init(running_machine *machine)
void debug_cpu_flush_traces(running_machine *machine) void debug_cpu_flush_traces(running_machine *machine)
{ {
int cpunum; int cpunum;
for (cpunum = 0; cpunum < ARRAY_LENGTH(machine->cpu); cpunum++) for (cpunum = 0; cpunum < ARRAY_LENGTH(machine->cpu); cpunum++)
if (machine->cpu[cpunum] != NULL) if (machine->cpu[cpunum] != NULL)
{ {
cpu_debug_data *info = cpu_get_debug_data(machine->cpu[cpunum]); cpu_debug_data *info = cpu_get_debug_data(machine->cpu[cpunum]);
if (info->trace.file != NULL)
/* this can be called on exit even when no debugging is enabled, so
make sure the info is valid before proceeding */
if (info != NULL && info->trace.file != NULL)
fflush(info->trace.file); fflush(info->trace.file);
} }
} }