projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.7.13.28:
[sbcl.git]
/
src
/
runtime
/
backtrace.c
diff --git
a/src/runtime/backtrace.c
b/src/runtime/backtrace.c
index
a7ebb37
..
12f954f
100644
(file)
--- a/
src/runtime/backtrace.c
+++ b/
src/runtime/backtrace.c
@@
-13,10
+13,6
@@
* files for more information.
*/
* files for more information.
*/
-/*
- * $Header$
- */
-
#include <stdio.h>
#include <signal.h>
#include "runtime.h"
#include <stdio.h>
#include <signal.h>
#include "runtime.h"
@@
-25,6
+21,8
@@
#include "os.h"
#include "interrupt.h"
#include "lispregs.h"
#include "os.h"
#include "interrupt.h"
#include "lispregs.h"
+#include "genesis/static-symbols.h"
+#include "genesis/primitive-objects.h"
#ifndef __i386__
#ifndef __i386__
@@
-68,16
+66,16
@@
code_pointer(lispobj object)
lispobj *headerp, header;
int type, len;
lispobj *headerp, header;
int type, len;
- headerp = (lispobj *) PTR(object);
+ headerp = (lispobj *) native_pointer(object);
header = *headerp;
header = *headerp;
- type = TypeOf(header);
+ type = widetag_of(header);
switch (type) {
switch (type) {
- case type_CodeHeader:
+ case CODE_HEADER_WIDETAG:
break;
break;
- case type_ReturnPcHeader:
- case type_FunctionHeader:
- case type_ClosureFunctionHeader:
+ case RETURN_PC_HEADER_WIDETAG:
+ case SIMPLE_FUN_HEADER_WIDETAG:
+ case CLOSURE_FUN_HEADER_WIDETAG:
len = HEADER_LENGTH(header);
if (len == 0)
headerp = NULL;
len = HEADER_LENGTH(header);
if (len == 0)
headerp = NULL;
@@
-94,8
+92,8
@@
code_pointer(lispobj object)
static boolean
cs_valid_pointer_p(struct call_frame *pointer)
{
static boolean
cs_valid_pointer_p(struct call_frame *pointer)
{
- return (((char *) control_stack <= (char *) pointer) &&
- ((char *) pointer < (char *) current_control_stack_pointer));
+ return (((char *) CONTROL_STACK_START <= (char *) pointer) &&
+ ((char *) pointer < (char *) current_control_stack_pointer));
}
static void
}
static void
@@
-116,8
+114,8
@@
call_info_from_context(struct call_info *info, os_context_t *context)
unsigned long pc;
info->interrupted = 1;
unsigned long pc;
info->interrupted = 1;
- if (LowtagOf(*os_context_register_addr(context, reg_CODE))
- == type_FunctionPointer) {
+ if (lowtag_of(*os_context_register_addr(context, reg_CODE))
+ == FUN_POINTER_LOWTAG) {
/* We tried to call a function, but crapped out before $CODE could
* be fixed up. Probably an undefined function. */
info->frame =
/* We tried to call a function, but crapped out before $CODE could
* be fixed up. Probably an undefined function. */
info->frame =
@@
-125,7
+123,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);
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 =
}
else {
info->frame =
@@
-182,7
+180,7
@@
previous_info(struct call_info *info)
else {
info->code = code_pointer(info->lra);
if (info->code != NULL)
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));
(unsigned long)info->code -
#ifndef alpha
(HEADER_LENGTH(info->code->header) * sizeof(lispobj));
@@
-210,7
+208,7
@@
backtrace(int nframes)
if (info.code != (struct code *) 0) {
lispobj function;
if (info.code != (struct code *) 0) {
lispobj function;
- printf("CODE: 0x%08X, ", (unsigned long) info.code | type_OtherPointer);
+ printf("CODE: 0x%08X, ", (unsigned long) info.code | OTHER_POINTER_LOWTAG);
#ifndef alpha
function = info.code->entry_points;
#ifndef alpha
function = info.code->entry_points;
@@
-218,24
+216,24
@@
backtrace(int nframes)
function = ((struct code *)info.code)->entry_points;
#endif
while (function != NIL) {
function = ((struct code *)info.code)->entry_points;
#endif
while (function != NIL) {
- struct function *header;
+ struct simple_fun *header;
lispobj name;
lispobj name;
- header = (struct function *) PTR(function);
+ header = (struct simple_fun *) native_pointer(function);
name = header->name;
name = header->name;
- if (LowtagOf(name) == type_OtherPointer) {
+ if (lowtag_of(name) == OTHER_POINTER_LOWTAG) {
lispobj *object;
lispobj *object;
- object = (lispobj *) PTR(name);
+ object = (lispobj *) native_pointer(name);
- if (TypeOf(*object) == type_SymbolHeader) {
+ if (widetag_of(*object) == SYMBOL_HEADER_WIDETAG) {
struct symbol *symbol;
symbol = (struct symbol *) object;
struct symbol *symbol;
symbol = (struct symbol *) object;
- object = (lispobj *) PTR(symbol->name);
+ object = (lispobj *) native_pointer(symbol->name);
}
}
- if (TypeOf(*object) == type_SimpleString) {
+ if (widetag_of(*object) == SIMPLE_STRING_WIDETAG) {
struct vector *string;
string = (struct vector *) object;
struct vector *string;
string = (struct vector *) object;