Library /sys$common/syshlp/dbg$help.hlb DEBUG, New Features, EXAMINE/VARIANT Command *Conan The Librarian (sorry for the slow response - running on an old VAX) |
The EXAMINE command has a new /VARIANT qualifier that enables the debugger to display the correct item when it encounters an anonymous variant. In a C program, a union contains members, only one of which is valid at any one time. When displaying a union, the debugger does not know which member is currently valid. In a PASCAL program, a record with a variant part contains variants, only one of which is valid at any one time. When displaying a record with an anonymous variant part, the debugger does not know which variant is currently valid, and displays all variants by default. You can use the /VARIANT qualifier to select which member of a union (C program) or anonymous variant (PASCAL program) to display. The format is as follows: DBG> EXAMINE /VARIANT=var-selector address-exp DBG> EXAMINE /VARIANT=(var-selector,...) address-exp The variant selector var-selector specifies a name, a discriminant (PASCAL only), or a position; that is, one of the following: o NAME = name-string o DISCRIMINANT = expression o POSITION = expression For more information, see the EXAMINE topic.
|