diff options
author | Andy Wingo <wingo@pobox.com> | 2013-11-05 21:29:46 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-11-05 21:29:46 +0100 |
commit | 0a1d52ac77e6424dbd1359827718af5a4d6c154a (patch) | |
tree | 911106ea1d8b44bc21dc31b42f66662d79b645c4 /module/system/vm/assembler.scm | |
parent | 3659ef543e9b55a9747a83414dd07336608e4c5d (diff) | |
download | guile-0a1d52ac77e6424dbd1359827718af5a4d6c154a.tar.gz |
fix docstring assembly and fetching
* module/system/vm/assembler.scm (link-docstrs): Write pc offsets as
byte addresses. Works better with native code.
* module/system/vm/debug.scm (find-program-docstring): Fix the linear
search. How embarassing!
Diffstat (limited to 'module/system/vm/assembler.scm')
-rw-r--r-- | module/system/vm/assembler.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index fc870e692..f1663c010 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -1490,9 +1490,9 @@ it will be added to the GC roots at runtime." ;;; The .guile.docstrs section is a packed, sorted array of (pc, str) ;;; values. Pc and str are both 32 bits wide. (Either could change to ;;; 64 bits if appropriate in the future.) Pc is the address of the -;;; entry to a program, relative to the start of the text section, and -;;; str is an index into the associated .guile.docstrs.strtab string -;;; table section. +;;; entry to a program, relative to the start of the text section, in +;;; bytes, and str is an index into the associated .guile.docstrs.strtab +;;; string table section. ;;; ;; The size of a docstrs entry, in bytes. @@ -1508,7 +1508,7 @@ it will be added to the GC roots at runtime." (and tail (not (find-tail is-documentation? (cdr tail))) (string? (cdar tail)) - (cons (meta-low-pc meta) (cdar tail))))) + (cons (* 4 (meta-low-pc meta)) (cdar tail))))) (reverse (asm-meta asm)))) (let* ((endianness (asm-endianness asm)) (docstrings (find-docstrings)) |