HP 3000 Manuals

func symval [ System Debug Reference Manual ] MPE/iX 5.0 Documentation


System Debug Reference Manual

func symval 

Returns the value of a simple data type specified by a virtual address
and a path.

Syntax 

     symval (virtaddr path)

Formal Declaration 

     symval:any (virtaddr:ptr path:str)

Parameters 

 virtaddr        The virtual address of the data structure.

                 Virtaddr can be a short pointer, a long pointer, or a
                 full logical code pointer.

 path            A path specification, as described in chapter 5,
                 "Symbolic Formatting/Symbolic Access."

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 symval(addr "StudentRecord.Name") 
     Bill

     $nmdebug > wl symval(addr, "StudentRecord.Year") 
     SENIOR

     $nmdebug > IF symval(addr "StudentRecord.Year") = "SENIOR" THEN wl "GRAD!" 
     GRAD!

Refer to the section "Using the Symbolic Formatter" in chapter 5 for more
examples including pointers, arrays, and variant/invariant record
structures.

Limitations, Restrictions 

The path specification used by the SYMVAL function must evaluate to a
simple type or a string.  In particular, SYMVAL does not return an array,
a record, or a set data structure.



MPE/iX 5.0 Documentation