Changeset 8706


Ignore:
Timestamp:
Mar 11, 2008, 2:53:17 AM (12 years ago)
Author:
gz
Message:

Tweaks to make disassembler work again

Location:
branches/working-0711/ccl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/compiler/X86/x86-disassemble.lisp

    r8560 r8706  
    2222  (require "X86-ASM")
    2323  (require "X86-LAP"))
    24 
    25 (defvar *use-source-notes* t)
    2624
    2725(defstruct (x86-disassembled-instruction (:include dll-node)
     
    27282726         (entry (x86-ds-entry-point ds)))
    27292727    (let* ((pc (- addr entry)))
    2730       (let* ((source-note (and *use-source-notes*
    2731                                (source-note-from-%lfun-info (%lfun-info function))))
     2728      (let* ((source-text (source-text-from-%lfun-info (%lfun-info function)))
    27322729             (source-info (find-source-at-pc function pc))
    2733              (text (if (and source-info
     2730             (text (if (and source-text
     2731                            source-info
    27342732                            (plusp (car (getf source-info :source-text-range)))
    27352733                            (plusp (cdr (getf source-info :source-text-range))))
    27362734                       (string-sans-most-whitespace
    2737                         (subseq (source-note-text source-note)
     2735                        (subseq source-text
    27382736                                (car (getf source-info :source-text-range))
    27392737                                (cdr (getf source-info :source-text-range)))
     
    27692767    (when source-note
    27702768      (format t ";; Source: ~S:~D-~D"
    2771               (if (listp source-note)
    2772                   (getf source-note :file-name)
    2773                   (source-note-file-name source-note))
    2774               (if (listp source-note)
    2775                   (getf source-note :start)
    2776                   (source-note-start-pos source-note))
    2777               (if (listp source-note)
    2778                   (getf source-note :end)
    2779                   (source-note-end-pos source-note))))))
     2769              (getf source-note :file-name)
     2770              (getf source-note :start)
     2771              (getf source-note :end)))))
    27802772
    27812773(defun x8664-disassemble-xfunction (function xfunction
  • branches/working-0711/ccl/compiler/X86/x862.lisp

    r8670 r8706  
    706706                        (t nil))
    707707        do (setf (aref vec index) mapping))
    708       vec)))
     708      ;; Remove source notes that didn't pan out (forms from other sources)
     709      (delete nil vec))))
    709710
    710711(defun x862-vinsn-note-label-address (note &optional start-p sym)
  • branches/working-0711/ccl/compiler/nx0.lisp

    r8685 r8706  
    22832283                   (eq (%car form) 'the)
    22842284                   (eq source (gethash (caddr form) source-note-map)))
    2285         (setf (gethash form source-note-map) source)))
     2285        (unless (eq form (%unbound-marker))
     2286          (setf (gethash form source-note-map) source))))
    22862287    (values form changed)))
    22872288
  • branches/working-0711/ccl/level-1/l1-reader.lisp

    r8684 r8706  
    30203020          (when file-name (list :file-name (source-note-file-name note)))))
    30213021
    3022 #+bit-rotted
    3023 (defun source-note-from-%lfun-info (lfun-info)
     3022(defun source-text-from-%lfun-info (lfun-info)
    30243023  (let ((note-plist (getf lfun-info 'function-source-note)))
    3025     (%make-source-note :file-name (getf note-plist :file-name)
    3026                        :start-pos (getf note-plist :start)
    3027                        :end-pos (getf note-plist :end)
    3028                        :source (%fast-uncompact (getf note-plist :%text))
    3029                        )))
     3024    (%fast-uncompact (getf note-plist :%text))))
    30303025
    30313026(defun register-code-note-parent (note parent)
Note: See TracChangeset for help on using the changeset viewer.