summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-11 11:03:11 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-11 11:03:11 +0000
commit7eaa676d90817c0e4af7e7d0f04986cfa78bddcd (patch)
tree74554dc0161cefbd05faa64b2ca738d72a484fb7 /src
parent9ff94341461ec0772aab68cfca373c3e2ff8d0cc (diff)
Fixed compile error, and fixed crash when handling an exception when the
debugger is disabled.
Diffstat (limited to 'src')
-rw-r--r--src/emu/cpu/dsp56k/dsp56k.c2
-rw-r--r--src/emu/debug/debugcpu.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c
index 3c028e122f9..01fb0efe43a 100644
--- a/src/emu/cpu/dsp56k/dsp56k.c
+++ b/src/emu/cpu/dsp56k/dsp56k.c
@@ -273,10 +273,12 @@ INLINE void invalid_instruction(UINT32 op)
/***************************************************************************
IRQ HANDLING
***************************************************************************/
+#ifdef UNUSED_FUNCTION
static void check_irqs(void)
{
//logerror("Dsp56k check irqs\n");
}
+#endif
static void set_irq_line(int irqline, int state)
{
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c
index cbbf2dd04fb..7600af442f2 100644
--- a/src/emu/debug/debugcpu.c
+++ b/src/emu/debug/debugcpu.c
@@ -272,12 +272,15 @@ void debug_cpu_init(running_machine *machine)
void debug_cpu_flush_traces(running_machine *machine)
{
int cpunum;
-
+
for (cpunum = 0; cpunum < ARRAY_LENGTH(machine->cpu); cpunum++)
if (machine->cpu[cpunum] != NULL)
{
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);
}
}