X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fbacktrace.c;h=1b300ba5849849b7915c9ba2f18da9c0f30bf57f;hb=a5b84ffa6a4599b958f4c856c39e55712ccb8cc2;hp=18f93a021c4a2fce6a2c98e68b8fa28a5651b9eb;hpb=6e662062162ad5a6f09d6d3a5ec1249520e813a5;p=sbcl.git diff --git a/src/runtime/backtrace.c b/src/runtime/backtrace.c index 18f93a0..1b300ba 100644 --- a/src/runtime/backtrace.c +++ b/src/runtime/backtrace.c @@ -21,6 +21,12 @@ #include "os.h" #include "interrupt.h" #include "lispregs.h" +#ifdef LISP_FEATURE_GENCGC +#include "gencgc-alloc-region.h" +#endif +#include "genesis/static-symbols.h" +#include "genesis/primitive-objects.h" +#include "thread.h" #ifndef __i386__ @@ -90,7 +96,8 @@ code_pointer(lispobj object) static boolean cs_valid_pointer_p(struct call_frame *pointer) { - return (((char *) CONTROL_STACK_START <= (char *) pointer) && + struct thread *thread=arch_os_get_current_thread(); + return (((char *) thread->control_stack_start <= (char *) pointer) && ((char *) pointer < (char *) current_control_stack_pointer)); } @@ -146,6 +153,7 @@ static int previous_info(struct call_info *info) { struct call_frame *this_frame; + struct thread *thread=arch_os_get_current_thread(); int free; if (!cs_valid_pointer_p(info->frame)) { @@ -163,10 +171,10 @@ previous_info(struct call_info *info) if (info->lra == NIL) { /* We were interrupted. Find the correct signal context. */ - free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX)>>2; + free = SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,thread)>>2; while (free-- > 0) { os_context_t *context = - lisp_interrupt_contexts[free]; + thread->interrupt_contexts[free]; if ((struct call_frame *)(*os_context_register_addr(context, reg_CFP)) == info->frame) {