Changeset 12903


Ignore:
Timestamp:
Oct 3, 2009, 3:42:17 AM (10 years ago)
Author:
rme
Message:

Add instruction slot to write-to-watched-object condition. Print it out
when reporting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/watchpoints/level-1/l1-error-system.lisp

    r12821 r12903  
    105105(define-condition write-to-watched-object (storage-condition)
    106106  ((address :initarg :address)
     107   (instruction :initform nil :initarg :instruction)
    107108   (object :initform nil :initarg :object))
    108109  (:report (lambda (c s)
    109              (with-slots (object address) c
     110             (with-slots (object address instruction) c
    110111               (if (uvectorp object)
    111112                 ;; This is safe only because watched objects are in a
     
    121122                        (index (/ offset bytes-per-element)))
    122123                   (format s "Write to watched object ~s at address #x~x (uvector index ~d)." object address index))
    123                  (format s "Write to watched object ~s at address #x~x" object address))))))
     124                 (format s "Write to watched object ~s at address #x~x" object address))
     125               (let* ((ds (make-x86-disassembly-state :mode-64 #+x8664-target t
     126                                                      #+x8632-target nil
     127                                                      :code-vector nil
     128                                                      :code-pointer 0))
     129                      (str (with-output-to-string (*standard-output*)
     130                             (x86-print-one-disassembled-instruction ds instruction))))
     131                 (format s "~&Faulting instruction: ~a" (string-trim " " str)))))))
    124132
    125133(define-condition type-error (error)
Note: See TracChangeset for help on using the changeset viewer.