are now implemented as closures (because
they're structure slot accessors) won't be so
nasty in the debugger
-* rewrote long-standing confusing error restarts for redefining
- DEFSTRUCTs
* outstanding embarrassments
** cut-and-pasted DEF-BOOLEAN-ATTRIBUTE (maybe easier to fix
now that EVAL-WHEN works correctly..)
*debug-command-level*))
(defparameter *debug-help-string*
-"The prompt is square brackets, with number(s) indicating the current control
- stack level and, if you've entered the debugger recursively, how deeply
- recursed you are.
+"The debug prompt is square brackets, with number(s) indicating the current
+ control stack level and, if you've entered the debugger recursively, how
+ deeply recursed you are.
Any command -- including the name of a restart -- may be uniquely abbreviated.
The debugger rebinds various special variables for controlling i/o, sometimes
to defaults (much like WITH-STANDARD-IO-SYNTAX does) and sometimes to
RESTART invokes restart numbered as shown (prompt if not given).
ERROR prints the error condition and restart cases.
The number of any restart, or its name, or a unique abbreviation for its
- name, is a valid command, and is the same as using RESTART to invoke that
- restart.
+ name, is a valid command, and is the same as using RESTART to invoke
+ that restart.
Changing frames:
U up frame D down frame
(let ((level *debug-command-level*)
(restart-commands (make-restart-commands)))
(with-simple-restart (abort
- "Reduce debugger level (to debug level ~W)."
+ "~@<Reduce debugger level (to debug level ~W).~@:>"
level)
(debug-prompt *debug-io*)
(force-output *debug-io*)
;;; (throw 'sb!impl::toplevel-catcher nil))
;;; CMU CL supported this GO debug command, but SBCL doesn't -- in
-;;; SBCL you just type the CONTINUE restart name instead (or "RESTART
-;;; CONTINUE", that's OK too).
-
+;;; SBCL you just type the CONTINUE restart name instead (or "C" or
+;;; "RESTART CONTINUE", that's OK too).
;;;(!def-debug-command "GO" ()
;;; (continue *debug-condition*)
;;; (error "There is no restart named CONTINUE."))
(if (dd-class-p dd)
(let ((inherits (inherits-for-structure dd)))
`(progn
+ ;; Note we intentionally call %DEFSTRUCT first, and
+ ;; especially before %COMPILER-DEFSTRUCT. %DEFSTRUCT
+ ;; has the tests (and resulting CERROR) for collisions
+ ;; with LAYOUTs which already exist in the runtime. If
+ ;; there are any collisions, we want the user's
+ ;; response to CERROR to control what happens.
+ ;; Especially, if the user responds to the collision
+ ;; with ABORT, we don't want %COMPILER-DEFSTRUCT to
+ ;; modify the definition of the class.
+ (%defstruct ',dd ',inherits)
(eval-when (:compile-toplevel :load-toplevel :execute)
(%compiler-defstruct ',dd ',inherits))
- (%defstruct ',dd ',inherits)
,@(unless expanding-into-code-for-xc-host-p
(append ;; FIXME: We've inherited from CMU CL nonparallel
;; code for creating copiers for typed and untyped
;; structures. This should be fixed.
- ;(copier-definition dd)
+ ;(copier-definition dd)
(constructor-definitions dd)
(class-method-definitions dd)))
',name))
(declare (type sb!xc:class class) (type layout old-layout new-layout))
(let ((name (class-proper-name class)))
(restart-case
- (error "redefining class ~S incompatibly with the current definition"
+ (error "~@<attempt to redefine the ~S class ~S incompatibly with the current definition~:@>"
+ 'structure-object
name)
(continue ()
- :report "Invalidate current definition."
- (warn "Previously loaded ~S accessors will no longer work." name)
- (register-layout new-layout))
+ :report (lambda (s)
+ (format s
+ "~@<Use the new definition of ~S, invalidating ~
+ already-loaded code and instances.~@:>"
+ name))
+ (register-layout new-layout))
+ (recklessly-continue ()
+ :report (lambda (s)
+ (format s
+ "~@<Use the new definition of ~S as if it were ~
+ compatible, allowing old accessors to use new ~
+ instances and allowing new accessors to use old ~
+ instances.~@:>"
+ name))
+ ;; classic CMU CL warning: "Any old ~S instances will be in a bad way.
+ ;; I hope you know what you're doing..."
+ (register-layout new-layout
+ :invalidate nil
+ :destruct-layout old-layout))
(clobber-it ()
- :report "Smash current layout, preserving old code."
- (warn "Any old ~S instances will be in a bad way.~@
- I hope you know what you're doing..."
- name)
- (register-layout new-layout :invalidate nil
- :destruct-layout old-layout))))
+ ;; FIXME: deprecated 2002-10-16, and since it's only interactive
+ ;; hackery instead of a supported feature, can probably be deleted
+ ;; in early 2003
+ :report "(deprecated synonym for RECKLESSLY-CONTINUE)"
+ (register-layout new-layout
+ :invalidate nil
+ :destruct-layout old-layout))))
(values))
;;; This is called when we are about to define a structure class. It
allocated objects into static space so that they stay pure. This takes
somewhat longer than the normal GC which is otherwise done, but it's
only done once, and subsequent GC's will be done less often and will
- take less time in the resulting core file. See PURIFY.
+ take less time in the resulting core file. See the PURIFY function.
:ROOT-STRUCTURES
This should be a list of the main entry points in any newly loaded
systems. This need not be supplied, but locality and/or GC performance
- may be better if they are. Meaningless if :PURIFY is NIL. See PURIFY.
+ may be better if they are. Meaningless if :PURIFY is NIL. See the
+ PURIFY function.
:ENVIRONMENT-NAME
- This is also passed to PURIFY when :PURIFY is T. (rarely used)
+ This is also passed to the PURIFY function when :PURIFY is T.
+ (rarely used)
The save/load process changes the values of some global variables:
*STANDARD-OUTPUT*, *DEBUG-IO*, etc.
;; get you out to here.
(with-simple-restart
(abort
- "Reduce debugger level (leaving debugger, returning to toplevel).")
+ "~@<Reduce debugger level (leaving debugger, returning to toplevel).~@:>")
(catch 'toplevel-catcher
#!-sunos (sb!unix:unix-sigsetmask 0) ; FIXME: What is this for?
;; in the event of a control-stack-exhausted-error, we should
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.8.43"
+"0.7.8.44"