Commit d17bc6c4 authored by simonmar's avatar simonmar
Browse files

[project @ 2000-10-06 15:35:09 by simonmar]

Add a debug flag for the object linker.
parent c4ec36d6
/* -----------------------------------------------------------------------------
* $Id: RtsFlags.c,v 1.31 2000/08/03 11:28:35 simonmar Exp $
* $Id: RtsFlags.c,v 1.32 2000/10/06 15:35:09 simonmar Exp $
*
* (c) The AQUA Project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
......@@ -67,7 +67,8 @@ char *debug_opts_strs[] = {
"DEBUG (-D256): stable\n",
"DEBUG (-D512): prof\n",
"DEBUG (-D1024): gran\n",
"DEBUG (-D2048): par\n"
"DEBUG (-D2048): par\n",
"DEBUG (-D4096): linker\n"
};
char *debug_opts_prefix[] = {
......@@ -83,6 +84,7 @@ char *debug_opts_prefix[] = {
"_!", /* prof */
"_=", /* gran */
"_=" /* par */
"_*" /* linker */
};
#if defined(GRAN)
......@@ -1784,18 +1786,19 @@ set_debug_options(nat n) {
if ((n>>i)&1) {
fprintf(stderr, debug_opts_strs[i]);
switch (i) {
case 0: RtsFlags.DebugFlags.scheduler = rtsTrue; break;
case 1: RtsFlags.DebugFlags.evaluator = rtsTrue; break;
case 2: RtsFlags.DebugFlags.codegen = rtsTrue; break;
case 3: RtsFlags.DebugFlags.weak = rtsTrue; break;
case 4: RtsFlags.DebugFlags.gccafs = rtsTrue; break;
case 5: RtsFlags.DebugFlags.gc = rtsTrue; break;
case 6: RtsFlags.DebugFlags.block_alloc = rtsTrue; break;
case 7: RtsFlags.DebugFlags.sanity = rtsTrue; break;
case 8: RtsFlags.DebugFlags.stable = rtsTrue; break;
case 9: RtsFlags.DebugFlags.prof = rtsTrue; break;
case 10: RtsFlags.DebugFlags.gran = rtsTrue; break;
case 11: RtsFlags.DebugFlags.par = rtsTrue; break;
case 0: RtsFlags.DebugFlags.scheduler = rtsTrue; break;
case 1: RtsFlags.DebugFlags.evaluator = rtsTrue; break;
case 2: RtsFlags.DebugFlags.codegen = rtsTrue; break;
case 3: RtsFlags.DebugFlags.weak = rtsTrue; break;
case 4: RtsFlags.DebugFlags.gccafs = rtsTrue; break;
case 5: RtsFlags.DebugFlags.gc = rtsTrue; break;
case 6: RtsFlags.DebugFlags.block_alloc = rtsTrue; break;
case 7: RtsFlags.DebugFlags.sanity = rtsTrue; break;
case 8: RtsFlags.DebugFlags.stable = rtsTrue; break;
case 9: RtsFlags.DebugFlags.prof = rtsTrue; break;
case 10: RtsFlags.DebugFlags.gran = rtsTrue; break;
case 11: RtsFlags.DebugFlags.par = rtsTrue; break;
case 12: RtsFlags.DebugFlags.linker = rtsTrue; break;
} /* switch */
} /* if */
}
......
/* -----------------------------------------------------------------------------
* $Id: RtsFlags.h,v 1.26 2000/08/03 11:28:35 simonmar Exp $
* $Id: RtsFlags.h,v 1.27 2000/10/06 15:35:09 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -59,9 +59,12 @@ struct DEBUG_FLAGS {
rtsBool prof : 1; /* 512 */
rtsBool gran : 1; /* 1024 */
rtsBool par : 1; /* 2048 */
/* The object linker */
rtsBool linker : 1; /* 4096 */
};
#define MAX_DEBUG_OPTION 11
#define MAX_DEBUG_OPTION 12
#define DEBUG_MASK(n) ((nat)(ldexp(1,n)))
#define MAX_DEBUG_MASK ((nat)(ldexp(1,(MAX_DEBUG_OPTION+1))-1))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment