summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-10-18 11:38:36 +0200
committerAndy Wingo <wingo@pobox.com>2013-10-18 11:39:35 +0200
commit9dff1df97f7021b1d2edd5dd73d1ca426def943b (patch)
tree17d33b14af4dcf4776a84ec3cac431b7eca4d33c
parent919f304fb29186302657c23f0702110075440291 (diff)
downloadguile-9dff1df97f7021b1d2edd5dd73d1ca426def943b.tar.gz
(system vm debug): implement arity-low-pc, arity-high-pc
* module/system/vm/debug.scm (arity-low-pc, arity-high-pc): Implement these exports.
-rw-r--r--module/system/vm/debug.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm
index f7adb20a3..8eb423748 100644
--- a/module/system/vm/debug.scm
+++ b/module/system/vm/debug.scm
@@ -253,6 +253,14 @@ section of the ELF image. Returns an ELF symbol, or @code{#f}."
(define (has-keyword-args? flags) (not (zero? (logand flags (ash 1 2)))))
(define (is-case-lambda? flags) (not (zero? (logand flags (ash 1 3)))))
+(define (arity-low-pc arity)
+ (arity-low-pc* (elf-bytes (debug-context-elf (arity-context arity)))
+ (arity-header-offset arity)))
+
+(define (arity-high-pc arity)
+ (arity-high-pc* (elf-bytes (debug-context-elf (arity-context arity)))
+ (arity-header-offset arity)))
+
(define (arity-nreq arity)
(arity-nreq* (elf-bytes (debug-context-elf (arity-context arity)))
(arity-header-offset arity)))