mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
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.
This commit is contained in:
parent
393301c519
commit
08d7492cf0
2 changed files with 5 additions and 0 deletions
4
gdbinit
4
gdbinit
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue