X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fmonitor.c;h=5d08022f901161e1b01b82200c03dfd42bcfc64d;hb=1b650be8b800cf96e2c268ae317fb26d0bf36827;hp=e61faf32d71a28d79780cba108a014f4d8488f61;hpb=a3ab89c1db0dd9bfb911532ca134be16f16c4c1b;p=sbcl.git diff --git a/src/runtime/monitor.c b/src/runtime/monitor.c index e61faf3..5d08022 100644 --- a/src/runtime/monitor.c +++ b/src/runtime/monitor.c @@ -33,6 +33,7 @@ #include "globals.h" #include "lispregs.h" #include "interrupt.h" +#include "thread.h" #include "genesis/static-symbols.h" #include "genesis/primitive-objects.h" @@ -178,6 +179,7 @@ regs_cmd(char **ptr) #if !defined(__i386__) printf("BSP\t=\t0x%08X\n", (unsigned long)current_binding_stack_pointer); #endif +#if 0 #ifdef __i386__ printf("BSP\t=\t0x%08lx\n", (unsigned long)SymbolValue(BINDING_STACK_POINTER)); @@ -196,7 +198,7 @@ regs_cmd(char **ptr) (unsigned long)SymbolValue(STATIC_SPACE_FREE_POINTER)); 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 @@ -324,6 +326,10 @@ print_context(os_context_t *context) brief_print((lispobj)(*os_context_register_addr(context,i))); #endif } +#ifdef 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 printf("PC:\t\t 0x%08lx\n", (unsigned long)(*os_context_pc_addr(context))); } @@ -332,8 +338,9 @@ static void print_context_cmd(char **ptr) { int free; + struct thread *thread=arch_os_get_current_thread(); - free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX)>>2; + free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread)>>2; if (more_p(ptr)) { int index; @@ -343,7 +350,7 @@ print_context_cmd(char **ptr) if ((index >= 0) && (index < free)) { printf("There are %d interrupt contexts.\n", free); printf("printing context %d\n", index); - print_context(lisp_interrupt_contexts[index]); + print_context(thread->interrupt_contexts[index]); } else { printf("There aren't that many/few contexts.\n"); printf("There are %d interrupt contexts.\n", free); @@ -354,7 +361,7 @@ print_context_cmd(char **ptr) else { printf("There are %d interrupt contexts.\n", free); printf("printing context %d\n", free - 1); - print_context(lisp_interrupt_contexts[free - 1]); + print_context(thread->interrupt_contexts[free - 1]); } } } @@ -378,8 +385,9 @@ static void catchers_cmd(char **ptr) { struct catch_block *catch; + struct thread *thread=arch_os_get_current_thread(); - catch = (struct catch_block *)SymbolValue(CURRENT_CATCH_BLOCK); + catch = (struct catch_block *)SymbolValue(CURRENT_CATCH_BLOCK,thread); if (catch == NULL) printf("There are no active catchers!\n");