System Debug Reference Manual (32650-90888)
26 Chapter2
User Interface
Data Types
Native Mode Pointers
An LPTR in NM is usually a
sid.offset
virtual address. As such, NM LPTRs are
unambiguous, even without some context of use. However, it is still useful to tag NM long
pointers to code by using a type that expresses the code's logical origin. Thus, the following
logical code pointer types are available for NM code addresses:
PROG Program file long pointer.
GRP Group library file long pointer.
PUB Public library file long pointer.
SYS System library file long pointer.
USER User library file long pointer.
TRANS Translated CM code long pointer.
Individual space IDs (SIDs) are assigned to each loaded NM program or library file by the
NM loader. These numbers should be expected to be different each time the files are
loaded. The LOADINFO command displays the relationships between loaded NM code files
and their assigned SIDs.
Note the following differences between CM and NM logical code pointers. First, the CM
types LGRP and LPUB do not exist for NM code, since addresses of this type are generated
only by the CM LOADPROC intrinsic. Next, the types USER and TRANS are specific to NM.
USER is a long pointer to a location in a user library file which was loaded by the XL= option
of the RUN command. Since more than one such user library may be loaded, the type USER
also includes the name of the user library file with which the long pointer is associated.
Finally, the type TRANS is used to refer to a location in NM code which was translated from
CM. Although the original CM code came from either a CM program file or one of the
group, PUB or SYS SL files, the type TRANS gives no information about which one. A
conversion function, NMTOCMNODE, can be used to convert NM TRANS addresses to CM
logical code pointers, which reveal the originating CM code locations. Refer to appendix C
for a discussion of CM object code translation node points and breakpoints in translated
CM code. Finally, the types CST and CSTX do not apply to NM code. The analogous NM type
is simply an NM LPTR.
Extended Address Types
The
extended addres
(EADDR) type is available for cases where the 32-bit offset part of a
long pointer isn't large enough. An EADDR is a dotted pair, where the offset part to the right
of the dot is 64 bits wide. An EADDR is effectively equivalent to an LPTR when it's offset part
is representable in 32 bits. The
secondary address
(SADDR) type is a special form of
EADDR, where the dotted pair is interpreted as a disk LDEV and disk byte offset. This is
currently the only instance where an extended address is necessary.
Type Classes
All of the elementary data types introduced above are organized into type classes. These
classes are particularly useful when defining parameters to functions and macros. By
declaring a parameter to be of a particular type class, all actual values passed are
automatically checked to be a member of the class.