MANUAL
Release 02.2024
General Commands Reference
Guide V
General Commands Reference Guide V | 2
©
1989-2024 Lauterbach
General Commands Reference Guide V
TRACE32 Online Help
TRACE32 Directory
TRACE32 Index
TRACE32 Documents ......................................................................................................................
General Commands ......................................................................................................................
General Commands Reference Guide V .................................................................................. 1
History ...................................................................................................................................... 5
Var ............................................................................................................................................. 6
Var HLL variables and expressions 6
Overview Var 6
Symbol Prefix and Postfix 6
Symbol Paths 7
Search Paths 7
Mangled Names and C++ Classes 8
Function Return Values 8
Special Expressions 8
Calling Functions 11
Display Formats 12
Functions 23
Var.AddSticker Add variable sticker to source listing window 23
Var.AddWatch Add variable to Var.Watch window 24
Var.AddWatchPATtern Add variables to Var.Watch window using wildcards 24
Var.Assign Assignment to a variable 25
Var.Break Breakpoint on variable 26
Var.Break.Delete Delete breakpoint on variable 26
Var.Break.direct Set temporary breakpoint on HLL expression 28
Var.Break.Pass Define pass condition for breakpoint 29
Var.Break.Set Set breakpoint to HLL expression 30
Var.Call Call a new procedure 31
Var.CHAIN Display linked list 32
Var.DelWatch Delete variable from watch 33
Var.DRAW Graphical variable display 33
Var.DRAWXY Graphical variable display 37
Var.DUMP Memory dump 38
Var.Eval Evaluate high-level expression 39
Var.EXPORT Export variables in CSV format to file 39
Var.FixedCHAIN Display linked list 41
General Commands Reference Guide V | 3
©
1989-2024 Lauterbach
Var.FixedTABle Display table 41
Var.Go Real-time emulation 43
Var.Go.Back Re-run program backwards until variable access (CTS) 43
Var.Go.Change Real-time emulation till expression changes 44
Var.Go.direct Real-time emulation with breakpoint 45
Var.Go.Till Real-time emulation till expression true 46
Var.IF PRACTICE conditional branching 47
Var.INFO View information about HLL variable or HLL expression 48
Var.Local Local variables 49
Var.LOG Log variables 50
Var.NEW Creates a TRACE32-internal variable 52
Var.NEWGLOBAL Creates a global TRACE32-internal variable 53
Var.NEWLOCAL Creates a local TRACE32-internal variable 54
Var.OBJECT Pretty printing for C++ objects 56
Var.PATtern Display variables allowing wildcards for symbol name and type 58
Var.PRINT Display variables 59
Var.PROfile Graphical display of variable 60
Var.Ref Referenced variables 61
Var.set Modify variable 62
Var.Step Step 65
Var.Step.BackChange Step back till expression changes 65
Var.Step.BackTill Step back till expression true 65
Var.Step.Change Step till expression changes 66
Var.Step.Till Step till expression true 66
Var.TABle Display table 67
Var.TREE Display variables in the form of a tree structure 68
Var.TYPE Display variable types 69
Var.View Display variables 70
Var.Watch Open Var.Watch window 72
Var.WHILE PRACTICE loop construction 73
Var.WRITE Write variables to file 74
VCO ........................................................................................................................................... 75
VCO Clock generator 75
VCO.BusFrequency Control bus clock 75
VCO.Down Frequency down 75
VCO.Frequency Control VCO clock 76
VCO.Rate VCO rate 76
VCO.RESet VCO reset 77
VCO.state State display 77
VCO.TimeBaseFrequency Set the time base clock 77
VCO.Up Frequency up 78
VCU ........................................................................................................................................... 79
VCU VCU registers (Vector Computational Unit) 79
General Commands Reference Guide V | 4
©
1989-2024 Lauterbach
VCU.Init Initialize VCU registers 79
VCU.RESet Reset VCU registers 79
VCU.Set Set VCU register 80
VCU.view Display VCU registers 80
VE .............................................................................................................................................. 81
VE Virtual execution mode 81
VE.OFF Turn off virtual execution mode 81
VE.ON Turn on virtual execution mode 81
VPU ........................................................................................................................................... 82
VPU Vector Processing Unit (VPU) 82
VPU.Init Initialize VPU registers 82
VPU.Set Modify VPU registers 83
VPU.view Display ALTIVEC register window 84
General Commands Reference Guide V | 5
©
1989-2024 Lauterbach
General Commands Reference Guide V
Version 04-Mar-2024
History
23-Jan-2023 VPU commands support different architectures other than PowerPC.
General Commands Reference Guide V | 6
©
1989-2024 Lauterbach
Var
Var HLL variables and expressions
See also
Var.AddSticker Var.AddWatch Var.AddWatchPATtern Var.Assign
Var.Break Var.Call Var.CHAIN Var.DelWatch
Var.DRAW Var.DRAWXY Var.DUMP Var.Eval
Var.EXPORT Var.FixedCHAIN Var.FixedTABle Var.Go
Var.IF Var.INFO Var.Local Var.LOG
Var.NEW Var.NEWGLOBAL Var.NEWLOCAL Var.OBJECT
Va r. PAT t e r n Var.PRINT Var.PROfile Var.Ref
Var.set Var.Step Var.TABle Var.TREE
Var.TYPE Var.View Var.Watch Var.WHILE
Var.WRITE SETUP.Var sYmbol.CASE Var.ADDRESS()
Var.END() Var.RANGE() Var.SIZEOF() Var.STRing()
Var.TYPEOF() Var.VALUE()
’Var Functions’ in ’General Function Reference’
’Release Information’ in ’Legacy Release History’
Overview Var
Lower and upper case letters are distinguished in symbol names. The command sYmbol.CASE switches
off this differentiation. The length of symbol names is limited to 255 characters. The maximum number of
symbols depends on the size of the system memory.
Symbol Prefix and Postfix
Most of the compilers add a special character (for example “.” or “_”) in front of or behind the users symbol
names. The user does not need to enter this character. The symbol management automatically adds the
character, if necessary.
Example for the processing of prefix/postfix characters.
Symbol Table Entry HLL-Windows Assembler windows
_vfloat _vfloat or vfloat _vfloat
vfloat
General Commands Reference Guide V | 7
©
1989-2024 Lauterbach
Symbol Paths
There are two modes during entry a symbol name: entering a complete symbol path or solely a symbol
name. If only a symbol name is used, the access will occur to the symbol valid for the used program part (if
symbol names are used more than once, local symbols are preferred to symbols of higher blocks).
By specifying a complete symbol path access to any symbol is possible. Each part of the symbol path is
separated by a '\'. A complete path has to begin with a '\'. The following path versions are allowed:
If the specified symbol represents a function, the access to local variables of this function and of nested
functions will be possible:
If using PASCAL, as many functions as chosen will be nested.
Line numbers can be specified in the following way:
The address of the high level language block containing the specified line number is returned by this
operation.
Search Paths
If no complete path is entered, the symbol will be searched in the following sequence
1. Local symbols (interior block … exterior block)
2. Static symbols of block
3. Static symbols of module
4. Global symbols of current program
5. All other static symbols
\modul\global …
\modul\modul-local …
\\program\modul …
…\function\local
…\function\function …
\linenumber
\linenumber\columnnumber
\module\linenumber
\\program\module\linenumber
..\function\relative_linenumber
General Commands Reference Guide V | 8
©
1989-2024 Lauterbach
Mangled Names and C++ Classes
The class of a method can be left out, if this method exists only in one class and the names are ANSI
mangled. The class is always required, if the constructor, destructor or an overloaded operator must be
accessed. The quotation marks can help to allow special characters if the C++ name is used in the regular
TRACE32 syntax. They are not required in the Var command group. However they can be used when
specifying a local symbol. The command sYmbol.MATCH can control the behavior if an overloaded method
is not specified with the prototype.
Function Return Values
The return value of a function is entered in the symbol list as a local variable of the function. It has always the
name 'return'.
Special Expressions
The expression interpreter accept some extensions to the language. All type checks and range checks are
handled as free as possible. Accessing data beyond the array limits is allowed.
A dereference of a plain number will assume that it is a pointer to character:
All labels (typeless symbols) can be used in expressions. They are taken as variables of the type void. They
can be cast directly to the wanted type.
List `class1::method1`
List method1
//access to same method (ANSI
// mangled)
List `class1::class1`
List `class1::~class1`
//creator of class class1
//destructor of class class1
List `class1::operator++` //overloaded operator
List `class1::operator+(int)` //overloaded operator with
// prototype
Var.set `class1::operator+(int)\i` //local variable of function
Var.set *0x2000 = 1 //set byte at location 2000 (decimal)
Var.set __HEAP
Var.set *__HEAP
Var.set (long)__HEAP
//displays nothing (if __HEAP is a label)
//assumes __HEAP as a pointer to character
//takes __HEAP as a 'long' variable
General Commands Reference Guide V | 9
©
1989-2024 Lauterbach
Function calls can be made to plain addresses or typeless symbols. The return value is assumed to be
'void'.
Extracts of arrays can be made with 'range' expressions. The operations allowed with such extracts is
limited. This allows display of zero sized arrays and display of pointers to arrays.
Extracts of arrays can be assigned or compared to members of the array.
Assigning strings can cause two different reactions. If the string is assigned to a NULL pointer, the target
function 'malloc' is called to gather memory for the string and the resulting address is assigned to the pointer
variable. If the string is assigned to a non zero pointer or an array, then the contents of the string are copied
over the old contents of the array.
Comparing a pointer or array against a string compares the contents of the string.
Strings used in arguments to functions are allocated on the stack.
Var.set (0x2000)(1,2,3)
Var.set __HEAP(1,2,3)
//calls the function at 2000 (hex)
//calls the function at the label __HEAP
Var.set flags[2..4]
Var.set vdblarray[2..4][i-1..i+1]
Var.set vpchar[0..19]
Var.set (&vchar)[0..19]
Var.set vpchar[0..23][0..79]
//display elements 2 to 4
//display part of two-dimensional
//array
//display array at pointer 'vpchar'
//takes the location of one element
//to build up an array
//display a two dimensional array
//at the pointer
Var.set flags[0..19]=0
Var.set flags[5..9]==0
//clears the array to 0
//results a non-zero number if all
//elements are 0
Var.set vpchar = 0
Var.set vpchar = "abc"
//will call the 'malloc' function
Var.set vpchar = 0x100
Var.set vpchar = "abc"
//copy the string "abc" to location 0x100
Var.Go.Till pname=="TEST" //execute program till string equal
Var.set strlen("abc") //the string will reside on the stack
General Commands Reference Guide V | 10
©
1989-2024 Lauterbach
A type alone can be an expression. This is especially useful for the Var.TYPE command to display the layout
of a structure or C++ class.
Elements of unions can be accessed by indexing the union like an array. The first element of the union is
accessed with index 0.
Structures or limited arrays may be assigned or compared with multiple members.
Pointers to nested C++ classes may be converted into a pointer to the most derived class of the object. If this
is not possible the operation returns the regular pointer.
The syntax for MODULA2/PASCAL expressions has been extended for type casts and hexadecimal
numbers.
Var.TYPE %Multiline Tree //displays the layout of class 'Tree'
struct
{
enum evtype type;
union
{
struct sysevent sys;
struct ioevent io;
struct winevent win;
struct lanevent lan;
}
content;
}
signal;
Var.View signal.content[signal.type]
Var.set ast=(1,2,3)
Var.IF point==(0,0)
Var.set flg[0..2]=(1,2,3)
//assigns the first three members
// values
//condition is true when first elements
// are zero
//assigns the first three elements
// values
Var.set *this
Var.set *[this]
//displays the “regular” object
//displays the most derived class of the object
Var.View flags[0] := 12H
Var.View flags[0] := 0x12
//standard MODULA hexadecimal syntax
//also accepted (like 'C')
Var.View CARDINAL(1.24)
Var.View ^CARDINAL(0x10
//typecast like 'C': (CARDINAL) 1.23
//typecast like 'C': (CARDINAL *) 0x10
General Commands Reference Guide V | 11
©
1989-2024 Lauterbach
Calling Functions
In expressions it is possible to call functions of the target. This feature should be used very carefully, as not
proper working code in the target may be executed with the function call. Calling functions is only possible
with the commands Var.set and Var.Call. The Var.Call command can be used to test a function with
different parameters. If a function call fails, or was stopped by a breakpoint the original values of the CPU
registers can be recalled with the Frame.SWAP command. The proper function call cannot be guaranteed
for all processors and compiler options.
General Commands Reference Guide V | 12
©
1989-2024 Lauterbach
Display Formats
TRACE32 provides the following <format> parameters:
The format parameters modify the input or output format of variables:
A format parameter affects only the variables that are listed behind it.
Multiple format parameters can be combined (e.g. %Decimal and %Hex), causing the variable
to be output in multiple formats.
Format parameters can be turned off selectively using the .OFF postfix.
•The SETUP.Var command defines the default settings. See also DEFault below.
For an illustration of the first three rules, see example below.
[%<format>]… all
Ascii [.on | .OFF]
BINary [.on | .OFF]
Compact [.on | .OFF]
Decimal [.on | .OFF]
DEFault
DUMP [.on | .OFF]
runtimE [.on | .OFF]
Fixed [.on | .OFF]
Hex [.on | .OFF]
HIdden [.on | .OFF]
Index [.on | .OFF]
INherited [.on | .OFF]
INheritedName [.on | .OFF]
Location [.on | .OFF]
MEthods [.on | .OFF]
Multiline [.<nesting_level>][.on | .OFF]
Name [.on | .OFF]
Open
[.on | .OFF | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .9 | .ALL]
PDUMP [.on | .OFF]
Recursive [.on | .OFF | .2 | .3 | .4]
SCALED [.on | .OFF]
SHOW [.on | .OFF]
SPaces [.on | .OFF]
SpotLight [.on | .OFF]
STanDard
String [.on | .OFF]
sYmbol [.on | .OFF]
TREE [.on | .OFF | .OPEN]
Type [.on | .OFF]
WideString [.on | .OFF]
General Commands Reference Guide V | 13
©
1989-2024 Lauterbach
Example:
all
all is a set of the following format options:
•Type
Decimal
•Hex
Ascii
Recursive
•String
•Index
•sYmbol
Compact
Multiline
You can format the display of variables with all of these format options by using just all.
See also: DEFault, STanDard
Var.Watch %Decimal.on %Hex.on i %Hex.OFF k
A Decimal and hex for variable i
B Decimal only for variable k
A
B
General Commands Reference Guide V | 14
©
1989-2024 Lauterbach
Ascii
Display of values as ASCII characters. This effects simple variables only. The String format can be used to
display zero-terminated strings. If multiple type base formats are defined, the formats are displayed
simultaneously.
BINary
Binary display 0y...
Compact
Produces a very compact output format in combination with Multiline.
multiple formats
(hex, decimal, ascii)
pointers are always in hex
simple variable displayed
in decimal, hex and ASCII
structure members are
displayed below the
structure name
General Commands Reference Guide V | 15
©
1989-2024 Lauterbach
Decimal
Display of values in decimal format.
DEFault
Applies all the format options that you have set to ON in the SETUP.Var window.
You can format the display of variables with all of these format options by using just DEFault.
See also: all, STanDard.
DUMP
Additional display of a short hex dump of each variable.
E
Access to static variables through the emulation memory. By this option global or static variables may be
displayed during the real-time emulation. As this dual-port access cannot access target memory, this option
allows 'save' memory accesses, as illegal pointer values cannot cause wrong accesses to the target.
General Commands Reference Guide V | 16
©
1989-2024 Lauterbach
Fixed
Fixed width fields for all numeric values. Useful for two-dimensional arrays.
Hex
Display of values in hex format.
HIdden
Displays hidden members of C++ classes. 'Hidden' members are implementation specific members of
nested classes. They are generated by the C++ 'cfront' preprocessor.
Index
Displays the index of an array element. The format is either decimal or hexadecimal. If information about the
type of the index is available, the index is displayed according to this information.
General Commands Reference Guide V | 17
©
1989-2024 Lauterbach
INherited
Displays members inherited from other classes (only C++).
INheritedName
Shows or hides class names of members from inherited classes. This is useful if a class name is very long.
Location
Displays the location of each variable or record element. The location can be an address or a register name.
MEthods
Displays the names and arguments of member functions (methods).
General Commands Reference Guide V | 18
©
1989-2024 Lauterbach
Multiline
Displays the structure elements in multiple line format. If the elements are in a multidimensional array, the
numeric parameter <nesting_level> defines the number of levels displayed.
Name
Displays the name of structure elements. This is the default. It can be turned OFF to display more structure
elements in one line.
Open
Display of structures and arrays in multiple lines. The optional number defines the depth of the nesting to be
displayed in multi-line mode. This option allows a clearly arranged display of multi dimensional arrays.
Open.ALL will open nested structures respectively unions only. Pointers will not be followed.
PDUMP
For pointers displays a short memory dump of the referenced memory.
General Commands Reference Guide V | 19
©
1989-2024 Lauterbach
Recursive
Display the contents of pointers. The optional number defines the depth of recursion to be displayed. The
command SETUP.VarPtr defines the valid address range for pointers. The contents of pointers outside this
range are not displayed.
SCALED
Displays the scaling information of a variable. This type of information can be added to a variable with the
sYmbol.AddInfor.Var command.
Example:
;add information to a variable
; <variable> <multiplier> <offset> <explanation>
sYmbol.AddInfo.Var vfloat Scaled 1.3 4. " mVolt"
;display scaled variable
Var.View %SCALED.on vfloat %SCALED.OFF vfloat
General Commands Reference Guide V | 20
©
1989-2024 Lauterbach
SHOW
SPaces
Selects if white space characters are allowed in expressions or not. When OFF, expressions must be written
compact and blanks separate expressions. If on, spaces are allowed in expressions, and only the semicolon
separates expressions.
Example:
SpotLight
Highlights changed variable elements. This format includes the TREE format. Highlighted are only elements
for the first objects of a line.
Var.View %SPaces.OFF ast->left flags[5]+i
Var.View %SPaces.on ast -> left; flags[ 5 ] + i
General Commands Reference Guide V | 21
©
1989-2024 Lauterbach
STanDard
The STanDard format option overrides all user-defined settings made in the SETUP.Var window. STanDard
is a set of the following format options:
•SCALED.on
•Name.on
Compact.on
TREE.on
•SHOW.on
INherited.on
See also: all, DEFault.
String
Displays one byte arrays or pointers to bytes as an zero-terminated ASCII string.
A By using just STanDard, you can format the display of one or more variables with all of the format
options listed above.
B If you require other format options in addition to the ones included in STanDard, then you need to
specify these format options explicitly.
A B
General Commands Reference Guide V | 22
©
1989-2024 Lauterbach
sYmbol
Values of pointers are displayed symbolic.
TREE
Tree view (this is the default). Allows to change some display modes for each member of a structure or array
individually. This replaces the functionality of the Open and Recursive formats. Pressing the menu mouse
button on the “+” or “-” sign will open a pull-down menu. This pull-down allows two choose display options for
the shown elements. It is possible to show or hide the contents, display most derived classes, display the
contents as ASCII string or show the first few elements of an array. TREE.OPEN is like TREE.ON, but the
first element is already opened.
The TREE format is automatically selected when the SpotLight format is enabled.
Type
Display of the variable type.
WideString
Each character is a word, e.g. for some DSPs, or unicode.
General Commands Reference Guide V | 23
©
1989-2024 Lauterbach
Functions
For a list of all Var.*() functions, see “Var Functions” (general_func.pdf).
Var.AddSticker Add variable sticker to source listing window
Adds a variable sticker to the source listing window.
Example:
See also
Var Var.set
Format: Var.AddSticker <line> [%<format>] <var>
Var.AddSticker main\10 %Hex mcount
General Commands Reference Guide V | 24
©
1989-2024 Lauterbach
Var.AddWatch Add variable to Var.Watch window
The specified variable is added to the top of the Var.Watch window. A new Var.Watch window is opened, if
no such window exists.
See also
Var Var.set Var.View Var.Watch
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Var.AddWatchPATtern Add variables to Var.Watch window using wildcards
Adds variables to the Var.Watch window. For details on adding variables to a Var.Watch window, refer to the
Var.AddWatch command.
Example:
See also
Var Var.set
Format: Var.AddWatch [%<format>] [<variable>]…
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
Format: Var.AddWatchPATtern [%<format>] <symbol_pattern>
<symbol_pattern> The wildcards ‘?’ and ‘*’ are supported.
Var.AddWatchPATtern extend*
General Commands Reference Guide V | 25
©
1989-2024 Lauterbach
Var.Assign Assignment to a variable
In contrast to Var.set, there is no output of the result in the message line and AREA window. This way you
can assign values to a variable by a PRACTICE script without displaying something not of interest to be
seen.
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Format: Var.Assign %<format> <variable>
<format> For a description of the <format> parameters, click here.
General Commands Reference Guide V | 26
©
1989-2024 Lauterbach
Var.Break Breakpoint on variable
See also
Var.Break.Delete Var.Break.direct Var.Break.Pass Var.Break.Set
Var Var.set
Var.Break.Delete Delete breakpoint on variable
[Example]
Removes the breakpoints set to the address range specified by <hll_expression>.
Format: Var.Break.Delete <hll_expression> [/<breaktype>]
<breaktype>: Program | ReadWrite | Read | Write
ProgramPass | ProgramFail
Alpha | Beta | Charly | Delta | Echo
WATCH | BusTrigger | BusCount
TraceEnable | TraceData | TraceON | TraceOFF | TraceTrigger
TASK <task_magic> | <task_id> | <task_name>
<breaktype> For a description of the breakpoint types and breakpoint options, see
Break.Set.
<hll_expression> Allows to specify the HLL expression in the syntax of the programming
language used (C, C++, …).
<task_magic>, etc. See also “What to know about the Task Parameters”
(general_ref_t.pdf).
General Commands Reference Guide V | 27
©
1989-2024 Lauterbach
Example:
See also
Var.Break Break.Delete
’Release Information’ in ’Legacy Release History’
’Breakpoint Handling’ in ’Training Basic Debugging’
’Breakpoint Handling’ in ’Training Basic SMP Debugging’
Var.Break.Delete flags //deletes all breakpoints set to
//the address range of variable
//flags
Var.Break.Delete flags /Write //deletes Write breakpoints set to
//the address range of variable
//flags
General Commands Reference Guide V | 28
©
1989-2024 Lauterbach
Var.Break.direct Set temporary breakpoint on HLL expression
Sets temporary breakpoint on address range of specified <hll_expression>.
See also
Var.Break Break.direct
’Release Information’ in ’Legacy Release History’
Format: Var.Break.direct <hll_expression> [/<breaktype>]
<breaktype>: Program | ReadWrite | Read | Write
Onchip | HARD | SOFT
ProgramPass | ProgramFail
MemoryReadWrite | MemoryRead | MemoryWrite
RegisterReadWrite | RegisterRead | RegisterWrite
VarReadWrite | VarRead | VarWrite
DATA[.Byte | .Word | .Long] <value>
Alpha | Beta | Charly | Delta | Echo
WATCH | BusTrigger | BusCount
TraceEnable | TraceData | TraceON | TraceOFF | TraceTrigger
Spot
DISable | DISableHIT | DeleteHIT | NoMark | EXclude
TASK <task_magic> | <task_id> | <task_name>
MACHINE <machine_magic> | <machine_id> | <machine_name>
CORE <number>
COUNT <value>
CONDition <expression> [/AfterStep]
VarCONDition <hll_expression> [
/AfterStep]
CMD <command_string>
RESUME
<breaktype> For a description of the breakpoint types and breakpoint options, see
Break.Set.
<hll_expression> Allows to specify the HLL expression in the syntax of the programming
language used (C, C++, …).
<task_magic>, etc. See also “What to know about the Task Parameters” (general_ref_t.pdf).
General Commands Reference Guide V | 29
©
1989-2024 Lauterbach
Var.Break.Pass Define pass condition for breakpoint
When the program execution is stopped by a breakpoint, and the boolean expression is true, the program
execution is automatically restarted. The feature can be cleared by entering the command without
arguments.
Examples:
The following commands shows how a condition can be directly assigned to a single breakpoint.
See also
Var.Break
’Release Information’ in ’Legacy Release History’
Format: Var.Break.Pass [<expression>]
Var.Break.PASS vfloat<1.57
Var.Break.Set mstatic1 /Write
Go
;…
Var.Break.PASS
//automatically restart the program
//execution at a breakpoint hit, if
//the variable vfloat is lower then
//1.57
//set breakpoint
//remove the pass condition
Var.Break.Set mstatic1 /Program /VarCONDition (vfloat>1.7)
Go
Var.Break.Delete mstatic1
General Commands Reference Guide V | 30
©
1989-2024 Lauterbach
Var.Break.Set Set breakpoint to HLL expression
[Example]
Sets breakpoints to the address range specified by <hll_expression>. Without parameters the command
opens a dialog window for setting breakpoints.
Format: Var.Break.Set <hll_expression> [/<breaktype>]
<breaktype>: Program | ReadWrite | Read | Write
Onchip | HARD | SOFT
ProgramPass | ProgramFail
MemoryReadWrite | MemoryRead | MemoryWrite
RegisterReadWrite | RegisterRead | RegisterWrite
VarReadWrite | VarRead | VarWrite
DATA[.Byte | .Word | .Long] <value>
Alpha | Beta | Charly | Delta | Echo
WATCH | BusTrigger | BusCount
TraceEnable | TraceData | TraceON | TraceOFF | TraceTrigger
Spot
DISable | DISableHIT | DeleteHIT | NoMark | EXclude
TASK <task_magic> | <task_id> | <task_name>
MACHINE <machine_magic> | <machine_id> | <machine_name>
CORE <number>
COUNT <value>
CONDition <expression> [/AfterStep]
VarCONDition <hll_expression> [
/AfterStep]
CMD <command_string>
RESUME
<breaktype> For a description of the breakpoint types and breakpoint options, see
Break.Set.
<hll_expression> Allows to specify the HLL expression in the syntax of the programming
language used (C, C++, …).
<task_magic>, etc. See also “What to know about the Task Parameters”
(general_ref_t.pdf).
General Commands Reference Guide V | 31
©
1989-2024 Lauterbach
Example:
See also
Var.Break Break.Set
’Release Information’ in ’Legacy Release History’
Var.Call Call a new procedure
If the expression is a function call, this function is entered and the program counter points to the first
instruction of the function. The values of the CPU registers before the function call can be recalled with the
Frame.SWAP command.
Examples:
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Var.Break.Set struct1 //set Read/Write breakpoints to the
//structure struct1
Var.Break.Set struct1.x /Write //set Write Breakpoint to struct1
//element x
Format: Var.Call [%<format>] [<expression>]
<format> For a description of the <format> parameters, click here.
Var.Call func7(1.5,2.5) //sets the PC to the start of 'func7' and
//pushes two floating point arguments
Var.Call (0x100)(1,2,3) //sets the PC to 100 (hex) and pushes 3
//arguments
Var.Call vops+4 //assuming 'vops' is a C++ class, it sets
//the PC to the method function for the
//operator+
General Commands Reference Guide V | 32
©
1989-2024 Lauterbach
Var.CHAIN Display linked list
The first expression must be the first element of the list. The second expression specifies the pointer to the
next element in the first element. The other arguments specify pointers to elements of the linked list.
Example:
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Format: Var.CHAIN [%<format>] <first> <next> [<pointer> …]]
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
Var.CHAIN %Open ast ast.left vpchar
General Commands Reference Guide V | 33
©
1989-2024 Lauterbach
Var.DelWatch Delete variable from watch
The specified formula is removed from the current Var.Watch window.
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Var.DRAW Graphical variable display
Displays the contents of an array or a structure element graphically. The Data.DRAW command can be
used to display memory contents graphically.
Format: Var.DelWatch [<variable>]…
Format: Var.DRAW [%<format>] <hll_expression> [<scale> [<offset>]] [/<option>]
<option>: <draw_option> | Element <number> | XY | YX | Alternate <number>
<draw_
option>:
Vector | Points | Steps | Impulses | LOG
<draw_options> Vector: Connects the dots for the data values by vectors (default).
Points: Displays each data value as a dot.
Steps: Connects the dots for the data values by steps.
Impulses: Draws each data value as a single pulse.
LOG: Displays the data values in a logarithmic format.
<format> Using the <format> parameters, you can modify the display in various ways.
For a description of the format parameters, see “Display Formats”, page
12.
<hll_expression> Allows to specify the HLL expression in the syntax of the programming
language used (C, C++, …).
<offset> Offset of y-axis (floating point). Default: 0.0 See example.
<scale> Units per pixel of y-axis (floating point).
E.g. a signal has a max. height of 50 units shall be visualized window that
has a height of 400 pixels: 50 units divided by 400 pixels = 0.125
By default the scale factor is set so that the window displays the complete
possible value range for the selected variable. See example.
General Commands Reference Guide V | 34
©
1989-2024 Lauterbach
Example for arrays:
Alternate <number> Split the array in <number> graphs.
<number>=2
first graph display even elements
second graph displays odd element.
<number>=3
first graph displays element 0, n, 2n, …
second graph displays 1, n+1, 2n+1, …
third graph display 2, n+2, 2n+2, … See example.
Element <number> Specify the structure component to be displayed graphically. See example.
XY Allows to display two arrays graphically.
The contents of the first array is used as x-axis.
The contents for the second array is used as y-axis. See example.
YX Allows to display two arrays graphically.
The contents of the first array is used as y-axis.
The contents for the second array is used as x-axis. See example.
Var.DRAW cstr1
Var.DRAW sinewave
General Commands Reference Guide V | 35
©
1989-2024 Lauterbach
Example for two interdependent arrays:
Var.DRAW flags[0..16] cstr1[0..16] /XY
Var.DRAW flags[0..16] cstr1[0..16] /YX
General Commands Reference Guide V | 36
©
1989-2024 Lauterbach
Example for array split:
Example for structure element:
Var.DRAW flags[0..16] /Alternate 3.
Var.DRAW stra1 /Element 2.
General Commands Reference Guide V | 37
©
1989-2024 Lauterbach
Example for <scale> and <offset>:
See also
Var Var.PROfile Var.set <trace>.DRAW
Data.DRAW Data.DRAWFFT Data.DRAWXY Data.IMAGE
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Var.DRAWXY Graphical variable display
Displays the contents of two arrays graphically in one single window. The elements of the first array
correspond to the X-axis and the elements of the second array to the Y-axis. Please refer to the Var.DRAW
command for a description of the parameters and options.
Example:
See also
Var Var.set
Format: Var.DRAWXY [%<format>] <hll_expression> <hll_expression> [/<option>]
<option>: <draw_option> | Element <number> | YX | Alternate <number>
<draw_
option>:
Vector | Points | Steps | Impulses | LOG
Var.DRAWXY array1 array2
<offset> = -1.0
<scale> = 0.01
<scale> = 0.005
without <scale>
General Commands Reference Guide V | 38
©
1989-2024 Lauterbach
Var.DUMP Memory dump
The first expression defines the address of the dump. All following expressions are treated as pointers and
marked in the dump.
See also
Var Var.set SETUP.DUMP
’Release Information’ in ’Legacy Release History’
Format: Var.DUMP [%<format>] [[&]<variable>]…[/<option>]
<format>: NoHex | NoAscii
Byte | Word | Long | Quad | TByte | HByte
BE | LE
PC8
<option>: Orient
NoOrient
COLumns [<columns>]
Mark <break>
Flag <flag>
Track
CACHE
<flag>: Read | Write | NoRead | NoWrite
<break>: Program | Hll | Spot | Read | Write | Alpha | Beta | Charly
<format> For a description of the <format> parameters, see “Display Formats”,
page 12.
<option> For a description of the options, see Data.dump.
General Commands Reference Guide V | 39
©
1989-2024 Lauterbach
Var.Eval Evaluate high-level expression
Evaluates a high-level language expression. The result can be returned with the EVAL() functions.
See also
Var Var.set Eval
Var.EXPORT Export variables in CSV format to file
Exports variables in CSV format (Comma-Separated Values) for import to other applications. Existing file
contents are overwritten if the file already exists.
Format: Var.Eval [%<format>] <hll_expression>
<format> Use the <format> parameters to export the variables in the desired format.
For a description of the <format> parameters, click here.
Format: Var.EXPORT <file> [%<format>] [<variable>]… [/Append]
<file> If path and file name are substituted for a comma, the default file name
t32.lst is used. The file is exported to the current working directory (see
PWD command and “Path Prefixes”).
<format> Use the <format> parameters to export the variables in the desired format.
For a description of the <format> parameters, click here.
General Commands Reference Guide V | 40
©
1989-2024 Lauterbach
Example:
See also
Var Var.set Var.WRITE PRinTer.EXPORT
;Export as CSV and include variable type, location, and index.
;The variables to be exported are 'flags' and 'ast'.
Var.EXPORT ~~~\export.csv %Type %Location %Index flags ast
;Optional step: display the file
TYPE ~~~\export.csv
NOTE: If a text line created by this command exceeds a few thousand characters, it is
clipped. To handle long lines, consider using the format specifier %Multiline.
General Commands Reference Guide V | 41
©
1989-2024 Lauterbach
Var.FixedCHAIN Display linked list
The first expression must be the first element of the list. The second expression specifies the pointer to the
next element in the first element. The other arguments specify pointers to elements of the linked list. The
format parameters can modify the display in various ways. Format parameters are described at the
beginning of this chapter.
Example:
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Var.FixedTABle Display table
Displays the first expression as an array. The command is intended for arrays of structures or arrays of
pointers to structures. The extra arguments are displayed as pointers or indexes to that array.
Example 1:
Format: Var.FixedCHAIN [%<format>] <first> <next> [<pointer> …]]
Var.FixedCHAIN %Location %Multiline ast ast.left vpchar
Format: Var.FixedTABle [%<format>] <array> {<index>} {<pointer>}
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
Var.FixedTABle OsIsrCfg
General Commands Reference Guide V | 42
©
1989-2024 Lauterbach
Example 2: The following command sequence allows you to save the variable content to a *.csv file.
Example 3:
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
PRinTer.FILE OsIsrCfg.csv CSV ; specify file name and select CSV
; as output format
WinPrint.Var.FixedTABle OsIsrCfg ; WinPrint. redirects the command
; output to specified file
Var.FixedTABle flags i k vpchar ; i and k are array indices
; vpchar is a pointer to the array
General Commands Reference Guide V | 43
©
1989-2024 Lauterbach
Var.Go Real-time emulation
See also
Var.Go.Back Var.Go.Change Var.Go.direct Var.Go.Till
Var Var.set
’Release Information’ in ’Legacy Release History’
Var.Go.Back Re-run program backwards until variable access (CTS)
[Example]
Re-runs the recorded program flow backwards until the specified variable is accessed.
Format: Var.Go.Back <expression> [/<breaktype>]
<breaktype>: Program | ReadWrite | Read | Write
Onchip | HARD | SOFT
ProgramPass | ProgramFail
MemoryReadWrite | MemoryRead | MemoryWrite
RegisterReadWrite | RegisterRead | RegisterWrite
VarReadWrite | VarRead | VarWrite
DATA[.Byte | .Word | .Long] <value>
Alpha | Beta | Charly | Delta | Echo
WATCH | BusTrigger | BusCount
TraceEnable | TraceData | TraceON | TraceOFF | TraceTrigger
Spot
DISable | DISableHIT | DeleteHIT | NoMark | EXclude
TASK <task_magic> | <task_id> | <task_name>
MACHINE <machine_magic> | <machine_id> | <machine_name>
CORE <number>
COUNT <value>
CONDition <expression> [/AfterStep]
VarCONDition <hll_expression> [
/AfterStep]
CMD <command_string>
RESUME
General Commands Reference Guide V | 44
©
1989-2024 Lauterbach
Example:
See also
Var.Go Var.Go.direct
’Release Information’ in ’Legacy Release History’
Var.Go.Change Real-time emulation till expression changes
The emulation is started and after each emulation stop the given expression is evaluated. If the expression
has not changed, the emulation is started again.
Example:
See also
Var.Go Var.Go.direct
’Release Information’ in ’Legacy Release History’
<breaktype> For a description of the breakpoint types and breakpoint options, see
Break.Set.
<task_magic>, etc. See also “What to know about the Task Parameters”
(general_ref_t.pdf).
CTS.GOTO -1209874.
Var.Go.Back flags /Write //run program backwards until a write access
//to the variable flags happens
Format: Var.Go.Change <expression>
Var.Break.Set flags /Write
Var.Go.Change flags
// starts the emulation and restarts,
// if the array flags has not changed
General Commands Reference Guide V | 45
©
1989-2024 Lauterbach
Var.Go.direct Real-time emulation with breakpoint
Sets breakpoints to the given variable or structure element and starts the emulation. The breakpoints are
removed after the emulation has stopped again.
Format: Var.Go.direct <expression> [/<breaktype>]
<breaktype>: Program | ReadWrite | Read | Write
Onchip | HARD | SOFT
ProgramPass | ProgramFail
MemoryReadWrite | MemoryRead | MemoryWrite
RegisterReadWrite | RegisterRead | RegisterWrite
VarReadWrite | VarRead | VarWrite
DATA[.Byte | .Word | .Long] <value>
Alpha | Beta | Charly | Delta | Echo
WATCH | BusTrigger | BusCount
TraceEnable | TraceData | TraceON | TraceOFF | TraceTrigger
Spot
DISable | DISableHIT | DeleteHIT | NoMark | EXclude
TASK <task_magic> | <task_id> | <task_name>
MACHINE <machine_magic> | <machine_id> | <machine_name>
CORE <number>
COUNT <value>
CONDition <expression> [/AfterStep]
VarCONDition <hll_expression> [
/AfterStep]
CMD <command_string>
RESUME
<breaktype> For a description of the breakpoint types and breakpoint options, see
Break.Set.
<task_magic>, etc. See also “What to know about the Task Parameters”
(general_ref_t.pdf).
General Commands Reference Guide V | 46
©
1989-2024 Lauterbach
Examples:
See also
Var.Go Var.Go.Back Var.Go.Change Var.Go.Till
Var.Go.Till Real-time emulation till expression true
The emulation is started and after each emulation stop the given boolean expression is evaluated. If the
expression is false, the emulation is started again.
Example:
See also
Var.Go Var.Go.direct
’Release Information’ in ’Legacy Release History’
Var.Go.direct flags // run till any element of 'flags' is
// accessed
Var.Go.direct vfloat /Write // run till a write to 'vfloat' occurs
Format: Var.Go.Till <expression>
Var.Break.Set vfloat /Write
Var.Go.Till vfloat<=1.57
//starts the emulation and restarts, if
// the value
//of vfloat is larger than 1.57
General Commands Reference Guide V | 47
©
1989-2024 Lauterbach
Var.IF PRACTICE conditional branching
Executes the next command or command block only if the specified <hll_condition> is true. The Var.IF
command is the counterpart to the PRACTICE IF instruction and can also be combined with the ELSE
command.
Example:
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Format: Var.IF <hll_condition>
<hll_condition> Allows to specify the condition in the syntax of the programming
language used (C, C++, …).
Var.IF stra2[1][0].pastruct5[0]==25
(
PRINT "Initialization of stra2[1][0].pastruct5[0] failed."
)
General Commands Reference Guide V | 48
©
1989-2024 Lauterbach
Var.INFO View information about HLL variable or HLL expression
Displays all information available for a symbol or the type of an HLL expression. The physical layout of HLL
variables is displayed too.
Example:
See also
Var Var.set sYmbol.INFO
’Release Information’ in ’Legacy Release History’
’The Symbol Database’ in ’Training Source Level Debugging’
Format: Var.INFO <variable> | <expression>
;display information about the HLL expression func7
Var.INFO func7
;display information about the structure ast
Var.INFO ast
General Commands Reference Guide V | 49
©
1989-2024 Lauterbach
Var.Local Local variables
Display of all local variables of a function. When using Pascal, the local variables of the superior functions
are displayed too. The format parameters can modify the display in various ways. Format parameters are
described at the beginning of this chapter.
The variables can be modified by clicking with the mouse.
See also
Var Var.Ref Var.set Var.View
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Format: Var.Local [%<format> …]
General Commands Reference Guide V | 50
©
1989-2024 Lauterbach
Var.LOG Log variables
[Examples]
By default the specified variables are logged to the TRACE32 message AREA whenever the program
execution is stopped. If a syntactical error is made, just a warning is received. This allows the definition of a
log showing local variables not valid in the current program context.
Format: Var.LOG [%<format>] {<variable>} {/<option>}
<option>: ONBREAK
ONSPOT
ONTIME <time>
TImestamp
Changes
AREA <name>
<format> Use the <format> parameters to format the variables as required. For a
description of the <format> parameters, click here.
<options>
ONBREAK Updates log each time the program execution is stopped. This is the
default.
Changes A log is only made when the variables have changed their value.
AREA <name> Selects a different AREA for the logging.
ONSPOT Update the log whenever a breakpoint specified with the Action Spot is hit
and each time the program execution is stopped.
ONTIME Updates the log in a fixed time interval. This option requires run-time
memory access to the variables.
TImestamp Adds timestamps (absolute and relative) to the log. Mainly used together
with ONTIME option.
General Commands Reference Guide V | 51
©
1989-2024 Lauterbach
Example 1: Var.LOG without a variable definition ends the logging.
Example 2: Log variables to file. Remember that inline comments for Var.* commands must start with //.
Var.LOG flags i k ; i and k are local variables
; if they are not valid in the
; current context, a warning is
; given by TRACE32 PowerView
AREA.view ; open TRACE32 message AREA window
;… ; perform your test
Var.LOG ; switch off the logging
A If a variable is not valid in the current context, a ? is displayed.
AREA.Create my_log ; create my_log area
AREA.view my_log ; display my_log area
AREA.OPEN my_log loglist.lst ; save all entries to area in file
Var.LOG flags ast k /AREA my_log // enable variable log
AREA.CLOSE my_log ; stop saving the entries to area
; in file
Var.LOG // end variable logging
TYPE loglist.lst ; display contents of file
A
General Commands Reference Guide V | 52
©
1989-2024 Lauterbach
Example 3: Log variables every second.
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Var.NEW Creates a TRACE32-internal variable
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
; create area named my_log
AREA.Create my_log
; display area named my_log
AREA.view my_log
; log variables every second via the run-time memory access
; log them with relative and absolute timestamp
; log only changes
Var.LOG %E flags ast /AREA my_log /ONTIME 1.0s /TImestamp /Changes
Go
;…
Break
; end variable logging
Var.LOG
Format: Var.NEW [<type>] <name> (deprecated)
Use Var.NEWLOCAL or Var.NEWGLOBAL instead.
General Commands Reference Guide V | 53
©
1989-2024 Lauterbach
Var.NEWGLOBAL Creates a global TRACE32-internal variable
Creates a TRACE32-internal variable of the specified variable type and registers the variable on the global
PRACTICE stack frame.
Global TRACE32-internal variables are visible everywhere. They are not erased when the declaring file or
block ends. TRACE32-internal variables can be used to write complex PRACTICE programs which deal with
expressions of the target high level language (HLL).
Example: A character array is created on the global PRACTICE stack frame. The array member [5] is
initialized, and its value is printed to the TRACE32 message line using the Var.STRing() function. For more
examples, refer to Var.NEWLOCAL.
Remember that inline comments for Var.* commands must start with //. PRINT is a command, whereas
Var.STRing() is not a command, but a function(). Therefore, the above inline comment may start with a
semicolon ;.
See also
Var.NEWLOCAL Var Var.set
’In This Document’ in ’General Function Reference’
’PRACTICE Script Structure’ in ’PRACTICE Script Language User’s Guide’
’Release Information’ in ’Legacy Release History’
Format: Var.NEWGLOBAL [<var_type>] \<variable_name>
<var_type>: int | char | long | short
<var_type> The following commands provide an overview of the supported variable
types:
•The sYmbol.List.BUILTIN command lists the supported built-in
variable types.
•The sYmbol.List.Type command lists variable types available after
a target program has been loaded.
<variable_name> The TRACE32-internal variables must begin with a '\' character, as opposed
to global PRACTICE macros (variables), which begin with a '&' and are
created with GLOBAL.
PMACRO.list ;View the PRACTICE stack
;Create a TRACE32-internal variable: the character array \myStr
Var.NEWGLOBAL char[10][128] \myStr
Var.set \myStr[5]="hello" //Initialize array member [5]
PRINT Var.STRing(\myStr[5]) ;Show value in message line
General Commands Reference Guide V | 54
©
1989-2024 Lauterbach
Var.NEWLOCAL Creates a local TRACE32-internal variable
[Examples]
Creates a TRACE32-internal variable of the specified variable type and registers the variable on the local
PRACTICE stack frame.
Local TRACE32-internal variables exist inside the declaring block and are erased when the block ends.
They are visible inside their blocks, sub-blocks (e.g. IF..., RePeaT..., WHILE..., etc.), subroutines
(GOSUB...RETURN), and sub-scripts (DO...ENDDO).
TRACE32 internal variables can be used to write complex PRACTICE programs which deal with
expressions of the target high level language (HLL).
Format: Var.NEWLOCAL [<var_type>] \<variable_name>
<var_type>: int | char | long | short | ...
<var_type> The following commands provide an overview of the supported variable
types:
•The sYmbol.List.BUILTIN command lists the supported built-in
variable types.
•The sYmbol.List.Type command lists variable types available after
a target program has been loaded.
<variable_name> The debugger-internal HLL variables must begin with a '\' character, as
opposed to local PRACTICE macros (variables), which begin with a '&' and
are created with LOCAL.
General Commands Reference Guide V | 55
©
1989-2024 Lauterbach
Example 1:
This script shows how to create, initialize, and view the local TRACE32-internal variables. In addition,
the example shows how to print their return values to the TRACE32 message line using the Var.*()
functions (See “Functions”).
By double-clicking a local TRACE32-internal variable in the Var.View window, you can change its
parameter on the fly. Simply type the desired parameter in the TRACE32 command line.
Example 2:
The HLL array flags is manipulated based on the HLL array vdiarray. Remember that inline
comments for Var.* commands must start with //.
PMACRO.list ;View the PRACTICE stack
;Create some TRACE32-internal variables: integer \val1, float \val2, and
;character array \myStr on the local PRACTICE stack frame
Var.NEWLOCAL int \val1
Var.NEWLOCAL float \val2
Var.NEWLOCAL char[10][128] \myStr
;Open the Var.View window to display these TRACE32-internal variables
Var.View %all \val1 \val2 \myStr
;Initialize the TRACE32-internal variables
Var.set \val1=0x42
Var.set \val2=197.25
Var.set \myStr[5]="Hello world!"
;Print the TRACE32-internal variables to the message bar
PRINT %Hex "0x" Var.VALUE(\val1) ;integer
PRINT Var.FVALUE(\val2) ;float
PRINT Var.STRing(\myStr[5]) ;string
Var.NEWLOCAL int \i //Create a TRACE32-internal variable: integer \i
Var.set \i=0 //Initialize the TRACE32-internal variable
;Open a window to watch the HLL arrays flags, ast, and vdiarray
;as well as the TRACE32-internal variable \i
Var.Watch %SpotLight flags ast vdiarray \i
;Manipulate the HLL array flags based on the HLL array vdiarray
Var.WHILE \i<sizeof(vdiarray)
Var.set flags[\i++]=3
Var.IF \i=sizeof(vdiarray)
PRINT "end of loop reached"
General Commands Reference Guide V | 56
©
1989-2024 Lauterbach
Example 3:
This script focusses on TRACE32-internal array variables.
See also
Var.NEWGLOBAL Var Var.set
’Release Information’ in ’Legacy Release History’
Var.OBJECT Pretty printing for C++ objects
The command Var.OBJECT can be used together with the sYmbol.AddInfo command or with simulator
based target calls for pretty printing of C++ objects.
Example:
The screen shots below show the standard display with the Var.View command and the pretty printing with
Var.OBJECT.
;Create a TRACE32-internal variable: a character array
Var.NEWLOCAL char[6][20] \string_array
;Open a window to watch \string_array
Var.Watch %SpotLight \string_array
;Initialize the character array
Var.set \string_array[0]="flashtest0" //is shown in message line
Var.ASSIGN \string_array[2]="element2" //is NOT shown in message line
PRINT Var.STRing(\string_array[0]) //show value in message line
Var.IF \string_array[2][0]!='\0'
PRINT Var.STRing(\string_array[2])
Format: Var.OBJECT [%<format>] [<variable>]…
; define the vector type information
; TABLE type
; base: _M_impl._M_start
; size = _M_impl._M_finish - _M_impl._M_start
sYmbol.AddInfo.Type std::vector<? TABLE \
"(#o)._M_impl._M_finish-(#o)._M_impl._M_start" "(#o)._M_impl._M_start"
Var.OBJECT %String %Type vStr
General Commands Reference Guide V | 57
©
1989-2024 Lauterbach
An example for displaying STL container running on the TRACE32 Instruction Set Simulator for Arm can be
found under ~~/demo/etc/stl
See also
Var Var.set
CD.DO ~~/demo/etc/stl/demo_stl_arm.cmm
General Commands Reference Guide V | 58
©
1989-2024 Lauterbach
Var.PATtern Display variables allowing wildcards for symbol name and type
Display variables allowing the wildcard ? and * in the variable name and the variable type.
Examples:
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Format: Var.PATern [%<format>] [<symbol_pattern>] [<type_pattern>]
Var.PATtern target* struct ; Display all variables whose name
; begins with "target" and which
; are of the type struct
Var.PATtern jpeg* ; Display all variables whose name
; begins with "jpeg"
Var.PATtern %Type * struct struct? ; Display all variables which
; are of the type struct struct?
General Commands Reference Guide V | 59
©
1989-2024 Lauterbach
Var.PRINT Display variables
The specified formula is interpreted and the according values are displayed in the message line or the
current output AREA window. The command is an HLL version of the PRINT command.
Example:
See also
Var Var.set Var.WRITE Var.ADDRESS()
Var.END() Var.RANGE() Var.SIZEOF() Var.STRing()
Var.TYPEOF() Var.VALUE()
’Release Information’ in ’Legacy Release History’
Format: Var.PRINT [%CONTinue] {[%<format>] [<variable>|<data>]}
CONTinue Adds the string to the current output line in the selected AREA window or
message line without inserting a newline character.
<format> Use the <format> parameters to print the variables in the desired format. For
a description of the <format> parameters, click here.
Var.PRINT cstr1
Var.PRINT cstr1 " " mstatic1
Var.PRINT cstr1 ", " mstatic1
Var.PRINT "cstr1=" cstr1 ", mstatic1=" mstatic1
General Commands Reference Guide V | 60
©
1989-2024 Lauterbach
Var.PROfile Graphical display of variable
The value of the specified variable(s) is displayed graphically. The display requires run-time memory
access if the variable value should be displayed while the program execution is running.
Example 1:
Format: Var.PROfile [%<format>] <variable> [<variable>] [<variable>] [<refresh_rate>]
<refresh_
rate>:
0.1 | 1.0 | 10.0
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
<refresh_rate> The refresh rate is measured in seconds.
If no value is specified, then the display is updated and shifted every 100
ms.
Var.PROfile %E mstatic1
Button Description
Init Restart display
Hold Stop update/re-start update
AutoZoom Best vertical scaling
General Commands Reference Guide V | 61
©
1989-2024 Lauterbach
Example 2: Up to three variables can be displayed. The following color assignment is used: first variable
value red, second variable value green, third variable value blue.
See also
Var Var.DRAW Var.set Data.PROfile
’Release Information’ in ’Legacy Release History’
Var.Ref Referenced variables
Display of variables, similar to command Var.Watch. The variables referenced by the current source line are
automatically added to the window.
See also
Var Var.Local Var.set Var.View
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Var.PROfile %E mstatic1 fstatic fstatic2
Format: Var.Ref [%<format>] [/Track]
Track The window follows other windows. Otherwise the display is related to the
next executed HLL line.
<format> For a description of the <format> parameters, click here.
General Commands Reference Guide V | 62
©
1989-2024 Lauterbach
Var.set Modify variable
It is possible to start this command by double-clicking with the mouse to the variable in the List Source
window (List) or in a variable display window. Variable assignments done with the Var.set command result
in a message in the TRACE32 message AREA. The command Var.Assign can be used for variable
assignments without messaging to the TRACE32 message AREA.
Example 1:
Example 2: Modification of arrays
Format: Var.set [{%<format>}] <expression>
<format> For a description of the <format> parameters, click here.
Var.set \mod1\venumvar=enum4 //assignment of value 'enum4' to the
//variable 'venumvar' in module 'mod1'
Var.set charptr[4]='x' //Content of the 5th element of array
//'charptr' is set value 'x'.
//complex C expression
Var.set xptr->next=(SYM_symbol*)sptr->prev->next[index]
Var.set i++ //simple C expression
Var.set func7(1.5,2.5) //execute a function in the target
//interrupts are accepted while the
//function is executed
Var.set flags[3..7]=12 //set flags[3..7] to 12
Var.set flags[3..7]=(1,2,3,4,5) //set flags[3..7] to specified
//values
//PRACTICE script for array comparison
Var.IF flags[3..7]==(1,2,3,4,5)
PRINT "Array elements already initialized"
ELSE
Var.set flags[3..7]=(1,2,3,4,5)
ENDDO
General Commands Reference Guide V | 63
©
1989-2024 Lauterbach
Example 3: Modifications of structures
Example 4: Assigning the result of TRACE32 functions to variables requires a special syntax.
Example 5: If no assignment is made, the variable value will be displayed in the message line.
See also
Var Var.AddSticker Var.AddWatch Var.AddWatchPATtern
Var.Assign Var.Break Var.Call Var.CHAIN
Var.DelWatch Var.DRAW Var.DRAWXY Var.DUMP
Var.Eval Var.EXPORT Var.FixedCHAIN Var.FixedTABle
Var.Go Var.IF Var.INFO Var.Local
Var.LOG Var.NEW Var.NEWGLOBAL Var.NEWLOCAL
Var.set ast=(0x100,6,0x12345,0x234,3,6)
// Assign result of TRACE32 function FILE.EXIST(<file>)to variable k
Var.set k=\FILE_EXIST("t32.men")
// multiply variable k with the result of the TRACE32 function
// Register(<name>) and assign the result to variable i
Var.set i=k*\Register(R10)
// assign the result of the TRACE32 function Data.Byte(<hex_address>) to
// the variable flags[3]
Var.set flags[3]=\Data_Byte(0x40004000)
// The following syntax is required if an Access Class is required
// here the Access Class NoCache
Var.set flags[3]=\Data_Byte((NC:0x40004000))
Var.set % i //displays value of variable 'i' in
//decimal, hex and ASCII
Var.set %String struct1 //displays structure 'struct1'.
//displays character array included
//in the structure as strings
General Commands Reference Guide V | 64
©
1989-2024 Lauterbach
Var.OBJECT Var.PATtern Var.PRINT Var.PROfile
Var.Ref Var.Step Var.TABle Var.TREE
Var.TYPE Var.View Var.Watch Var.WHILE
Var.WRITE Var.ADDRESS() Var.BITPOS() Var.BITSIZE()
Var.END() Var.EXIST() Var.FVALUE() Var.ISBIT()
Var.RANGE() Var.SIZEOF() Var.STRing() Var.TYPEOF()
Var.VALUE()
’Release Information’ in ’Legacy Release History’
’Testing of Functions’ in ’Training Source Level Debugging’
General Commands Reference Guide V | 65
©
1989-2024 Lauterbach
Var.Step Step
See also
Var.Step.BackChange Var.Step.BackTill Var.Step.Change Var.Step.Till
Var Var.set Step.single
Var.Step.BackChange Step back till expression changes
Steps back till the expression changes. The command will stop also if the expression cannot be evaluated.
Example:
See also
Var.Step
’Release Information’ in ’Legacy Release History’
Var.Step.BackTill Step back till expression true
Steps back till the boolean expression becomes true (i.e. not zero). The command will stop also, if the
expression cannot be evaluated.
See also
Var.Step
’Release Information’ in ’Legacy Release History’
Format: Var.Step.BackChange [<expression>]
Var.Step.BackChange k // steps till variable k changes
Var.Step.BackChange ptr->x // steps till the contents of the
// structure pointed to by 'ptr'
// changes
Var.Step.BackChange flags // steps till one element of the array
// 'flags' changes
Format: Var.Step.BackTill [<expression>]
Var.Step.BackTill i>0x10 //steps till variable 'i' is larger than 10
General Commands Reference Guide V | 66
©
1989-2024 Lauterbach
Var.Step.Change Step till expression changes
Steps till the expression changes. The command will stop also if the expression cannot be evaluated.
Examples:
See also
Var.Step
’Release Information’ in ’Legacy Release History’
Var.Step.Till Step till expression true
Steps till the boolean expression becomes true (i.e. not zero). The command will stop also if the expression
cannot be evaluated.
Example:
See also
Var.Step
’Release Information’ in ’Legacy Release History’
Format: Var.Step.Change [<expression>]
Var.Step.Change k // steps till variable k changes
Var.Step.Change ptr->x // steps till the contents of the structure
// pointed to by 'ptr' changes
Var.Step.Change flags // steps till one element of the array
// 'flags' changes
Format: Var.Step.Till [<expression>]
Var.Step.Till i>0x10 //steps till variable 'i' is larger than 10
General Commands Reference Guide V | 67
©
1989-2024 Lauterbach
Var.TABle Display table
Displays the first expression as an array. The extra arguments are displayed as pointers or indexes to that
array.
Examples:
Displays the first expression as an array.
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Format: Var.TABle [%<format>] [<variable> [<pointer> …]]
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
Var.TABle %Location flags i k vpchar
Var.TABle vpchar[0..100]
//'artificial' array build on
// a pointer
General Commands Reference Guide V | 68
©
1989-2024 Lauterbach
Var.TREE Display variables in the form of a tree structure
Displays the HLL variables in the form of a tree structure. The tree structure is broken down by program and
module.
Example:
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Format: Var.TREE [%<format>]
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
Var.TREE %Type %Location %Index
%Index%Location%Type
General Commands Reference Guide V | 69
©
1989-2024 Lauterbach
Var.TYPE Display variable types
The specified formula is interpreted and the types of the according values are displayed. By the options of
this command the way of display may be modified in wide range.
See also
Var Var.set
’Release Information’ in ’Legacy Release History’
Format: Var.TYPE [%<format>] [<expression>]…
<format>: all
DEFault
Type [.on | .OFF]
Open [.on | .OFF | .2 | .3 | .4]
Location [.on | .OFF]
HIdden [.on | .OFF]
Recursive [.on | .OFF | .2 | .3 | .4]
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
General Commands Reference Guide V | 70
©
1989-2024 Lauterbach
Var.View Display variables
The specified formula is interpreted and the according values are displayed. If a syntactical error is made,
just a warning will be received. That’s why the definition of a window showing local variables is allowed,
without the program counter being valid to the according procedure.
Display variables:
Interpret and display memory content in HLL format:
Modify a variable value or structure element:
Format: Var.View [%<format>] [<variable>]…
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
A Static variable.
B ? indicates that the local variable is not valid in the current program context.
C Double-click the value you want to modify.
D Double-clicking inserts the current value into the TRACE32 command line. Simply enter a
new value, e.g. 0x1
B
A
C
D
General Commands Reference Guide V | 71
©
1989-2024 Lauterbach
See also
Var Var.AddWatch Var.Local Var.Ref
Var.set Var.Watch Frame.view
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
NOTE: A variable value is displayed in red color, then the assigned value is not within
the defined range of the variable type.
The typical reason in C programs is that an enumeration variable has a value
that does not correspond to one of the defined enumerators.
General Commands Reference Guide V | 72
©
1989-2024 Lauterbach
Var.Watch Open Var.Watch window
Opens a Var.Watch window, displaying the specified variables. Further variables can be added on the fly to
the window by using the window buttons or the Var.AddWatch command.
Example 1: If the command Var.Watch is used with format parameters only, these format parameters are
applied to all variables added to the window.
Example 2: If the command Var.Watch is used with variable names and format parameters, the format
parameters apply only to the specified variables. Variables added to the window are formatted in the default
way.
Format: Var.Watch [%<format>] [<variable>]…
A Recall already used variables B Browse symbols
C Var.AddWatch, Var.View, Var.DelWatch D Double-click to modify or use Var.set
E ? indicates that the variable is not valid in the current program context.
<format> Use the <format> parameters to display the variables in the desired format.
For a description of the <format> parameters, click here.
Var.Watch %Decimal %Hex
Var.AddWatch mstatic1 ; mstatic1 is displayed in decimal
; and hex format
Var.Watch %Index flags %Hex mstatic1 %Hex.OFF %SpotLight ast
Var.AddWatch mstatic2 ; mstatic1 is displayed in the
; default format
A B
D
C
E
General Commands Reference Guide V | 73
©
1989-2024 Lauterbach
Example 3: The Var.Watch window can also evaluate HLL expressions.
See also
Var Var.AddWatch Var.set Var.View
’Release Information’ in ’Legacy Release History’
’Display Variables’ in ’Training Source Level Debugging’
Var.WHILE PRACTICE loop construction
Repeats the next command or command block while <hll_condition> is true. Var.WHILE is the counterpart
to the PRACTICE WHILE instruction.
Example:
See also
Var Var.set WHILE
’Release Information’ in ’Legacy Release History’
Var.Watch mstatic1 ast.count enumvar mstatic1+ast.count/enumvar
Format: Var.WHILE <hll_condition>
<hll_condition> Allows to specify the condition in the syntax of the programming language
used (C, C++, …).
Var.WHILE ast.count<1238
(
Var.set ast.count++
)
General Commands Reference Guide V | 74
©
1989-2024 Lauterbach
Var.WRITE Write variables to file
Writes the values of the specified variables to file. The command is an HLL version of the WRITE command.
Example:
See also
Var Var.EXPORT Var.PRINT Var.set
CLOSE OPEN
’Release Information’ in ’Legacy Release History’
Format: Var.WRITE #<file_number> [%CONTinue] [%<format>] [<variable>]…
CONTinue Adds the string to the current output line in the selected file without
inserting a newline character.
<format> Using the <format> parameters, you can modify the output in various ways.
For a description of the <format> parameters, click here.
;create and open a file for writing
OPEN #1 ~~~\test.txt /Create
;write the variable name 'ast' to the file
WRITE #1 "ast: "
;continue with the values of 'ast' in the same line
Var.WRITE #1 %CONTinue %Recursive.on ast
;write the array name and a selected index 'vdiarray[2]' to the file
WRITE #1 "vdiarray[2]: "
;continue with the value of the array index 2 in the same line
Var.WRITE #1 %CONTinue vdiarray[2]
;close the file for writing
CLOSE #1
;open the file for editing in TRACE32
EDIT ~~~\test.txt
General Commands Reference Guide V | 75
©
1989-2024 Lauterbach
VCO
VCO Clock generator
Simulator only
See also
VCO.BusFrequency VCO.Down VCO.Frequency VCO.Rate
VCO.RESet VCO.state VCO.TimeBaseFrequency VCO.Up
VCO.BusFrequency Control bus clock
Simulator only
Sets the bus clock frequency.
See also
VCO VCO.state
VCO.Down Frequency down
Simulator only
Step down with the VCO frequency.
See also
VCO VCO.Frequency VCO.state VCO.Up
Format: VCO.BusFrequency <frequency>
Format: VCO.Down [<frequency>]
<frequency>: 50000.
VCO.Down ; frequency down 50 kHz
General Commands Reference Guide V | 76
©
1989-2024 Lauterbach
VCO.Frequency Control VCO clock
Simulator only
In the TRACE32 Instruction Set Simulator, the value sets the number of cycles (instruction fetch and
load/store) after which the simulation time is increased by one second.
See also
VCO VCO.Down VCO.state VCO.Up
VCO()
VCO.Rate VCO rate
Simulator only
Defines the rate between VCO clock and internal CPU clock.
See also
VCO VCO.state
Format: VCO.Frequency <frequency>
<frequency>: 1000Hz ... 2GHz
<frequency> All frequency definitions may be done in Hz, kHz, MHz or GHz.
VCO.Frequency 20MHz ; set VCO clock to 20 MHz
VCO.Frequency 10.5MHz ; set VCO clock to 10.5 MHz
VCO.Frequency 1800KHz ; set VCO clock to 1.8 MHz
Format: VCO.Rate <rate>
General Commands Reference Guide V | 77
©
1989-2024 Lauterbach
VCO.RESet VCO reset
Simulator only
The VCO is initialized to the default frequency.
See also
VCO VCO.state
VCO.state State display
Simulator only
Displays the state of the VCO.
See also
VCO VCO.BusFrequency VCO.Down VCO.Frequency
VCO.Rate VCO.RESet VCO.TimeBaseFrequency VCO.Up
VCO()
VCO.TimeBaseFrequency Set the time base clock
Simulator only
Sets the time base clock.
See also
VCO VCO.state
Format: VCO.RESet
Format: VCO.state
Format: VCO.TimeBaseFrequency <frequency>
<frequency>: 1000Hz ... 2GHz
General Commands Reference Guide V | 78
©
1989-2024 Lauterbach
VCO.Up Frequency up
Simulator only
Step up with VCO clock.
Example:
See also
VCO VCO.Down VCO.Frequency VCO.state
Format: VCO.Up [<frequency>]
<frequency>: 1000Hz ... 2GHz
VCO.Up ; frequency up by 50 kHz
VCO.Up 1MHz ; frequency up by 1 MHz
General Commands Reference Guide V | 79
©
1989-2024 Lauterbach
VCU
VCU VCU registers (Vector Computational Unit)
Ceva-X only
VCU commands refer to the Vector Computational Unit which is an optional unit available only to the new
Ceva-XC devices. In addition these commands must be made available by specifying the actual number of
implemented VCUs (see SYStem.VCU.INSTances).
See also
VCU.Init VCU.RESet VCU.Set VCU.view
VCU.Init Initialize VCU registers
Ceva-X only
Sets the VCU registers to their default values.
See also
VCU VCU.view
VCU.RESet Reset VCU registers
Ceva-X only
Default: VCU0
Resets all registers of the selected instance to zero.
See also
VCU VCU.view
Format: VCU.Init
Format: VCU.RESet [/VCU<instance>]
General Commands Reference Guide V | 80
©
1989-2024 Lauterbach
VCU.Set Set VCU register
Ceva-X only
Default: VCU0
Modifies the selected <register> of the according VCU instance. MLD registers become available if
SYStem.VCU.MLD is ON.
See also
VCU VCU.view
VCU.view Display VCU registers
Ceva-X only
Default: VCU0
Control panel to display and modify VCU registers of the corresponding VCU instance. MLD registers
become available if SYStem.VCU.MLD is ON.
See also
VCU VCU.Init VCU.RESet VCU.Set
Format: VCU.Set <register> <value> [/<option>] [/VCU<instance>]
Format: VCU.view [/<option>] [/VCU<instance>]
General Commands Reference Guide V | 81
©
1989-2024 Lauterbach
VE
VE Virtual execution mode
VE is the virtual execution mode of TRACE32. The virtual execution mode can be used to run and debug a
target application even if no target memory is available. This can be useful to run initialization code for the
target.
After turning on the VE, all program code will be simulated by the debugger’s instruction set simulator. The
simulator will cause instruction fetches/loads and stores according the program. The target of the
fetch/load/store depends on the TRACE32 virtual memory (VM:). If an address is fetched/loaded/stored
which has been set using Data.LOAD or Data.Set, the simulator will access simulator memory. All other
addresses will be forwarded to the processor.
See also
VE.OFF VE.ON
’Release Information’ in ’Legacy Release History’
VE.OFF Turn off virtual execution mode
Turns off the virtual execution mode.
See also
VE
VE.ON Turn on virtual execution mode
Turns on the virtual execution mode.
See also
VE
Format: VE.OFF
VM.OFF (deprecated)
Format: VE.ON
VM.ON (deprecated)
General Commands Reference Guide V | 82
©
1989-2024 Lauterbach
VPU
VPU Vector Processing Unit (VPU)
Not all core architectures supported
The VPU command group is used to display and modify the VPU (Vector Processing Unit) registers. These
commands do not support all core architectures.
See also
VPU.Init VPU.Set VPU.view VPU()
’VPU Functions’ in ’General Function Reference’
VPU.Init Initialize VPU registers
Not all core architectures supported
Resets all Vector Processing Unit (VPU) registers.
See also
VPU VPU.view
Format: VPU.Init [/<option>]
VPU.RESet (deprecated)
<option> For a description of the options, see Register.view.
General Commands Reference Guide V | 83
©
1989-2024 Lauterbach
VPU.Set Modify VPU registers
Not all core architectures supported
Sets the value of the specified Vector Processing Unit register.
Format: VPU.Set <register> <value> [/<option>]
<register>:
(PowerPC
74xx/86xx
only)
VR0..VR31
VRSAVE
VSCR
<register>:
(APEX only)
V0...V7
VC0...VC3
VCS0...VCS7
OVV
<register>:
(TPC only)
VPE0_V0VPE0_V44
VPE1_V0VPE1_V44
VPE63_V0VPE63_V44
VPE0_VP0VPE0_VP15
VPE1_VP0VPE1_VP15
VPE63_VP0VPE63_VP15
<register>:
(PowerPC 74xx/86xx
only)
To modify the ALTIVEC vector registers VR0-VR31, split the value in four 32-
bit values. If less than four values are given, the values will be aligned to LSB
and undeclared values will be set to zero.
<register>:
(TPC only)
The register name describes the Vector Processing Element number and
the register class and number.
The first part of the register name specifies the Vector Processing Element
(VPE) number. The second part specifies the register class, Vector (V) or
Vector Predicate (VP), and the respective register number.
<option>: For a description of the options, see Register.view.
General Commands Reference Guide V | 84
©
1989-2024 Lauterbach
Example: Brief example for PowerPC
See also
VPU VPU.view
VPU.view Display ALTIVEC register window
Not all core architectures supported
Opens a window displaying the register contents of the Vector Processing Unit.
See also
VPU VPU.Init VPU.Set
’Release Information’ in ’Legacy Release History’
VPU.Set VR2 0x11111111 0x22222222 0x33333333 0x44444444
VPU.Set VRSAVE 0x0000003F
VPU.Set VSCR 0x00010000
PRINT VPU(VR2.W3)
PRINT VPUCR(VRSAVE)
Format: VPU.view [/<option>]
<option> For a description of the options, see Register.view.