Working on amd64 stack traces

darcs
slava 2006-11-16 07:12:03 +00:00
parent de1ebb9f1a
commit e371ffcae6
4 changed files with 22 additions and 0 deletions

1
vm/Config.amd64 Normal file
View File

@ -0,0 +1 @@
PLAF_OBJS += vm/cpu-amd64.o

View File

@ -1,2 +1,3 @@
include vm/Config.linux
include vm/Config.amd64
LIBPATH = -L/usr/X11R6/lib64 -L/usr/X11R6/lib

13
vm/cpu-amd64.S Normal file
View File

@ -0,0 +1,13 @@
#ifdef __APPLE__
#define MANGLE(sym) _##sym
#else
#define MANGLE(sym) sym
#endif
/* Callable from C as
void *native_stack_pointer(void) */
.globl MANGLE(native_stack_pointer)
MANGLE(native_stack_pointer):
mov %rsp,%rax
add $8,%rax
ret

View File

@ -5,3 +5,10 @@ register CELL rs asm("r15");
register CELL cards_offset asm("r13");
INLINE void flush_icache(CELL start, CELL len) {}
void *native_stack_pointer(void);
typedef struct _F_STACK_FRAME {
struct _F_STACK_FRAME *previous;
CELL *return_address;
} F_STACK_FRAME;