[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What?
I got this compiler output:
File: /afs/cs.cmu.edu/user/chiles/rt-port/breakpoints/patch.lisp
In: DEFUN BREAKPOINT-INFO
(DEFUN BREAKPOINT-INFO (BREAKPOINT)
"This returns the user maintained info associated with breakpoint. This
is SETF'able."
(BREAKPOINT-%INFO BREAKPOINT))
--> C::%DEFUN
==>
(C::%DEFUN 'BREAKPOINT-INFO
#'(LAMBDA (BREAKPOINT) (BLOCK BREAKPOINT-INFO #))
"This returns the user maintained info associated with breakpoint. This
is SETF'able."
'(DEFUN BREAKPOINT-INFO (BREAKPOINT)
"This returns the user maintained info associated with breakpoint. This
is SETF'able."
(BREAKPOINT-%INFO BREAKPOINT)))
Warning: Undefining structure type:
BREAKPOINT
so that this slot accessor can be redefined:
BREAKPOINT-INFO
Here are two source fragments:
(defstruct (breakpoint (:print-function print-breakpoint)
(:constructor %make-breakpoint
(hook-function what kind %info)))
;;
;; This is the function invoked when execution encounters the breakpoint. It
;; takes a frame, the breakpoint, and optionally a list of values. Values
;; are supplied for :function-end breakpoints as values to return for the
;; function containing the breakpoint.
(hook-function nil :type function)
;;
;; Code-location or debug-function.
(what nil :type (or code-location debug-function))
;;
;; :code-location, :function-start, or :function-end.
(kind nil :type (member :code-location :function-start :function-end))
;;
;; Status helps the user and the implementation.
(status :inactive :type (member :active :inactive :deleted))
;;
;; This is a backpointer to a breakpoint-data.
(internal-data nil :type (or null breakpoint-data))
;;
;; With code-locations whose type is :unknown-return, execution flows through
;; starting at one of two instructions. In this situation, we make two
;; breakpoints, giving the user one, and link them together through this
;; slot. If execution goes from one instruction to the other, we must make
;; sure we only invoke the hook-functions once.
(unknown-return-partner nil :type (or null breakpoint))
;;
;; This slot users can set with whatever information they find useful.
%info)
(defun breakpoint-info (breakpoint)
"This returns the user maintained info associated with breakpoint. This
is SETF'able."
(breakpoint-%info breakpoint))
;;;
(defun %set-breakpoint-info (breakpoint value)
(setf (breakpoint-%info breakpoint) value)
(let ((other (breakpoint-unknown-return-partner breakpoint)))
(when other
(setf (breakpoint-%info other) value))))
;;;
(defsetf breakpoint-info %set-breakpoint-info)
Bill