Get or set the value of a local variable.
locals [options] [variable-name [variable-value]]
Get or set the value of a variable specified by
<variable-name>. When variable name and value are not specified, values of all the local variables are returned. Elements of a complex data types like a structure can be accessed through '.' operator. For example, var1.int_type refers to int_type element in var1 struct. Array elements can be accessed through their indices. For example, array1 refers to the element at index 0 in array1.
||Return the variable definitions like address, type, size and RW flags.|
||Return the result in Tcl dict format, with variable names as dict keys and variable values as dict values. For complex data like structures, names are in the form of parent.child.|
The return value depends on the options used.
<none>: Variable value(s)
-defs: Variable definition(s)
Nothing, when variable value is set. Error string, if variable value cannot be read or set.
Return the value of the local variable Int_Loc.
Return the values of all the local variables in the current stack frame.
Return definitions of all the local variables in the current stack frame.
locals Int_Loc 23
Set the value of the local variable Int_Loc to 23.
Return the value of int_type element in var1 struct, where var1 is a member of tmp_var struct.
Return the value of the element at index 0 in array array1. array1 is a member of var1 struct, which is in turn a member of tmp_var struct.