Changeset 12983
- Timestamp:
- Oct 9, 2009, 9:47:12 PM (15 years ago)
- File:
-
- 1 edited
-
branches/watchpoints/level-1/l1-error-system.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/watchpoints/level-1/l1-error-system.lisp
r12932 r12983 104 104 105 105 (define-condition write-to-watched-object (storage-condition) 106 ((address :initarg :address) 106 ((object :initform nil :initarg :object 107 :reader write-to-watched-object-object) 108 (offset :initarg :offset) 107 109 (instruction :initform nil :initarg :instruction) 108 (object :initform nil :initarg :object) 109 (target :reader write-to-watched-object-target) 110 (location :reader write-to-watched-object-location)) 110 (containing-object :initform nil) 111 (location :initform nil :reader write-to-watched-object-location)) 111 112 (:report report-write-to-watched-object)) 112 113 113 (defmethod initialize-instance :after ((c onditionwrite-to-watched-object)114 (defmethod initialize-instance :after ((c write-to-watched-object) 114 115 &key &allow-other-keys) 115 (multiple-value-bind (what where) 116 (watched-object-and-location condition) 117 (setf (slot-value condition 'target) what 118 (slot-value condition 'location) where))) 116 (setf (slot-value c 'containing-object) 117 (watched-object-container (slot-value c 'object))) 118 (setf (slot-value c 'location) (watched-object-write-location c))) 119 119 120 120 (defun report-write-to-watched-object (c s) 121 (with-slots (object address instruction) c 122 ;; This is safe only because watched objects are in a 123 ;; static GC area and (we hope) won't be moved around. 124 (with-slots (target location) c 125 (format s "Write to watched object ~s, key/index ~s~%" 126 target location)) 121 (with-slots (object offset containing-object location instruction) c 122 (format s "~&Write to watched object ~s" object) 123 (unless (eq object containing-object) 124 (format s " (part of ~s)" containing-object)) 125 (format s ", location ~s" location) 127 126 (let* ((ds (make-x86-disassembly-state :mode-64 #+x8664-target t 128 127 #+x8632-target nil
Note:
See TracChangeset
for help on using the changeset viewer.
