Next: , Previous: , Up: Debugger Programmer’s Interface   [Contents][Index]


11.4 Debug-functions

Debug-functions represent the static information about a function determined at compile time—argument and variable storage, their lifetime information, etc. The debug-function also contains all the debug-blocks representing basic-blocks of code, and these contains information about specific code-locations in a debug-function.

Macro: do-debug-function-blocks (block-var debug-function {result-form}) {form}*

This executes the forms in a context with block-var bound to each debug-block in debug-function successively. Result-form is an optional form to execute for a return value, and do-debug-function-blocks returns nil if there is no result-form. This signals a no-debug-blocks condition when the debug-function lacks debug-block information.

Function: debug-function-lambda-list debug-function

This function returns a list representing the lambda-list for debug-function. The list has the following structure:

    (required-var1 required-var2
    ...
    (:optional var3 suppliedp-var4)
    (:optional var5)
    ...
    (:rest var6) (:rest var7)
    ...
    (:keyword keyword-symbol var8 suppliedp-var9)
    (:keyword keyword-symbol var10)
    ...
    )
  

Each varn is a debug-variable; however, the symbol :deleted appears instead whenever the argument remains unreferenced throughout debug-function.

If there is no lambda-list information, this signals a lambda-list-unavailable condition.

Macro: do-debug-function-variables (var debug-function {result}) {form}*

This macro executes each form in a context with var bound to each debug-variable in debug-function. This returns the value of executing result (defaults to nil). This may iterate over only some of debug-function’s variables or none depending on debug policy; for example, possibly the compilation only preserved argument information.

Function: debug-variable-info-available debug-function

This function returns whether there is any variable information for debug-function. This is useful for distinguishing whether there were no locals in a function or whether there was no variable information. For example, if do-debug-function-variables executes its forms zero times, then you can use this function to determine the reason.

Function: debug-function-symbol-variables debug-function symbol

This function returns a list of debug-variables in debug-function having the same name and package as symbol. If symbol is uninterned, then this returns a list of debug-variables without package names and with the same name as symbol. The result of this function is limited to the availability of variable information in debug-function; for example, possibly debug-function only knows about its arguments.

Function: ambiguous-debug-variables debug-function name-prefix-string

This function returns a list of debug-variables in debug-function whose names contain name-prefix-string as an initial substring. The result of this function is limited to the availability of variable information in debug-function; for example, possibly debug-function only knows about its arguments.

Function: preprocess-for-eval form basic-code-location

This function returns a function of one argument that evaluates form in the lexical context of basic-code-location. This allows efficient repeated evaluation of form at a certain place in a function which could be useful for conditional breaking. This signals a no-debug-variables condition when the code-location’s debug-function has no debug-variable information available. The returned function takes a frame as an argument. See also eval-in-frame.

Function: function-debug-function function

This function returns a debug-function that represents debug information for function.

Function: debug-function-kind debug-function

This function returns the kind of function debug-function represents. The value is one of the following:

:optional

This kind of function is an entry point to an ordinary function. It handles optional defaulting, parsing keywords, etc.

:external

This kind of function is an entry point to an ordinary function. It checks argument values and count and calls the defined function.

:top-level

This kind of function executes one or more random top-level forms from a file.

:cleanup

This kind of function represents the cleanup forms in an unwind-protect.

nil

This kind of function is not one of the above; that is, it is not specially marked in any way.

Function: debug-function-function debug-function

This function returns the Common Lisp function associated with the debug-function. This returns nil if the function is unavailable or is non-existent as a user callable function object.

Function: debug-function-name debug-function

This function returns the name of the function represented by debug-function. This may be a string or a cons; do not assume it is a symbol.


Next: Debug-blocks, Previous: Frames, Up: Debugger Programmer’s Interface   [Contents][Index]