| Allegro CL version 9.0 Object described on page has changed in 9.0. 8.2 version |
Arguments: [:i] [:c] [:x] [:r] [name|index]
If not in ldb mode (ldb
does not appear in the
prompt), this command prints information on local variables in the
current frame, as we now describe. See below for behavior in ldb mode.
This command causes the values of local variables for the current stack frame (see :zoom) to be printed. See debugging.htm for information on the handling of local variables by the debugger.
Note that the compiler may not save the names of local variables in
compiled code. In that case variables will be listed identified by an
index, which is a number from 0 to n-1, where n is the number of
compiled local variables. The compiler will save names of compiled
local variables if the compiler switch compiler:save-local-names-switch
is bound
to a function which returns t
. Further, local
name information is only loaded from compiled file is the variable
*load-local-names-info*
is non-nil
when the compiled (fasl) file is loaded. (There
is an example on the *load-local-names-info*
page showing :local output when local names are and are
not loaded.)
When local names are saved (as described in the paragraph above), closure variables are also printed out.
If the name/index option is specified, the value
of the local variable identified by the name or index will be
printed. With no other options, all instances of
name are looked for. If the option
:i
(:c
) is specified, just interpreted
(compiled) code is searched for name. index
always refers to compiled local variables. The variable
cl:*
is set only if you specify a
name or index argument to
:local. The commands :local, :local :i and
:local :c do not set *
.
The :x argument, if specified, causes any numeric values to be printed in hexadecimal. (The related :set-local does not support the :x argument.)
The :r argument, if specified, displays locals in raw layout. That means they are not interpreted as required, optional, local, etc., just all as raw-local.
If :r is specified,
the name/index argument should
be index
. Names in raw mode are always
:unknown. The purpose of this option is to access the stack in a way
similar to the way the garbage collector and heap-walkers access it.
Both the gc and heapwalkers use the same stack frame walker to look at
various slots in the stack. This includes all argument and local
slots, but it also includes slots not normally visible by the
debugger; for example, slots within a stack-allocated object are not
normally shown normally, but are shown with
the :r option.
When :r is specified, the result differs from when it is not in the following ways:
The minimal abbreviation for :local is :loc.
See also :set-local.
This command operates on the focused process when multiprocessing is active. See :focus.
:local in ldb mode
When in ldb-step mode, the :local command works as follows:
When a breakpoint is hit, the default current frame is the context in which the breakpoint occurred (and thus ldb-step mode was entered). If at this frame, the :local command is given with no arguments, a list of all registers is printed, along with their values. The names of the registers can be used in the :local command to print only one value, just as in a regular frame.
The :x
modifier can be used to ask for any numeric output
in hexadecimal. Typical register names start with :% and are named
according to hardware convention, eg. :%r10, :%ebx (on x86), :%i3 (on
sparc).
See top-level.htm for more information on top-level commands. See debugging.htm for information on the debugger.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
The object described on this page has been modified in the 9.0 release; see the Release Notes.
Created 2019.8.20.
| Allegro CL version 9.0 Object described on page has changed in 9.0. 8.2 version |