System Debug Reference Manual (32650-90888)

Chapter 7 305
Symbolic Formatting Symbolic Access
Using the Symbolic Formatter
A variable map is required to find the location of a variable at any given time. These maps
are generated as part of the program listing by the language compilers. Each compiler has
a unique compiler option, which must be specified in order for the variable map to be
included in the listing. For Pascal, the option is $TABLES ON$. For additional details on
generating and interpreting this information, refer to the appropriate language reference
manual. Each language also has a programmers manual which provides detailed
language-specific examples illustrating how to use Debug to debug a program.
CAUTION
If code optimization is done by the compiler, the location of the variables at
any given time is indeterminable. Refer to the appropriate language manual
for other issues concerning optimized code.
In the following examples, we assume that the System Debug variable addr1 contains the
address of a data structure corresponding to the type StudentArray. In addition, located
at dp+8 is a data structure defined by the person record. For example,
$nmdebug > fv addr1 "StudentRecord"
RECORD
NAME : 'Bill'
ID : 1
YEAR : SENIOR
NUMGRADES : 4
GRADES :
[ 1 ]: 2d
[ 2 ]: 41
[ 3 ]: 4e
[ 4 ]: 42
[ 5 ]: 0
[ 6 ]: 0
[ 7 ]: 0
[ 8 ]: 0
[ 9 ]: 0
[ a ]: 0
END
$nmdebug > fv dp+8 "person"
RECORD
NEXT : 40200024
NAME : 'Mrs. Smith'
SEX : FEMALE
MS : MARRIED
NUMKIDS : 3
END
The above examples show complete formatted record structures. Note that for variants
with stored tags, the variants formatted are determined by the actual tag values.
When only a small portion of a large data structure needs to be examined, a path
specification may be used to specify an item of interest, either simple or composite:
$nmdebug > fv addr1 "StudentRecord.Name"
'Bill'