1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

frame-address, frame-stack-pointer return offsets

* libguile/frames.c (scm_frame_address, scm_frame_stack_pointer): Return
  offsets instead of absolute pointers.  This is robust in the presence
  of stack relocation.

* module/system/repl/debug.scm (print-registers): Adapt to print sp and
  fp as integers.
This commit is contained in:
Andy Wingo 2014-05-04 11:46:18 +02:00
parent 18f8fd0211
commit 7c080187bc
2 changed files with 4 additions and 4 deletions

View file

@ -277,7 +277,7 @@ SCM_DEFINE (scm_frame_address, "frame-address", 1, 0, 0,
#define FUNC_NAME s_scm_frame_address
{
SCM_VALIDATE_VM_FRAME (1, frame);
return scm_from_uintptr_t ((scm_t_uintptr) SCM_VM_FRAME_FP (frame));
return scm_from_ptrdiff_t (SCM_VM_FRAME_FP_OFFSET (frame));
}
#undef FUNC_NAME
@ -288,7 +288,7 @@ SCM_DEFINE (scm_frame_stack_pointer, "frame-stack-pointer", 1, 0, 0,
{
SCM_VALIDATE_VM_FRAME (1, frame);
return scm_from_uintptr_t ((scm_t_uintptr) SCM_VM_FRAME_SP (frame));
return scm_from_ptrdiff_t (SCM_VM_FRAME_SP_OFFSET (frame));
}
#undef FUNC_NAME