2.3.63. EXPAND

Displays the values of parameters to a procedure and any local variables that have been set up.


EXPAND [@stack_level [{,windowid | ,fileid}]]



Specifies a stack level if you want to see only a single level expanded. For example, you can specify @3 to expand stack level 3 only.

,windowid | ,fileid

Identifies the window or file where the command is to send the output. See Window and file numbers for details. You can specify a window or file ID only if you specify a stack level.


The EXPAND command displays the values of parameters to a procedure and any local variables that have been set up. You can expand any procedure in a directly called chain from the main program to the current procedure. Other procedures are not accessible.

If no stack level is specified, all procedures nested on the stack are displayed. Stack levels are numbered starting with the current procedure equaling 0, the caller of this procedure is 1, the caller of that procedure is 2.

The EXPAND command runs synchronously.

Messages that can be output by the EXPAND command have the following meanings:

<Bad float>

Invalid floating-point value, cannot be converted.

<bad size>

Type size invalid.


Invalid enum value, where xx = value.


Floating-point value is infinity.

<Invalid value (x)>

Error number (x) occurred.


Not a number (for a floating-point value).

<not a source procedure. Address is ...>

Routine is not defined as a function in the object file.

<not alive>

Local register variable no longer exists.

<Not in procedure>

PC located before first executable line.

<unknown type>

Type is not recognized by the debugger.


The following example illustrates the EXPAND command executed during a run of the dhrystone program. You can see three of the messages in use: an UNKNOWN enum value, a variable that is not alive, and a procedure that has no source or debug information available.

> go
> expand
  00. Proc_1: at line 309.
    Ptr_Val_Par07FFFF60 = (record *)0x01000260
    Next_Record00000005 = (record *)0x0100C274
  01. main: at line 170.
    Int_1_Loc 07FFFF60 = 16777824
    Int_2_Loc 07FFFF60 = 16777824
    Int_3_Loc 07FFFF5C = 134217624
    Ch_Index  'C'
    Enum_Loc  07FFFF58 = <UNKNOWN: 255>
    Str_1_Loc 07FFFF38 = "\xFF\xFF\xFF\xFFx\x1E"
    Str_2_Loc 07FFFF18 = ""
    Run_Index 07FFFF64 = 16827048
    n          <not alive>
  02. <not a source procedure. Address is 01001DF0>

The program was halted in Proc_1 at line 309. The output shows that Proc_1 was called from main line 170, and main was called by unnamed code at address 0x01001DF0, which is part of the C runtime library.

Because main is called from the C runtime library, no source and no debug information is available for the procedure that called main, so EXPAND reports the pc address from which the call to main is made.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N