diff options
author | Andy Wingo <wingo@pobox.com> | 2014-05-04 11:46:18 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-05-04 11:46:18 +0200 |
commit | 7c080187bc55e84159b99faa9b7ae9f0a8ae90d2 (patch) | |
tree | f9e9f3df501113e8e6504449ec63fb8a689a826f /libguile | |
parent | 18f8fd0211714f4d18ebab4dc4b85950c97483f4 (diff) | |
download | guile-7c080187bc55e84159b99faa9b7ae9f0a8ae90d2.tar.gz |
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.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/frames.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/frames.c b/libguile/frames.c index cf9648d57..2162f49ce 100644 --- a/libguile/frames.c +++ b/libguile/frames.c @@ -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 |