Changeset 12881


Ignore:
Timestamp:
Sep 23, 2009, 7:28:43 PM (10 years ago)
Author:
rme
Message:

In error callback, add restart to unwatch object and continue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/watchpoints/level-1/x86-trap-support.lisp

    r12817 r12881  
    435435                         (setf (%get-ptr a) (%int-to-ptr i))
    436436                         (%get-object a 0))))
    437                 (%error (make-condition
    438                          'write-to-watched-object
    439                          :address addr
    440                          :object (%int-to-object other))
    441                         nil frame-ptr)))))
     437                (let ((object (%int-to-object other)))
     438                  (restart-case (%error (make-condition
     439                                         'write-to-watched-object
     440                                         :address addr
     441                                         :object object)
     442                                        nil frame-ptr)
     443                  (unwatch ()
     444                    :report (lambda (s)
     445                              (format s "Unwatch ~s and perform the write." object))
     446                    (unwatch (%int-to-object other)))))))))
    442447          ((= signal #+win32-target 10 #-win32-target #$SIGBUS)
    443448           (if (= code -1)
     
    452457  0)
    453458
     459#||
     460(defun analyze-faulting-instruction (xp)
     461  (let* ((ds (make-x86-disassembly-state
     462              :mode-64 #+x8664-target t #+x8632-target nil))
     463         (insn (make-x86-disassembled-instruction
     464                :address (indexed-gpr-integer xp rip-register-offset)
     465||#
Note: See TracChangeset for help on using the changeset viewer.