System Debug Reference Manual (32650-90888)

462 Chapter10
System Debug Standard Functions
func symaddr
bits, 8 means bytes, 32 means words. The default is bytes.
Symbolic offsets are rounded down to the nearest whole unit.
Examples
$nmdebug > symopen gradtyp.demo
Opens the symbolic data type file gradtyp.demo. It is assumed that the Debug variable
addr
contains the address of a StudentRecord data structure in virtual memory. The
following code fragment is from this file:
CONST MINGRADES = 1; MAXGRADES = 10;
MINSTUDENTS = 1; MAXSTUDENTS = 5;
TYPE
GradeRange = MINGRADES .. MAXGRADES;
GradesArray = ARRAY [ GradeRange ] OF integer;
Class = ( SENIOR, JUNIOR, SOPHOMORE, FRESHMAN );
NameStr = string[8];
StudentRecord = RECORD
Name : NameStr;
Id : Integer;
Year : Class;
NumGrades : GradeRange;
Grades : GradesArray;
END;
$nmdebug > wl SYMADDR("StudentRecord.Name")
$0
Print the byte offset of the name field for StudentRecord. Since it is the first item in the
record, its offset is zero.
$nmdebug > wl SYMADDR("StudentRecord.NumGrades" 1)
$a8
Print the bit offset of the NumGrades field for StudentRecord.
$nmdebug > wl SYMADDR("StudentRecord.Grades[4]" #32)
$9
Print the word offset of the fourth element of the grades field for StudentRecord.
Limitations, Restrictions
none