[project @ 2005-04-07 15:53:01 by simonmar]
[ghc-hetmet.git] / ghc / rts / Printer.c
index c72b33a..1bbdb35 100644 (file)
@@ -290,21 +290,13 @@ printClosure( StgClosure *obj )
         }
 
     case CAF_BLACKHOLE:
-            debugBelch("CAF_BH("); 
-            printPtr((StgPtr)stgCast(StgBlockingQueue*,obj)->blocking_queue);
-            debugBelch(")\n"); 
+            debugBelch("CAF_BH"); 
             break;
 
     case BLACKHOLE:
             debugBelch("BH\n"); 
             break;
 
-    case BLACKHOLE_BQ:
-            debugBelch("BQ("); 
-            printPtr((StgPtr)stgCast(StgBlockingQueue*,obj)->blocking_queue);
-            debugBelch(")\n"); 
-            break;
-
     case SE_BLACKHOLE:
             debugBelch("SE_BH\n"); 
             break;
@@ -322,18 +314,18 @@ printClosure( StgClosure *obj )
                 putchar(arrWordsGetChar(obj,i));
                } */
            for (i=0; i<((StgArrWords *)obj)->words; i++)
-             debugBelch("%u", ((StgArrWords *)obj)->payload[i]);
+             debugBelch("%lu", ((StgArrWords *)obj)->payload[i]);
             debugBelch("\")\n");
             break;
         }
 
     case MUT_ARR_PTRS:
-       debugBelch("MUT_ARR_PTRS(size=%d)\n", ((StgMutArrPtrs *)obj)->ptrs);
+       debugBelch("MUT_ARR_PTRS(size=%ld)\n", ((StgMutArrPtrs *)obj)->ptrs);
        break;
 
     case MUT_ARR_PTRS_FROZEN:
 #if !defined(XMLAMBDA)
-       debugBelch("MUT_ARR_PTRS_FROZEN(size=%d)\n", ((StgMutArrPtrs *)obj)->ptrs);
+       debugBelch("MUT_ARR_PTRS_FROZEN(size=%ld)\n", ((StgMutArrPtrs *)obj)->ptrs);
        break;
 #else
           {
@@ -354,14 +346,14 @@ printClosure( StgClosure *obj )
     case MVAR:
         {
          StgMVar* mv = (StgMVar*)obj;
-         debugBelch("MVAR(head=%p, link=%p, tail=%p, value=%p)\n", mv->head, mv->mut_link, mv->tail, mv->value);
+         debugBelch("MVAR(head=%p, tail=%p, value=%p)\n", mv->head, mv->tail, mv->value);
           break;
         }
 
     case MUT_VAR:
         {
          StgMutVar* mv = (StgMutVar*)obj;
-         debugBelch("MUT_VAR(var=%p, link=%p)\n", mv->var, mv->mut_link);
+         debugBelch("MUT_VAR(var=%p)\n", mv->var);
           break;
         }
 
@@ -382,7 +374,7 @@ printClosure( StgClosure *obj )
             break;
 
     case STABLE_NAME:
-            debugBelch("STABLE_NAME(%d)\n", ((StgStableName*)obj)->sn); 
+            debugBelch("STABLE_NAME(%ld)\n", ((StgStableName*)obj)->sn); 
             break;
 
     case TSO:
@@ -499,12 +491,12 @@ printSmallBitmap( StgPtr spBottom, StgPtr payload, StgWord bitmap, nat size )
 
     p = payload;
     for(i = 0; i < size; i++, bitmap >>= 1 ) {
-       debugBelch("   stk[%d] (%p) = ", spBottom-(payload+i), payload+i);
+       debugBelch("   stk[%ld] (%p) = ", spBottom-(payload+i), payload+i);
        if ((bitmap & 1) == 0) {
            printPtr((P_)payload[i]);
            debugBelch("\n");
        } else {
-           debugBelch("Word# %d\n", payload[i]);
+           debugBelch("Word# %ld\n", payload[i]);
        }
     }
 }
@@ -520,12 +512,12 @@ printLargeBitmap( StgPtr spBottom, StgPtr payload, StgLargeBitmap* large_bitmap,
        StgWord bitmap = large_bitmap->bitmap[bmp];
        j = 0;
        for(; i < size && j < BITS_IN(W_); j++, i++, bitmap >>= 1 ) {
-           debugBelch("   stk[%d] (%p) = ", spBottom-(payload+i), payload+i);
+           debugBelch("   stk[%ld] (%p) = ", spBottom-(payload+i), payload+i);
            if ((bitmap & 1) == 0) {
                printPtr((P_)payload[i]);
                debugBelch("\n");
            } else {
-               debugBelch("Word# %d\n", payload[i]);
+               debugBelch("Word# %ld\n", payload[i]);
            }
        }
     }
@@ -617,13 +609,13 @@ printStackChunk( StgPtr sp, StgPtr spBottom )
            switch (fun_info->f.fun_type) {
            case ARG_GEN:
                printSmallBitmap(spBottom, sp+1,
-                                BITMAP_BITS(fun_info->f.bitmap),
-                                BITMAP_SIZE(fun_info->f.bitmap));
+                                BITMAP_BITS(fun_info->f.b.bitmap),
+                                BITMAP_SIZE(fun_info->f.b.bitmap));
                break;
            case ARG_GEN_BIG:
                printLargeBitmap(spBottom, sp+2,
-                                (StgLargeBitmap *)fun_info->f.bitmap,
-                                BITMAP_SIZE(fun_info->f.bitmap));
+                                GET_FUN_LARGE_BITMAP(fun_info),
+                                GET_FUN_LARGE_BITMAP(fun_info)->size);
                break;
            default:
                printSmallBitmap(spBottom, sp+1,
@@ -718,7 +710,13 @@ static char *closure_type_names[] = {
     "FETCH_ME_BQ",
     "RBH",
     "EVACUATED",
-    "REMOTE_REF"
+    "REMOTE_REF",
+    "TVAR_WAIT_QUEUE",
+    "TVAR",
+    "TREC_CHUNK",
+    "TREC_HEADER",
+    "ATOMICALLY_FRAME",
+    "CATCH_RETRY_FRAME"
 };