Top-level CommandToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 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 option

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:

Further notes

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 and the frame is a "context-saving" frame, saved registers are simply considered local variable names and values and they are printed when the :local command is given with no arguments. Otherwise register values are not printed. The :register command will print registers. entered).

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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version