System Debug Reference Manual (32650-90888)

Chapter 7 303
Symbolic Formatting Symbolic Access
Using the Symbolic Formatter
The next two sections contain a variety of examples illustrating the use of path
specifications.
Using the Symbolic Formatter
This section gives several examples of how to use the symbolic formatting facility.
Formatting Types
Refer to the beginning of this chapter to review the type declarations used in this section.
After the source types are converted into a symbolic data type file, the file is SYMOPENed
and given a symbolic name of grades.
$nmdebug > SYMOPEN gradtyp.demo grades
The symbolic formatter is now able to display type information and format actual data
using this symbolic data type file:
$nmdebug > FT "grades:StudentRecord"
RECORD
NAME : NAMESTR ;
ID : INTEGER ;
YEAR : CLASS ;
NUMGRADES: GRADERANGE ;
GRADES : GRADESARRAY ;
END
Display the structure of StudentRecord. The
symname
part of the path specification is
optional. If none is given, the last accessed symbolic file is assumed.
$nmdebug > FT "studentrecord" MAP
RECORD
NAME : NAMESTR ; ( 0.0 @ 10.0 )
ID : INTEGER ; ( 10.0 @ 4.0 )
YEAR : CLASS ; ( 14.0 @ 1.0 )
NUMGRADES: GRADERANGE ; ( 15.0 @ 1.0 )
GRADES : GRADESARRAY ; ( 18.0 @ 28.0 )
END ;
RECORD Size: 40 bytes
The MAP option of the FT command causes a location map to be printed for components of
complex data structures such as records or arrays. The format of the location map is
similar to the one generated by the $MAPINFO ON$ option of the Pascal compiler.
$nmdebug > FT "studentrecord.grades"
ARRAY [ GRADERANGE ] OF INTEGER
$nmdebug > FT "graderange"
1 .. 10