0.pre7.14.flaky4.5:
[sbcl.git] / src / runtime / backtrace.c
index a7ebb37..7895597 100644 (file)
  * files for more information.
  */
 
-/*
- * $Header$
- */
-
 #include <stdio.h>
 #include <signal.h>
 #include "runtime.h"
@@ -68,7 +64,7 @@ code_pointer(lispobj object)
     lispobj *headerp, header;
     int type, len;
 
-    headerp = (lispobj *) PTR(object);
+    headerp = (lispobj *) native_pointer(object);
     header = *headerp;
     type = TypeOf(header);
 
@@ -94,8 +90,9 @@ code_pointer(lispobj object)
 static boolean
 cs_valid_pointer_p(struct call_frame *pointer)
 {
-       return (((char *) control_stack <= (char *) pointer) &&
-               ((char *) pointer < (char *) current_control_stack_pointer));
+  /* lose("stub: hasn't been updated for X86"); */
+    return (((char *) CONTROL_STACK_START <= (char *) pointer) &&
+           ((char *) pointer < (char *) current_control_stack_pointer));
 }
 
 static void
@@ -125,7 +122,7 @@ call_info_from_context(struct call_info *info, os_context_t *context)
                                                            reg_OCFP));
         info->lra = (lispobj)(*os_context_register_addr(context, reg_LRA));
         info->code = code_pointer(info->lra);
-        pc = (unsigned long)PTR(info->lra);
+        pc = (unsigned long)native_pointer(info->lra);
     }
     else {
         info->frame =
@@ -182,7 +179,7 @@ previous_info(struct call_info *info)
     else {
         info->code = code_pointer(info->lra);
         if (info->code != NULL)
-            info->pc = (unsigned long)PTR(info->lra) -
+            info->pc = (unsigned long)native_pointer(info->lra) -
                 (unsigned long)info->code -
 #ifndef alpha
                 (HEADER_LENGTH(info->code->header) * sizeof(lispobj));
@@ -221,19 +218,19 @@ backtrace(int nframes)
                 struct function *header;
                 lispobj name;
 
-                header = (struct function *) PTR(function);
+                header = (struct function *) native_pointer(function);
                 name = header->name;
 
                 if (LowtagOf(name) == type_OtherPointer) {
                     lispobj *object;
 
-                    object = (lispobj *) PTR(name);
+                    object = (lispobj *) native_pointer(name);
 
                     if (TypeOf(*object) == type_SymbolHeader) {
                         struct symbol *symbol;
 
                         symbol = (struct symbol *) object;
-                        object = (lispobj *) PTR(symbol->name);
+                        object = (lispobj *) native_pointer(symbol->name);
                     }
                     if (TypeOf(*object) == type_SimpleString) {
                         struct vector *string;