guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, wip-rtl-halloween, updated. v2.1.0-334


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, wip-rtl-halloween, updated. v2.1.0-334-g0a1d52a
Date: Tue, 05 Nov 2013 20:29:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=0a1d52ac77e6424dbd1359827718af5a4d6c154a

The branch, wip-rtl-halloween has been updated
       via  0a1d52ac77e6424dbd1359827718af5a4d6c154a (commit)
      from  3659ef543e9b55a9747a83414dd07336608e4c5d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0a1d52ac77e6424dbd1359827718af5a4d6c154a
Author: Andy Wingo <address@hidden>
Date:   Tue Nov 5 21:29:46 2013 +0100

    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!

-----------------------------------------------------------------------

Summary of changes:
 module/system/vm/assembler.scm |    8 ++++----
 module/system/vm/debug.scm     |    9 ++++-----
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm
index fc870e6..f1663c0 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))
diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm
index 8eb4237..a0f1122 100644
--- a/module/system/vm/debug.scm
+++ b/module/system/vm/debug.scm
@@ -402,15 +402,14 @@ section of the ELF image.  Returns an ELF symbol, or 
@code{#f}."
        (let lp ((pos start))
          (cond
           ((>= pos end) #f)
-          ((< text-offset (bytevector-u32-native-ref bv pos))
+          ((< (bytevector-u32-native-ref bv pos) text-offset)
            (lp (+ pos docstr-len)))
-          ((> text-offset (bytevector-u32-native-ref bv pos))
-           #f)
-          (else
+          ((= text-offset (bytevector-u32-native-ref bv pos))
            (let ((strtab (elf-section (debug-context-elf context)
                                       (elf-section-link sec)))
                  (idx (bytevector-u32-native-ref bv (+ pos 4))))
-             (string-table-ref bv (+ (elf-section-offset strtab) idx))))))))))
+             (string-table-ref bv (+ (elf-section-offset strtab) idx))))
+          (else #f)))))))
 
 (define* (find-program-properties addr #:optional
                                   (context (find-debug-context addr)))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]