|
Message
From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...>
Date: Wed Jun 29 16:53:44 CEST 2005
Subject: [openrisc] [or1ksim #109] Create a special debug channel for
excetions
Hi,This patch creates a special debug channel for recording exections. Haveing exceptions printed when verbose mode is enabled, causes too much output and since PRINTF prints to the standard output and debug messages go to standard error and the different buffering startagies between to two meant that the exception messages where useless in combination with the debug channels.
ChangeLog: * Create a seporate debug channel to dump exceptions to.
nog. -------------- next part -------------- diff -upr --unidirectional-new-file ./cpu/or1k/except.c /home/nog/or1ksim-ac/cpu/or1k/except.c --- ./cpu/or1k/except.c 2005-06-28 13:33:15.000000000 +0200 +++ /home/nog/or1ksim-ac/cpu/or1k/except.c 2005-06-11 13:33:21.000000000 +0200 @@ -37,6 +37,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg #include "spr_defs.h" #include "execute.h" #include "sprs.h" +#include "debug.h" #if DYNAMIC_EXECUTION #include "sched.h" @@ -44,7 +45,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg #include "op_support.h" #endif -extern oraddr_t pcprev; +DEFAULT_DEBUG_CHANNEL(except); int except_pending = 0; @@ -95,12 +96,10 @@ void except_handle(oraddr_t except, orad except_pending = 1; #endif - if (config.sim.verbose) - PRINTF("Exception 0x%"PRIxADDR" (%s) at 0x%"PRIxADDR", EA: 0x%"PRIxADDR - ", ppc: 0x%"PRIxADDR", npc: 0x%"PRIxADDR", dpc: 0x%"PRIxADDR - ", cycles %lld, #%lld\n", - except, except_name(except), pcprev, ea, cpu_state.pc, pcnext, - cpu_state.pc_delay, runtime.sim.cycles, runtime.cpu.instructions); + TRACE("Exception 0x%"PRIxADDR" (%s) at 0x%"PRIxADDR", EA: 0x%"PRIxADDR + ", cycles %lld, #%lld\n", + except, except_name(except), cpu_state.pc, ea, runtime.sim.cycles, + runtime.cpu.instructions); except_vector = except + (cpu_state.sprs[SPR_SR] & SPR_SR_EPH ? 0xf0000000 : 0x00000000);
diff -upr --unidirectional-new-file ./support/dbchs.h /home/nog/or1ksim-ac/support/dbchs.h --- ./support/dbchs.h 2005-05-29 11:54:30.000000000 +0200 +++ /home/nog/or1ksim-ac/support/dbchs.h 2005-06-28 11:54:59.000000000 +0200 @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg /* Declatrations of all debug channels */ DECLARE_DEBUG_CHANNEL(sched) +DECLARE_DEBUG_CHANNEL(except) DECLARE_DEBUG_CHANNEL(immu) DECLARE_DEBUG_CHANNEL(dmmu) DECLARE_DEBUG_CHANNEL(pic)
|
 |