diff --git a/gdbinit b/gdbinit index 812f04b59..fdc9c759b 100644 --- a/gdbinit +++ b/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 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))