Top-level CommandToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

:local

Arguments: [:i] [:c] [:x] [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.)

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, 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-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version