X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fmonitor.c;h=72d31040b53aacb935bf6cc2b7d90bb427972a1d;hb=5d18b03968d5fc696790609ae0ac2669473fbfb7;hp=b607f04063b98ad38a5ba89d48760369b512dfb9;hpb=385e0bc833cf3f14bca389e22a0a2b647c282e6e;p=sbcl.git diff --git a/src/runtime/monitor.c b/src/runtime/monitor.c index b607f04..72d3104 100644 --- a/src/runtime/monitor.c +++ b/src/runtime/monitor.c @@ -20,13 +20,10 @@ #include "runtime.h" #include "sbcl.h" -#include "globals.h" -#include "vars.h" -#include "parse.h" -#include "os.h" -#include "interrupt.h" -#include "lispregs.h" -#include "monitor.h" + +/* Almost all of this file can be skipped if we're not supporting LDB. */ +#if defined(LISP_FEATURE_SB_LDB) + #include "print.h" #include "arch.h" #include "interr.h" @@ -172,7 +169,7 @@ regs_cmd(char **ptr) { printf("CSP\t=\t0x%08lX\n", (unsigned long)current_control_stack_pointer); printf("FP\t=\t0x%08lX\n", (unsigned long)current_control_frame_pointer); -#if !defined(ibmrt) && !defined(__i386__) +#if !defined(__i386__) printf("BSP\t=\t0x%08X\n", (unsigned long)current_binding_stack_pointer); #endif #ifdef __i386__ @@ -181,7 +178,7 @@ regs_cmd(char **ptr) #endif printf("DYNAMIC\t=\t0x%08lx\n", (unsigned long)DYNAMIC_SPACE_START); -#if defined(ibmrt) || defined(__i386__) +#if defined(__i386__) printf("ALLOC\t=\t0x%08lx\n", (unsigned long)SymbolValue(ALLOCATION_POINTER)); printf("TRIGGER\t=\t0x%08lx\n", @@ -216,7 +213,7 @@ search_cmd(char **ptr) return; } if (more_p(ptr)) { - addr = (lispobj *)PTR((long)parse_addr(ptr)); + addr = (lispobj *)native_pointer((long)parse_addr(ptr)); if (more_p(ptr)) { count = parse_number(ptr); } @@ -277,14 +274,14 @@ call_cmd(char **ptr) goto fdefn; } } - printf("symbol 0x%08lx is undefined.\n", (long unsigned)thing); + printf("Symbol 0x%08lx is undefined.\n", (long unsigned)thing); return; case type_Fdefn: fdefn: function = FDEFN(thing)->function; if (function == NIL) { - printf("fdefn 0x%08lx is undefined.\n", (long unsigned)thing); + printf("Fdefn 0x%08lx is undefined.\n", (long unsigned)thing); return; } break; @@ -557,3 +554,17 @@ throw_to_monitor() { longjmp(curbuf, 1); } + +#endif /* defined(LISP_FEATURE_SB_LDB) */ + +/* what we do when things go badly wrong at a low level */ +void +monitor_or_something() +{ +#if defined(LISP_FEATURE_SB_LDB) + ldb_monitor(); +#else + fprintf(stderr, "There's no LDB in this build; exiting.\n"); + exit(1); +#endif +}