Fix the IF_DEBUG(interpreter in StgCRun.c
authorIan Lynagh <igloo@earth.li>
Sat, 25 Aug 2007 13:08:10 +0000 (13:08 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 25 Aug 2007 13:08:10 +0000 (13:08 +0000)
includes/Rts.h
rts/StgCRun.c

index eba8146..df8cb46 100644 (file)
@@ -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
index ba27ff2..376e824 100644 (file)
@@ -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;