Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the dissect Reference Manual, version 1.0.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 15:55:02 2021 GMT+0.
• Introduction | What dissect is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Dissect is a small library for introspecting the call stack and active restarts.
Since the call stack and restart inspection are not part of ANSI CL, pretty much all of Dissect is implementation-dependant. Currently the following implementations are supported:
Retrieving a list of restart objects is done through restarts
. Similarly, the current stack can be seen with stack
. Returned by both are a list of objects, from which you can read out information. Depending on the implementation, additional slots may be included.
(dissect:stack)
; => (#<CCL-CALL [0] CALL-CHECK-REGS | ccl:l1;l1-readloop.lisp.newest:827> #<CCL-CALL [1] CHEAP-EVAL | ...)
(dissect:restarts)
; => (#<CCL-RESTART [SWANK::RETRY] "Retry SLIME REPL evaluation request."> #<CCL-RESTART [ABORT] ...)
(dissect:form (first (dissect:stack)))
; => (DEFUN CALL-CHECK-REGS (FN &REST ARGS) ...)
(dissect:restart (first (dissect:restarts)))
; => CCL:SIMPLE-RESTART
You can also get a fancy print of calls, restarts, conditions, or the current state using present
:
(dissect:present T)
(handler-bind ((error #'dissect:present))
(error "Hello!"))
Sometimes having the full stack shown gives you a lot of noise and uninteresting information. To limit this --and thus make the stacks dissect returns cleaner-- you can use with-truncated-stack
and with-capped-stack
. Those will ensure that only frames above and below the respective macros are shown. Similarly, those can easily lead to completely empty stack reports, so make sure to only use them where you are absolutely sure that you will not need the information anymore.
When you need to capture the current environment because for later processing, you can use capture-environment
. This will return an object that contains the current stack, restarts, thread, and an optional condition object. Using this, the entire environment surrounding an error can be saved. present
also works with an environment
object.
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The dissect system |
Nicolas Hafner <shinmera@tymoon.eu>
Nicolas Hafner <shinmera@tymoon.eu>
(:git "https://github.com/shinmera/dissect.git")
zlib
A lib for introspecting the call stack and active restarts.
1.0.0
dissect.asd (file)
Modules are listed depth-first from the system components tree.
• The dissect/backend module |
interface.lisp (file)
dissect (system)
backend/
sbcl.lisp (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The dissect.asd file | ||
• The dissect/package.lisp file | ||
• The dissect/toolkit.lisp file | ||
• The dissect/interface.lisp file | ||
• The dissect/backend/sbcl.lisp file | ||
• The dissect/documentation.lisp file |
Next: The dissect/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
dissect.asd
dissect (system)
Next: The dissect/toolkit․lisp file, Previous: The dissect․asd file, Up: Lisp files [Contents][Index]
Next: The dissect/interface․lisp file, Previous: The dissect/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
dissect (system)
toolkit.lisp
Next: The dissect/backend/sbcl․lisp file, Previous: The dissect/toolkit․lisp file, Up: Lisp files [Contents][Index]
toolkit.lisp (file)
dissect (system)
interface.lisp
Next: The dissect/documentation․lisp file, Previous: The dissect/interface․lisp file, Up: Lisp files [Contents][Index]
backend (module)
backend/sbcl.lisp
Previous: The dissect/backend/sbcl․lisp file, Up: Lisp files [Contents][Index]
backend (module)
dissect (system)
documentation.lisp
setdocs (macro)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The dissect package |
package.lisp (file)
org.tymoonnext.dissect
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported macros | ||
• Exported functions | ||
• Exported generic functions | ||
• Exported classes |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Calls BODY in an environment where a call to STACK will not report frames further up.
See STACK
interface.lisp (file)
Calls BODY in an environment where a call to STACK will not report frames further down.
See STACK
Next: Exported generic functions, Previous: Exported macros, Up: Exported definitions [Contents][Index]
Capture the current environment into an environment object.
See ENVIRONMENT
interface.lisp (file)
Prints a neat representation of THING to DESTINATION.
DESTINATION can be one of the following types:
(eql NIL) — The representation is printed and returned as a string.
(eql T) — The representation is printed to *STANDARD-OUTPUT*.
STREAM — The representation is printed to the stream.
THING can be one of the following types:
RESTART — Restarts are presented as:
[NAME] REPORT
CALL — Calls are presented as:
POS (CALL ARGS..)
ENVIRONMENT — Environments are presented as a multiline description
of all the parts it references (condition, stack,
restarts, thread).
CONDITION — Conditions are presented as:
CONDITION
[Condition of type TYPE]
(EQL T) — Presents the environment at point using
CAPTURE-ENVIRONMENT.
LIST — The list can contain either restarts or calls. In both
cases the behaviour is to output a header line, followed
by the presentation of each item in the list on its own
line.
Internally the function PRESENT-OBJECT is used to perform the actual
printing.
See RESTART
See CALL
See ENVIRONMENT
See CONDITION
See CAPTURE-ENVIRONMENT
See PRESENT-OBJECT
interface.lisp (file)
Returns a list of RESTART objects describing the currently available restarts.
Returns an empty list on unsupported platforms.
See RESTART
Returns a list of CALL objects describing the stack from the point where this function was called.
This excludes the call to STACK itself.
Any calls above a WITH-CAPPED-STACK form, and below a WITH-TRUNCATED-STACK
form are also excluded.
Returns an empty list on unsupported platforms.
See CALL
See WITH-TRUNCATED-STACK
See WITH-CAPPED-STACK
Next: Exported classes, Previous: Exported functions, Up: Exported definitions [Contents][Index]
Returns a list of arguments that were used in the frame call.
If the arguments list is not available, this may also return an instance
of UNKNOWN-ARGUMENTS. The values in the list may be instances of
UNAVAILABLE-ARGUMENT if the argument is unknown or could not be captured
for some reason.
See UNKNOWN-ARGUMENTS
See UNAVAILABLE-ARGUMENT
See CALL
automatically generated reader method
interface.lisp (file)
Returns the stack call function.
Can be either a function object or the name of a global function.
See CALL
automatically generated reader method
interface.lisp (file)
Returns the condition stored in the environment (if any).
See CL:CONDITION
See ENVIRONMENT
automatically generated reader method
interface.lisp (file)
Returns a list of restarts stored in the environment (if any).
See CL:RESTART
See ENVIRONMENT
automatically generated reader method
interface.lisp (file)
Returns a list of calls stored in the environment (if any).
See CALL
See ENVIRONMENT
automatically generated reader method
interface.lisp (file)
Returns the thread stored in the environment (if any).
See SB-THREAD:THREAD
See THREADS:THREAD
See MP:PROCESS
See MT:THREAD
See CCL:PROCESS
See PROCESS:PROCESS
See THREAD:THREAD
See ENVIRONMENT
automatically generated reader method
interface.lisp (file)
If possible, returns the file the called function is defined in.
See CALL
sbcl.lisp (file)
automatically generated reader method
interface.lisp (file)
If possible, returns the actual definition form of the function.
See CALL
sbcl.lisp (file)
automatically generated reader method
interface.lisp (file)
Invoke the restart that the restart object references.
See RESTART
interface.lisp (file)
If possible, returns the line number in the file where the function is defined.
See CALL
sbcl.lisp (file)
automatically generated reader method
interface.lisp (file)
Returns the restart’s symbol. Use this for INVOKE-RESTART.
See RESTART
automatically generated reader method
interface.lisp (file)
Returns the platform-internal restart object.
See RESTART
automatically generated reader method
interface.lisp (file)
Returns the position of the call on the stack.
See CALL
automatically generated reader method
interface.lisp (file)
Internal generic function for pretty printing.
See PRESENT
interface.lisp (file)
Returns the report string describing the restart’s effects.
See RESTART
automatically generated reader method
interface.lisp (file)
Returns a symbol to the restart-function or a direct function-object.
See RESTART
automatically generated reader method
interface.lisp (file)
Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
Class container for stack frame information.
See POS
See CALL
See ARGS
See FILE
See LINE
See FORM
interface.lisp (file)
standard-object (class)
sbcl-call (class)
:pos
pos (generic function)
:call
call (generic function)
:args
args (generic function)
:file
file (generic function)
:line
line (generic function)
:form
form (generic function)
Container class for a current "environment".
An instance of this class is intended to represent most of the runtime
environment present at a particular point. It is useful for stashing away
debug information for inspection at a later date.
See CAPTURE-ENVIRONMENT
See ENVIRONMENT-CONDITION
See ENVIRONMENT-STACK
See ENVIRONMENT-RESTARTS
See ENVIRONMENT-THREAD
interface.lisp (file)
standard-object (class)
:condition
environment-condition (generic function)
:stack
environment-stack (generic function)
:restarts
environment-restarts (generic function)
:thread
environment-thread (generic function)
Initarg | Value |
---|---|
:condition | nil |
:stack | (dissect:stack) |
:restarts | (dissect:restarts) |
:thread | (dissect::current-thread) |
Class container for restart information.
See NAME
See REPORT
See RESTART
See OBJECT
See INTERACTIVE
See TEST
See INVOKE
interface.lisp (file)
standard-object (class)
sbcl-restart (class)
:name
name (generic function)
:report
report (generic function)
:restart
restart (generic function)
:object
object (generic function)
:interactive
interactive (generic function)
:test
test (generic function)
Used to represent an argument that isn’t available in the environment.
Instances of this class are printed as #<Unavailable>
interface.lisp (file)
standard-object (class)
print-object (method)
Used to represent an unknown list of arguments.
Instances of this class are printed as #<Unknown Arguments>
interface.lisp (file)
standard-object (class)
print-object (method)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal macros | ||
• Internal functions | ||
• Internal generic functions | ||
• Internal classes |
Next: Internal functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
documentation.lisp (file)
Next: Internal generic functions, Previous: Internal macros, Up: Internal definitions [Contents][Index]
toolkit.lisp (file)
Look for stack truncations and cappings and chop it down accordingly.
toolkit.lisp (file)
toolkit.lisp (file)
toolkit.lisp (file)
toolkit.lisp (file)
toolkit.lisp (file)
toolkit.lisp (file)
toolkit.lisp (file)
toolkit.lisp (file)
Next: Internal classes, Previous: Internal functions, Up: Internal definitions [Contents][Index]
Returns the interactive restart function.
See RESTART
automatically generated reader method
interface.lisp (file)
Returns the restart test function.
See RESTART
automatically generated reader method
interface.lisp (file)
Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
sbcl.lisp (file)
call (class)
:info
info (generic function)
(setf info) (generic function)
:frame
frame (generic function)
(setf frame) (generic function)
sbcl.lisp (file)
restart (class)
:conditions
conditions (generic function)
(setf conditions) (generic function)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | D F L M |
---|
Jump to: | D F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | %
(
A C E F G I L M N O P R S T W |
---|
Jump to: | %
(
A C E F G I L M N O P R S T W |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | A C F I L N O P R S T |
---|
Jump to: | A C F I L N O P R S T |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C D E P R S U |
---|
Jump to: | C D E P R S U |
---|