1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 12:20:20 +02:00

fix rtl program arity functions

* libguile/programs.c (parse_arity): Lookup rtl-program-minimum-arity
  from (system vm debug).

* module/system/vm/debug.scm (find-first-arity): Fix the linear search.
  Whoops!
This commit is contained in:
Andy Wingo 2013-07-19 16:19:34 +02:00
parent f82f62944a
commit 081cf91029
2 changed files with 4 additions and 4 deletions

View file

@ -292,10 +292,10 @@ section of the ELF image. Returns an ELF symbol, or @code{#f}."
(let lp ((pos headers-start))
(cond
((>= pos headers-end) #f)
((< text-offset (arity-low-pc* bv pos))
(lp (+ pos arity-header-len)))
((< (arity-high-pc* bv pos) text-offset)
((< text-offset (* (arity-low-pc* bv pos) 4))
#f)
((<= (* (arity-high-pc* bv pos) 4) text-offset)
(lp (+ pos arity-header-len)))
(else
(make-arity context base pos))))))