X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fmonitor.c;h=222d27e170e513a326cd56ada58a24f3ce3b574e;hb=e67cc0f952040723f7d0f37ddb88fe895f4b1464;hp=5d08022f901161e1b01b82200c03dfd42bcfc64d;hpb=506253505641855dc8bb87033f7af894904f848b;p=sbcl.git diff --git a/src/runtime/monitor.c b/src/runtime/monitor.c index 5d08022..222d27e 100644 --- a/src/runtime/monitor.c +++ b/src/runtime/monitor.c @@ -18,8 +18,8 @@ #include #include -#include "runtime.h" #include "sbcl.h" +#include "runtime.h" /* Almost all of this file can be skipped if we're not supporting LDB. */ #if defined(LISP_FEATURE_SB_LDB) @@ -132,13 +132,13 @@ dump_cmd(char **ptr) } while (count-- > 0) { -#ifndef alpha +#ifndef LISP_FEATURE_ALPHA printf("0x%08lX: ", (unsigned long) addr); #else printf("0x%08X: ", (u32) addr); #endif if (is_valid_lisp_addr((os_vm_address_t)addr)) { -#ifndef alpha +#ifndef LISP_FEATURE_ALPHA unsigned long *lptr = (unsigned long *)addr; #else u32 *lptr = (u32 *)addr; @@ -176,17 +176,17 @@ 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(__i386__) +#if !(defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)) printf("BSP\t=\t0x%08X\n", (unsigned long)current_binding_stack_pointer); #endif #if 0 -#ifdef __i386__ +#if (defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)) printf("BSP\t=\t0x%08lx\n", (unsigned long)SymbolValue(BINDING_STACK_POINTER)); #endif printf("DYNAMIC\t=\t0x%08lx\n", (unsigned long)DYNAMIC_SPACE_START); -#if defined(__i386__) +#if (defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)) printf("ALLOC\t=\t0x%08lx\n", (unsigned long)SymbolValue(ALLOCATION_POINTER)); #else @@ -199,9 +199,6 @@ regs_cmd(char **ptr) printf("RDONLY\t=\t0x%08lx\n", (unsigned long)SymbolValue(READ_ONLY_SPACE_FREE_POINTER)); #endif /* 0 */ -#ifdef MIPS - printf("FLAGS\t=\t0x%08x\n", current_flags_register); -#endif } static void @@ -319,14 +316,14 @@ print_context(os_context_t *context) for (i = 0; i < NREGS; i++) { printf("%s:\t", lisp_register_names[i]); -#ifdef __i386__ +#ifdef LISP_FEATURE_X86 brief_print((lispobj)(*os_context_register_addr(context, i*2))); #else brief_print((lispobj)(*os_context_register_addr(context,i))); #endif } -#ifdef DARWIN +#ifdef LISP_FEATURE_DARWIN printf("DAR:\t\t 0x%08lx\n", (unsigned long)(*os_context_register_addr(context, 41))); printf("DSISR:\t\t 0x%08lx\n", (unsigned long)(*os_context_register_addr(context, 42))); #endif @@ -393,7 +390,7 @@ catchers_cmd(char **ptr) printf("There are no active catchers!\n"); else { while (catch != NULL) { -#ifndef __i386__ +#if !(defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)) printf("0x%08lX:\n\tuwp: 0x%08lX\n\tfp: 0x%08lX\n\tcode: 0x%08lx\n\tentry: 0x%08lx\n\ttag: ", (unsigned long)catch, (unsigned long)(catch->current_uwp), (unsigned long)(catch->current_cont), @@ -511,7 +508,11 @@ monitor_or_something() #if defined(LISP_FEATURE_SB_LDB) ldb_monitor(); #else - fprintf(stderr, "There's no LDB in this build; exiting.\n"); + fprintf(stderr, +"The system is too badly corrupted or confused to continue at the Lisp\n\ +level. If the system had been compiled with the SB-LDB feature, we'd drop\n\ +into the LDB low-level debugger now. But there's no LDB in this build, so\n\ +we can't really do anything but just exit, sorry.\n"); exit(1); #endif }