[project @ 2001-03-26 13:43:05 by simonmar]
[ghc-hetmet.git] / ghc / rts / Printer.c
index fee32ea..c173a93 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Printer.c,v 1.35 2001/02/09 13:09:16 simonmar Exp $
+ * $Id: Printer.c,v 1.38 2001/03/22 03:51:10 hwloidl Exp $
  *
  * (c) The GHC Team, 1994-2000.
  *
 
 #include "Printer.h"
 
+#if defined(GRAN) || defined(PAR)
 // HWL: explicit fixed header size to make debugging easier
 int fixed_hs = FIXED_HS, itbl_sz = sizeofW(StgInfoTable), 
     uf_sz=sizeofW(StgUpdateFrame), sf_sz=sizeofW(StgSeqFrame); 
+#endif
 
 /* --------------------------------------------------------------------------
  * local function decls
@@ -82,11 +84,9 @@ void printClosure( StgClosure *obj )
     switch ( get_itbl(obj)->type ) {
     case INVALID_OBJECT:
             barf("Invalid object");
-#ifdef GHCI
     case BCO:
             disassemble( (StgBCO*)obj );
             break;
-#endif
 
     case AP_UPD:
         {
@@ -176,6 +176,14 @@ void printClosure( StgClosure *obj )
       fprintf(stderr,")\n"); 
       break;
 
+#ifdef DIST      
+    case REMOTE_REF:
+      fprintf(stderr,"REMOTE_REF("); 
+      printGA((globalAddr *)stgCast(StgFetchMe*,obj)->ga);
+      fprintf(stderr,")\n"); 
+      break;
+#endif
+  
     case FETCH_ME_BQ:
       fprintf(stderr,"FETCH_ME_BQ("); 
       // printGA((globalAddr *)stgCast(StgFetchMe*,obj)->ga);
@@ -345,7 +353,6 @@ StgPtr printStackObj( StgPtr sp )
     } else {
         StgClosure* c = (StgClosure*)(*sp);
         printPtr((StgPtr)*sp);
-#ifdef GHCI
         if (c == (StgClosure*)&stg_ctoi_ret_R1p_info) {
            fprintf(stderr, "\t\t\tstg_ctoi_ret_R1p_info\n" );
        } else
@@ -358,7 +365,9 @@ StgPtr printStackObj( StgPtr sp )
         if (c == (StgClosure*)&stg_ctoi_ret_D1_info) {
            fprintf(stderr, "\t\t\tstg_ctoi_ret_D1_info\n" );
        } else
-#endif
+        if (c == (StgClosure*)&stg_ctoi_ret_V_info) {
+           fprintf(stderr, "\t\t\tstg_ctoi_ret_V_info\n" );
+       } else
         if (get_itbl(c)->type == BCO) {
            fprintf(stderr, "\t\t\t");
            fprintf(stderr, "BCO(...)\n"); 
@@ -553,7 +562,8 @@ static char *closure_type_names[] = {
   "FETCH_ME_BQ",                /* 62 */
   "RBH",                        /* 63 */
   "EVACUATED",                  /* 64 */
-  "N_CLOSURE_TYPES"            /* 65 */
+  "REMOTE_REF",                 /* 65 */
+  "N_CLOSURE_TYPES"            /* 66 */
 };
 
 char *
@@ -793,7 +803,7 @@ static void printZcoded( const char *raw )
 /* Causing linking trouble on Win32 plats, so I'm
    disabling this for now. 
 */
-#if defined(HAVE_BFD_H) && !defined(_WIN32)
+#if defined(HAVE_BFD_H) && !defined(_WIN32) && !defined(PAR) && !defined(GRAN)
 
 #include <bfd.h>