The dissect Reference Manual

This is the dissect Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:17:55 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 dissect

A lib for introspecting the call stack and active restarts.

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://Shinmera.github.io/dissect/

Source Control

(GIT https://github.com/Shinmera/dissect.git)

Bug Tracker

https://github.com/Shinmera/dissect/issues

License

zlib

Version

1.0.0

Source

dissect.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 dissect/backend

Dependency

interface.lisp (file).

Source

dissect.asd.

Parent Component

dissect (system).

Child Component

sbcl.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 dissect/dissect.asd

Source

dissect.asd.

Parent Component

dissect (system).

ASDF Systems

dissect.


4.1.2 dissect/package.lisp

Source

dissect.asd.

Parent Component

dissect (system).

Packages

dissect.


4.1.3 dissect/toolkit.lisp

Dependency

package.lisp (file).

Source

dissect.asd.

Parent Component

dissect (system).

Internals

4.1.4 dissect/interface.lisp

Dependency

toolkit.lisp (file).

Source

dissect.asd.

Parent Component

dissect (system).

Public Interface
Internals

4.1.5 dissect/backend/sbcl.lisp

Source

dissect.asd.

Parent Component

backend (module).

Public Interface
Internals

4.1.6 dissect/documentation.lisp

Dependency

backend (module).

Source

dissect.asd.

Parent Component

dissect (system).

Internals

setdocs (macro).


5 Packages

Packages are listed by definition order.


5.1 dissect

Source

package.lisp.

Nickname

org.tymoonnext.dissect

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Macros

Macro: with-capped-stack (() &body body)

Calls BODY in an environment where a call to STACK will not report frames further up.

See STACK

Package

dissect.

Source

interface.lisp.

Macro: with-truncated-stack (() &body body)

Calls BODY in an environment where a call to STACK will not report frames further down.

See STACK

Package

dissect.

Alias for

%with-truncated-stack.


6.1.2 Ordinary functions

Function: capture-environment (&optional condition)

Capture the current environment into an environment object.

See ENVIRONMENT

Package

dissect.

Source

interface.lisp.

Function: present (thing &optional destination)

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

Package

dissect.

Source

interface.lisp.

Function: restarts (&optional condition)
Package

dissect.

Source

sbcl.lisp.

Function: stack ()
Package

dissect.

Source

sbcl.lisp.


6.1.3 Generic functions

Generic Reader: args (object)

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

Package

dissect.

Methods
Reader Method: args ((call call))

automatically generated reader method

Source

interface.lisp.

Target Slot

args.

Generic Reader: call (object)

Returns the stack call function.

Can be either a function object or the name of a global function.

See CALL

Package

dissect.

Methods
Reader Method: call ((call call))

automatically generated reader method

Source

interface.lisp.

Target Slot

call.

Generic Reader: environment-condition (object)

Returns the condition stored in the environment (if any).

See CL:CONDITION
See ENVIRONMENT

Package

dissect.

Methods
Reader Method: environment-condition ((environment environment))

automatically generated reader method

Source

interface.lisp.

Target Slot

condition.

Generic Reader: environment-restarts (object)

Returns a list of restarts stored in the environment (if any).

See CL:RESTART
See ENVIRONMENT

Package

dissect.

Methods
Reader Method: environment-restarts ((environment environment))

automatically generated reader method

Source

interface.lisp.

Target Slot

restarts.

Generic Reader: environment-stack (object)

Returns a list of calls stored in the environment (if any).

See CALL
See ENVIRONMENT

Package

dissect.

Methods
Reader Method: environment-stack ((environment environment))

automatically generated reader method

Source

interface.lisp.

Target Slot

stack.

Generic Reader: environment-thread (object)

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

Package

dissect.

Methods
Reader Method: environment-thread ((environment environment))

automatically generated reader method

Source

interface.lisp.

Target Slot

thread.

Generic Function: file (object)

If possible, returns the file the called function is defined in.

See CALL

Package

dissect.

Methods
Method: file ((call sbcl-call))
Source

sbcl.lisp.

Reader Method: file ((call call))

automatically generated reader method

Source

interface.lisp.

Target Slot

file.

Generic Function: form (object)

If possible, returns the actual definition form of the function.

See CALL

Package

dissect.

Methods
Method: form ((call sbcl-call))
Source

sbcl.lisp.

Reader Method: form ((call call))

automatically generated reader method

Source

interface.lisp.

Target Slot

form.

Generic Function: invoke (restart &rest args)

Invoke the restart that the restart object references.

See RESTART

Package

dissect.

Source

interface.lisp.

Methods
Method: invoke ((restart restart) &rest args)
Generic Function: line (object)

If possible, returns the line number in the file where the function is defined.

See CALL

Package

dissect.

Methods
Method: line ((call sbcl-call))
Source

sbcl.lisp.

Reader Method: line ((call call))

automatically generated reader method

Source

interface.lisp.

Target Slot

line.

Generic Reader: locals (object)

Returns a dotted alist of locals bound in the frame call.

If the locals are not available, returns NIL.

See CALL

Package

dissect.

Methods
Reader Method: locals ((call call))

automatically generated reader method

Source

interface.lisp.

Target Slot

locals.

Generic Reader: name (object)

Returns the restart’s symbol. Use this for INVOKE-RESTART.

See RESTART

Package

dissect.

Methods
Reader Method: name ((restart restart))

automatically generated reader method

Source

interface.lisp.

Target Slot

name.

Generic Reader: object (object)

Returns the platform-internal restart object.

See RESTART

Package

dissect.

Methods
Reader Method: object ((restart restart))

automatically generated reader method

Source

interface.lisp.

Target Slot

object.

Generic Reader: pos (object)

Returns the position of the call on the stack.

See CALL

Package

dissect.

Methods
Reader Method: pos ((call call))

automatically generated reader method

Source

interface.lisp.

Target Slot

pos.

Generic Function: present-object (thing stream)

Internal generic function for pretty printing.

See PRESENT

Package

dissect.

Source

interface.lisp.

Methods
Method: present-object ((env environment) stream)
Method: present-object ((call call) stream)
Method: present-object ((restart restart) stream)
Method: present-object ((list list) stream)
Method: present-object ((thing (eql t)) stream)
Method: present-object ((condition condition) stream)
Generic Reader: report (object)

Returns the report string describing the restart’s effects.

See RESTART

Package

dissect.

Methods
Reader Method: report ((restart restart))

automatically generated reader method

Source

interface.lisp.

Target Slot

report.

Generic Reader: restart (object)

Returns a symbol to the restart-function or a direct function-object.

See RESTART

Package

dissect.

Methods
Reader Method: restart ((restart restart))

automatically generated reader method

Source

interface.lisp.

Target Slot

restart.


6.1.4 Standalone methods

Method: print-object ((restart restart) stream)
Source

interface.lisp.

Method: print-object ((call call) stream)
Source

interface.lisp.

Method: print-object ((arg unavailable-argument) stream)
Source

interface.lisp.

Method: print-object ((args unknown-arguments) stream)
Source

interface.lisp.


6.1.5 Classes

Class: call

Class container for stack frame information.

See POS
See CALL
See ARGS
See FILE
See LINE
See FORM

Package

dissect.

Source

interface.lisp.

Direct subclasses

sbcl-call.

Direct methods
Direct slots
Slot: pos
Initargs

:pos

Readers

pos.

Writers

This slot is read-only.

Slot: call
Initargs

:call

Readers

call.

Writers

This slot is read-only.

Slot: args
Initargs

:args

Readers

args.

Writers

This slot is read-only.

Slot: file
Initargs

:file

Readers

file.

Writers

This slot is read-only.

Slot: line
Initargs

:line

Readers

line.

Writers

This slot is read-only.

Slot: form
Initargs

:form

Readers

form.

Writers

This slot is read-only.

Slot: locals
Initargs

:locals

Readers

locals.

Writers

This slot is read-only.

Class: environment

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

Package

dissect.

Source

interface.lisp.

Direct methods
Direct Default Initargs
InitargValue
:conditionnil
:stack(stack)
:restarts(restarts)
:thread(current-thread)
Direct slots
Slot: condition
Package

common-lisp.

Initargs

:condition

Readers

environment-condition.

Writers

This slot is read-only.

Slot: stack
Initargs

:stack

Readers

environment-stack.

Writers

This slot is read-only.

Slot: restarts
Initargs

:restarts

Readers

environment-restarts.

Writers

This slot is read-only.

Slot: thread
Initargs

:thread

Readers

environment-thread.

Writers

This slot is read-only.

Class: restart

Class container for restart information.

See NAME
See REPORT
See RESTART
See OBJECT
See INTERACTIVE
See TEST
See INVOKE

Package

dissect.

Source

interface.lisp.

Direct subclasses

sbcl-restart.

Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

name.

Writers

This slot is read-only.

Slot: report
Initargs

:report

Readers

report.

Writers

This slot is read-only.

Slot: restart
Initargs

:restart

Readers

restart.

Writers

This slot is read-only.

Slot: object
Initargs

:object

Readers

object.

Writers

This slot is read-only.

Slot: interactive
Initargs

:interactive

Readers

interactive.

Writers

This slot is read-only.

Slot: test
Initargs

:test

Readers

test.

Writers

This slot is read-only.

Class: unavailable-argument

Used to represent an argument that isn’t available in the environment.

Instances of this class are printed as #<Unavailable>

Package

dissect.

Source

interface.lisp.

Direct methods

print-object.

Class: unknown-arguments

Used to represent an unknown list of arguments.

Instances of this class are printed as #<Unknown Arguments>

Package

dissect.

Source

interface.lisp.

Direct methods

print-object.


6.2 Internals


6.2.1 Macros

Macro: %with-truncated-stack (() &body body)
Package

dissect.

Source

sbcl.lisp.

Macro: setdocs (&body pairs)
Package

dissect.

Source

documentation.lisp.


6.2.2 Ordinary functions

Function: %print-as-hopefully-in-source (stream thing &rest arg)
Package

dissect.

Source

toolkit.lisp.

Function: chop-stack (stack)

Look for stack truncations and cappings and chop it down accordingly.

Package

dissect.

Source

toolkit.lisp.

Function: current-thread ()
Package

dissect.

Source

toolkit.lisp.

Function: find-definition-in-file (call file)
Package

dissect.

Source

toolkit.lisp.

Function: frame-locals (frame)
Package

dissect.

Source

sbcl.lisp.

Function: frame-location (frame)
Package

dissect.

Source

sbcl.lisp.

Function: make-call (frame)
Package

dissect.

Source

sbcl.lisp.

Function: make-restart (restart)
Package

dissect.

Source

sbcl.lisp.

Function: newlines-until-pos (file position)
Package

dissect.

Source

toolkit.lisp.

Function: print-as-hopefully-in-source (thing)
Package

dissect.

Source

toolkit.lisp.

Function: read-source-form (file start)
Package

dissect.

Source

toolkit.lisp.

Function: read-source-form-at-line (file line)
Package

dissect.

Source

toolkit.lisp.

Function: read-toplevel-form (stream)
Package

dissect.

Source

toolkit.lisp.

Function: resolve-file-slots (call)
Package

dissect.

Source

sbcl.lisp.

Function: stack-capper (function)
Package

dissect.

Source

sbcl.lisp.

Function: stack-truncator (function)
Package

dissect.

Source

sbcl.lisp.


6.2.3 Generic functions

Generic Reader: conditions (object)
Package

dissect.

Methods
Reader Method: conditions ((sbcl-restart sbcl-restart))

automatically generated reader method

Source

sbcl.lisp.

Target Slot

conditions.

Generic Writer: (setf conditions) (object)
Package

dissect.

Methods
Writer Method: (setf conditions) ((sbcl-restart sbcl-restart))

automatically generated writer method

Source

sbcl.lisp.

Target Slot

conditions.

Generic Reader: frame (object)
Package

dissect.

Methods
Reader Method: frame ((sbcl-call sbcl-call))

automatically generated reader method

Source

sbcl.lisp.

Target Slot

frame.

Generic Writer: (setf frame) (object)
Package

dissect.

Methods
Writer Method: (setf frame) ((sbcl-call sbcl-call))

automatically generated writer method

Source

sbcl.lisp.

Target Slot

frame.

Generic Reader: info (object)
Package

dissect.

Methods
Reader Method: info ((sbcl-call sbcl-call))

automatically generated reader method

Source

sbcl.lisp.

Target Slot

info.

Generic Writer: (setf info) (object)
Package

dissect.

Methods
Writer Method: (setf info) ((sbcl-call sbcl-call))

automatically generated writer method

Source

sbcl.lisp.

Target Slot

info.

Generic Reader: interactive (object)

Returns the interactive restart function.

See RESTART

Package

dissect.

Methods
Reader Method: interactive ((restart restart))

automatically generated reader method

Source

interface.lisp.

Target Slot

interactive.

Generic Reader: test (object)

Returns the restart test function.

See RESTART

Package

dissect.

Methods
Reader Method: test ((restart restart))

automatically generated reader method

Source

interface.lisp.

Target Slot

test.


6.2.4 Classes

Class: sbcl-call
Package

dissect.

Source

sbcl.lisp.

Direct superclasses

call.

Direct methods
Direct slots
Slot: info
Initargs

:info

Readers

info.

Writers

(setf info).

Slot: frame
Initargs

:frame

Readers

frame.

Writers

(setf frame).

Class: sbcl-restart
Package

dissect.

Source

sbcl.lisp.

Direct superclasses

restart.

Direct methods
Direct slots
Slot: conditions
Initargs

:conditions

Readers

conditions.

Writers

(setf conditions).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   C   E   F   G   I   L   M   N   O   P   R   S   T   W  
Index Entry  Section

%
%print-as-hopefully-in-source: Private ordinary functions
%with-truncated-stack: Private macros

(
(setf conditions): Private generic functions
(setf conditions): Private generic functions
(setf frame): Private generic functions
(setf frame): Private generic functions
(setf info): Private generic functions
(setf info): Private generic functions

A
args: Public generic functions
args: Public generic functions

C
call: Public generic functions
call: Public generic functions
capture-environment: Public ordinary functions
chop-stack: Private ordinary functions
conditions: Private generic functions
conditions: Private generic functions
current-thread: Private ordinary functions

E
environment-condition: Public generic functions
environment-condition: Public generic functions
environment-restarts: Public generic functions
environment-restarts: Public generic functions
environment-stack: Public generic functions
environment-stack: Public generic functions
environment-thread: Public generic functions
environment-thread: Public generic functions

F
file: Public generic functions
file: Public generic functions
file: Public generic functions
find-definition-in-file: Private ordinary functions
form: Public generic functions
form: Public generic functions
form: Public generic functions
frame: Private generic functions
frame: Private generic functions
frame-locals: Private ordinary functions
frame-location: Private ordinary functions
Function, %print-as-hopefully-in-source: Private ordinary functions
Function, capture-environment: Public ordinary functions
Function, chop-stack: Private ordinary functions
Function, current-thread: Private ordinary functions
Function, find-definition-in-file: Private ordinary functions
Function, frame-locals: Private ordinary functions
Function, frame-location: Private ordinary functions
Function, make-call: Private ordinary functions
Function, make-restart: Private ordinary functions
Function, newlines-until-pos: Private ordinary functions
Function, present: Public ordinary functions
Function, print-as-hopefully-in-source: Private ordinary functions
Function, read-source-form: Private ordinary functions
Function, read-source-form-at-line: Private ordinary functions
Function, read-toplevel-form: Private ordinary functions
Function, resolve-file-slots: Private ordinary functions
Function, restarts: Public ordinary functions
Function, stack: Public ordinary functions
Function, stack-capper: Private ordinary functions
Function, stack-truncator: Private ordinary functions

G
Generic Function, (setf conditions): Private generic functions
Generic Function, (setf frame): Private generic functions
Generic Function, (setf info): Private generic functions
Generic Function, args: Public generic functions
Generic Function, call: Public generic functions
Generic Function, conditions: Private generic functions
Generic Function, environment-condition: Public generic functions
Generic Function, environment-restarts: Public generic functions
Generic Function, environment-stack: Public generic functions
Generic Function, environment-thread: Public generic functions
Generic Function, file: Public generic functions
Generic Function, form: Public generic functions
Generic Function, frame: Private generic functions
Generic Function, info: Private generic functions
Generic Function, interactive: Private generic functions
Generic Function, invoke: Public generic functions
Generic Function, line: Public generic functions
Generic Function, locals: Public generic functions
Generic Function, name: Public generic functions
Generic Function, object: Public generic functions
Generic Function, pos: Public generic functions
Generic Function, present-object: Public generic functions
Generic Function, report: Public generic functions
Generic Function, restart: Public generic functions
Generic Function, test: Private generic functions

I
info: Private generic functions
info: Private generic functions
interactive: Private generic functions
interactive: Private generic functions
invoke: Public generic functions
invoke: Public generic functions

L
line: Public generic functions
line: Public generic functions
line: Public generic functions
locals: Public generic functions
locals: Public generic functions

M
Macro, %with-truncated-stack: Private macros
Macro, setdocs: Private macros
Macro, with-capped-stack: Public macros
Macro, with-truncated-stack: Public macros
make-call: Private ordinary functions
make-restart: Private ordinary functions
Method, (setf conditions): Private generic functions
Method, (setf frame): Private generic functions
Method, (setf info): Private generic functions
Method, args: Public generic functions
Method, call: Public generic functions
Method, conditions: Private generic functions
Method, environment-condition: Public generic functions
Method, environment-restarts: Public generic functions
Method, environment-stack: Public generic functions
Method, environment-thread: Public generic functions
Method, file: Public generic functions
Method, file: Public generic functions
Method, form: Public generic functions
Method, form: Public generic functions
Method, frame: Private generic functions
Method, info: Private generic functions
Method, interactive: Private generic functions
Method, invoke: Public generic functions
Method, line: Public generic functions
Method, line: Public generic functions
Method, locals: Public generic functions
Method, name: Public generic functions
Method, object: Public generic functions
Method, pos: Public generic functions
Method, present-object: Public generic functions
Method, present-object: Public generic functions
Method, present-object: Public generic functions
Method, present-object: Public generic functions
Method, present-object: Public generic functions
Method, present-object: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, report: Public generic functions
Method, restart: Public generic functions
Method, test: Private generic functions

N
name: Public generic functions
name: Public generic functions
newlines-until-pos: Private ordinary functions

O
object: Public generic functions
object: Public generic functions

P
pos: Public generic functions
pos: Public generic functions
present: Public ordinary functions
present-object: Public generic functions
present-object: Public generic functions
present-object: Public generic functions
present-object: Public generic functions
present-object: Public generic functions
present-object: Public generic functions
present-object: Public generic functions
print-as-hopefully-in-source: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods
print-object: Public standalone methods

R
read-source-form: Private ordinary functions
read-source-form-at-line: Private ordinary functions
read-toplevel-form: Private ordinary functions
report: Public generic functions
report: Public generic functions
resolve-file-slots: Private ordinary functions
restart: Public generic functions
restart: Public generic functions
restarts: Public ordinary functions

S
setdocs: Private macros
stack: Public ordinary functions
stack-capper: Private ordinary functions
stack-truncator: Private ordinary functions

T
test: Private generic functions
test: Private generic functions

W
with-capped-stack: Public macros
with-truncated-stack: Public macros


A.4 Data types

Jump to:   B   C   D   E   F   I   M   P   R   S   T   U  
Index Entry  Section

B
backend: The dissect/backend module

C
call: Public classes
Class, call: Public classes
Class, environment: Public classes
Class, restart: Public classes
Class, sbcl-call: Private classes
Class, sbcl-restart: Private classes
Class, unavailable-argument: Public classes
Class, unknown-arguments: Public classes

D
dissect: The dissect system
dissect: The dissect package
dissect.asd: The dissect/dissect․asd file
documentation.lisp: The dissect/documentation․lisp file

E
environment: Public classes

F
File, dissect.asd: The dissect/dissect․asd file
File, documentation.lisp: The dissect/documentation․lisp file
File, interface.lisp: The dissect/interface․lisp file
File, package.lisp: The dissect/package․lisp file
File, sbcl.lisp: The dissect/backend/sbcl․lisp file
File, toolkit.lisp: The dissect/toolkit․lisp file

I
interface.lisp: The dissect/interface․lisp file

M
Module, backend: The dissect/backend module

P
Package, dissect: The dissect package
package.lisp: The dissect/package․lisp file

R
restart: Public classes

S
sbcl-call: Private classes
sbcl-restart: Private classes
sbcl.lisp: The dissect/backend/sbcl․lisp file
System, dissect: The dissect system

T
toolkit.lisp: The dissect/toolkit․lisp file

U
unavailable-argument: Public classes
unknown-arguments: Public classes