From b09b6ea72ab19bea03da26e98fbdd130ac3c5008 Mon Sep 17 00:00:00 2001 From: sof Date: Wed, 3 Mar 1999 19:16:29 +0000 Subject: [PATCH] [project @ 1999-03-03 19:16:29 by sof] Extend the reaches of #ifdef INTERPRETER a little bit. --- ghc/rts/Printer.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ghc/rts/Printer.c b/ghc/rts/Printer.c index cf0e06c..28fa132 100644 --- a/ghc/rts/Printer.c +++ b/ghc/rts/Printer.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Printer.c,v 1.7 1999/03/01 14:47:06 sewardj Exp $ + * $Id: Printer.c,v 1.8 1999/03/03 19:16:29 sof Exp $ * * Copyright (c) 1994-1999. * @@ -39,7 +39,7 @@ static void printZcoded ( const char *raw ); * Printer * ------------------------------------------------------------------------*/ - +#ifdef INTERPRETER extern void* itblNames[]; extern int nItblNames; char* lookupHugsItblName ( void* v ) @@ -49,6 +49,7 @@ char* lookupHugsItblName ( void* v ) if (itblNames[i] == v) return itblNames[i+1]; return NULL; } +#endif extern void printPtr( StgPtr p ) { @@ -59,9 +60,9 @@ extern void printPtr( StgPtr p ) #ifdef INTERPRETER } else if ((raw = lookupHugsName(p)) != 0) { fprintf(stderr, "%s", raw); -#endif } else if ((str = lookupHugsItblName(p)) != 0) { fprintf(stderr, "%p=%s", p, str); +#endif } else { fprintf(stderr, "%p", p); } @@ -348,10 +349,12 @@ StgPtr printStackObj( StgPtr sp ) } else { StgClosure* c = (StgClosure*)(*sp); printPtr((StgPtr)*sp); +#ifdef INTERPRETER if (c == &ret_bco_info) { fprintf(stderr, "\t\t"); fprintf(stderr, "ret_bco_info\n" ); } else +#endif if (IS_HUGS_CONSTR_INFO(GET_INFO(c))) { fprintf(stderr, "\t\t\t"); fprintf(stderr, "ConstrInfoTable\n" ); @@ -372,12 +375,12 @@ StgPtr printStackObj( StgPtr sp ) void printStackChunk( StgPtr sp, StgPtr spBottom ) { - StgNat32 bitmap; + StgWord32 bitmap; const StgInfoTable *info; ASSERT(sp <= spBottom); while (sp < spBottom) { - if (!IS_ARG_TAG(*sp) && LOOKS_LIKE_GHC_INFO(*sp)) { + if (!IS_ARG_TAG(*sp) && LOOKS_LIKE_GHC_INFO((void*)*sp)) { info = get_itbl((StgClosure *)sp); switch (info->type) { @@ -733,6 +736,7 @@ extern void DEBUG_LoadSymbols( char *name ) bfd* abfd; char **matching; +#ifndef _WIN32 bfd_init(); abfd = bfd_openr(name, "default"); if (abfd == NULL) { @@ -741,6 +745,7 @@ extern void DEBUG_LoadSymbols( char *name ) if (!bfd_check_format_matches (abfd, bfd_object, &matching)) { barf("mismatch"); } +#endif { long storage_needed; -- 1.7.10.4