From a8b5e840ebb42522992749eb9afd1a9ba870d234 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 25 Aug 2007 13:08:10 +0000 Subject: [PATCH] Fix the IF_DEBUG(interpreter in StgCRun.c --- includes/Rts.h | 4 ++++ rts/StgCRun.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Rts.h b/includes/Rts.h index eba8146..df8cb46 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -258,7 +258,11 @@ TICK_VAR(2) -------------------------------------------------------------------------- */ #ifdef DEBUG +#if IN_STG_CODE +#define IF_DEBUG(c,s) if (RtsFlags[0].DebugFlags.c) { s; } +#else #define IF_DEBUG(c,s) if (RtsFlags.DebugFlags.c) { s; } +#endif #else #define IF_DEBUG(c,s) doNothing() #endif diff --git a/rts/StgCRun.c b/rts/StgCRun.c index ba27ff2..376e824 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -87,13 +87,11 @@ register double fake_f9 __asm__("$f9"); StgRegTable * StgRun(StgFunPtr f, StgRegTable *basereg STG_UNUSED) { while (f) { - /* XXX Disabled due to RtsFlags[]/RtsFlags mismatch IF_DEBUG(interpreter, debugBelch("Jumping to "); printPtr((P_)f); fflush(stdout); debugBelch("\n"); ); - */ f = (StgFunPtr) (f)(); } return (StgRegTable *)R1.p; -- 1.7.10.4