diff options
author | Andy Wingo <wingo@pobox.com> | 2009-12-10 16:03:23 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-12-10 16:03:23 +0100 |
commit | 08d7492cf0eab3165ca260b8aa060de8ae508e1c (patch) | |
tree | 77530c050857d3b4b258155a6299a0e3a7116545 | |
parent | 393301c5190d41f531c22b18f70e450207ea1418 (diff) | |
download | guile-08d7492cf0eab3165ca260b8aa060de8ae508e1c.tar.gz |
add gbt macro to gdbinit, and fix a bug in program-arity
* gdbinit: Add gbt macro, to make a Guile backtrace whenever you want.
* module/system/vm/program.scm (program-arity): If ip is #f, just take
the first arity.
-rw-r--r-- | gdbinit | 4 | ||||
-rw-r--r-- | module/system/vm/program.scm | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -198,3 +198,7 @@ end define inst p scm_instruction_table[$arg0] end + +define gbt + call scm_display_backtrace (scm_make_stack(0x404,0x304), scm_current_error_port (), 0x704, 0x704, 0x704) +end diff --git a/module/system/vm/program.scm b/module/system/vm/program.scm index 99f9a3cb9..31b667bb0 100644 --- a/module/system/vm/program.scm +++ b/module/system/vm/program.scm @@ -121,6 +121,7 @@ (and arities (let lp ((arities arities)) (cond ((null? arities) #f) + ((not ip) (car arities)) ; take the first one ((and (< (arity:start (car arities)) ip) (<= ip (arity:end (car arities)))) (car arities)) |