summaryrefslogtreecommitdiff
path: root/module/system/vm/program.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-10-04 19:55:12 +0200
committerAndy Wingo <wingo@pobox.com>2013-10-04 19:55:12 +0200
commitf8fb13ef8c3c491983a90bfcfac1257e93a8186d (patch)
treefa4a381a0286626277664500f08f4aae21bd0063 /module/system/vm/program.scm
parentfea115c33f35b95c89ebb9142faaa06a43d83036 (diff)
downloadguile-f8fb13ef8c3c491983a90bfcfac1257e93a8186d.tar.gz
better RTL debugging
* libguile/frames.c (scm_frame_source, scm_frame_instruction_pointer): Fix to work with RTL programs. * module/system/vm/debug.scm (find-debug-context): Allow for the possibility of there being no ELF image. (find-program-debug-info, find-program-arities) (program-minimum-arity, find-program-docstring) (find-program-properties, find-source-for-addr) (find-program-die, find-program-sources): Don't bail if we couldn't get the debug context. * module/system/vm/frame.scm (frame-next-source) (frame-call-representation): Allow RTL programs. * module/system/vm/program.scm (program-arguments-alist): Placeholder implementation for RTL programs. (program-arguments-alists): Don't bail if we couldn't get the arities.
Diffstat (limited to 'module/system/vm/program.scm')
-rw-r--r--module/system/vm/program.scm13
1 files changed, 9 insertions, 4 deletions
diff --git a/module/system/vm/program.scm b/module/system/vm/program.scm
index fb87d970a..86db41180 100644
--- a/module/system/vm/program.scm
+++ b/module/system/vm/program.scm
@@ -291,9 +291,14 @@
;; the name "program-arguments" is taken by features.c...
(define* (program-arguments-alist prog #:optional ip)
"Returns the signature of the given procedure in the form of an association list."
- (let ((arity (program-arity prog ip)))
- (and arity
- (arity->arguments-alist prog arity))))
+ (if (rtl-program? prog)
+ (or-map (lambda (arity)
+ (and #t
+ (arity-arguments-alist arity)))
+ (or (find-program-arities (rtl-program-code prog)) '()))
+ (let ((arity (program-arity prog ip)))
+ (and arity
+ (arity->arguments-alist prog arity)))))
(define* (program-lambda-list prog #:optional ip)
"Returns the signature of the given procedure in the form of an argument list."
@@ -322,7 +327,7 @@
(cond
((rtl-program? prog)
(map arity-arguments-alist
- (find-program-arities (rtl-program-code prog))))
+ (or (find-program-arities (rtl-program-code prog)) '())))
((program? prog)
(map (lambda (arity) (arity->arguments-alist prog arity))
(or (program-arities prog) '())))