Changeset 12907
- Timestamp:
- Oct 4, 2009, 6:46:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/watchpoints/level-1/x86-trap-support.lisp
r12904 r12907 432 432 ((= code 2) 433 433 ;; Write to a watched object. 434 ;; We somehow need to guard against another thread unwatching 435 ;; the object out from underneath us. 434 436 (flet ((%int-to-object (i) 435 437 (rlet ((a :address)) … … 445 447 :object object) 446 448 nil frame-ptr) 449 ;; This certainly has the potential to cause amusing 450 ;; errors. 451 (allow () 452 :report "Allow this write." 453 (let ((result nil) 454 (ptr (%int-to-ptr 455 (logandc2 addr (1- *host-page-size*))))) 456 (with-other-threads-suspended 457 (#_mprotect ptr *host-page-size* 458 #$PROT_WRITE) 459 (setq result (x86-emulate-write-instruction xp insn addr object)) 460 (#_mprotect ptr *host-page-size* 461 (logior #$PROT_READ #$PROT_EXEC))) 462 (if result 463 (setq skip insn-length) 464 (error "can't emulate this write")))) 447 465 (ignore () 448 466 :report "Ignore this write."
Note:
See TracChangeset
for help on using the changeset viewer.
