#define D_TRACE_ON_ERROR 12
#define D_PER_FILE 13
#define D_BIGNUM 14
-
+#define D_PRINT_ERRORS 15
#ifndef LAST_SWITCH
-#define LAST_SWITCH D_BIGNUM
+#define LAST_SWITCH D_PRINT_ERRORS
#endif
static bool *
case D_TRACE_ON_ERROR: return (&Trace_On_Error);
case D_PER_FILE: return (&Per_File);
case D_BIGNUM: return (&Bignum_Debug);
+ case D_PRINT_ERRORS: return (&Print_Errors);
MORE_DEBUG_FLAG_CASES ();
default: return (0);
}
case D_TRACE_ON_ERROR: return ("Trace_On_Error");
case D_PER_FILE: return ("Per_File");
case D_BIGNUM: return ("Bignum_Debug");
+ case D_PRINT_ERRORS: return ("Print_Errors");
MORE_DEBUG_FLAG_NAMES ();
default: return ("Unknown Debug Flag");
}
extern bool Lookup_Debug;
extern bool GC_Debug;
extern bool Upgrade_Debug;
- extern bool Trace_On_Error;
extern bool Dump_Debug;
+ extern bool Trace_On_Error;
extern bool Per_File;
extern bool Bignum_Debug;
+ extern bool Print_Errors;
extern bool verify_heap (void);
extern void Pop_Return_Break_Point (void);
# define Dump_Debug 0
# define Per_File 0
# define Bignum_Debug 0
+# define Print_Errors 0
#endif
extern SCHEME_OBJECT * Free;
bool Upgrade_Debug = false;
bool Dump_Debug = false;
bool Trace_On_Error = false;
- bool Bignum_Debug = false;
bool Per_File = false;
+ bool Bignum_Debug = false;
+ bool Print_Errors = true;
unsigned int debug_slotno = 0;
unsigned int debug_nslots = 0;
unsigned int local_slotno = 0;
SCHEME_OBJECT handler = SHARP_F;
#ifdef ENABLE_DEBUGGING_TOOLS
- err_print (error_code, ERROR_OUTPUT);
- if ((GET_RC == RC_INTERNAL_APPLY)
- || (GET_RC == RC_INTERNAL_APPLY_VAL))
+ if (Print_Errors)
{
- Print_Expression (STACK_REF(CONTINUATION_SIZE + STACK_ENV_FUNCTION),
- "Procedure");
- outf_error ("\n");
- {
- int i, nargs = (APPLY_FRAME_HEADER_N_ARGS
- (STACK_REF(CONTINUATION_SIZE + STACK_ENV_HEADER)));
- for (i = 0; i < nargs; i += 1)
+ err_print (error_code, ERROR_OUTPUT);
+ if ((GET_RC == RC_INTERNAL_APPLY)
+ || (GET_RC == RC_INTERNAL_APPLY_VAL))
+ {
+ Print_Expression (STACK_REF(CONTINUATION_SIZE + STACK_ENV_FUNCTION),
+ "Procedure");
+ outf_error ("\n");
{
- outf_error ("Argument %d: ", i+1);
- Print_Expression ((STACK_REF(CONTINUATION_SIZE
- + STACK_ENV_FIRST_ARG + i)), "");
- outf_error ("\n");
+ int i, nargs = (APPLY_FRAME_HEADER_N_ARGS
+ (STACK_REF(CONTINUATION_SIZE + STACK_ENV_HEADER)));
+ for (i = 0; i < nargs; i += 1)
+ {
+ outf_error ("Argument %d: ", i+1);
+ Print_Expression ((STACK_REF(CONTINUATION_SIZE
+ + STACK_ENV_FIRST_ARG + i)), "");
+ outf_error ("\n");
+ }
}
- }
- }
- else
- {
- Print_Expression (GET_EXP, "Expression");
- outf_error ("\n");
- Print_Expression (GET_ENV, "Environment");
+ }
+ else
+ {
+ Print_Expression (GET_EXP, "Expression");
+ outf_error ("\n");
+ Print_Expression (GET_ENV, "Environment");
+ outf_error ("\n");
+ }
+ Print_Return ("Return code");
outf_error ("\n");
}
- Print_Return ("Return code");
- outf_error ("\n");
#endif
if (Trace_On_Error)
(declare (usual-integrations))
\f
+;;; Suppress useless (expected) error reports from a ucode that has
+;;; --enabled-debugging.
+(if ((make-primitive-procedure 'get-primitive-address) 'set-debug-flags! #f)
+ ((make-primitive-procedure 'set-debug-flags!) 15 #f)) ;D_PRINT_ERRORS
+
;;; Can't just look at */test-*.scm because not everything has been
;;; converted to use the automatic framework.