System Debug Reference Manual (32650-90888)
Chapter 7 299
Symbolic Formatting Symbolic Access
Creating and Accessing Symbol Definitions
Creating and Accessing Symbol Definitions
Before data structures can be accessed symbolically, their definitions must be made known
to System Debug. This subsection describes how the symbolic definitions are generated
and how they are subsequently made known to System Debug. The final result is a
program file containing symbolic type information. Such files are referred to as symbolic
data type files or simply symbolic files.
Generate Symbolic Type Information
The generation of symbolic data type definitions begins at compile time through the use of
the $SYMDEBUG 'xdb'$ option in the Pascal compiler. This option causes symbolic debug
records to be emitted into the relocatable object modules contained in the relocatable
library produced by the compiler. These symbolic debug records fall into two basic
categories: those that define the code being generated and those that define the data type
shapes and sizes. System Debug at present uses only the data type definitions.
System Debug does not require that the complete program be compiled with the
$SYMDEBUG$ option; instead, only the types and constants need be compiled. However, even
though only types and constants are compiled, the outer block
MUST
have at least one
statement (for example, x := 1) in order to generate any debug information, and the types
and constants must be declared at the level of the outer block. Also, note that symbolic
information is currently not emitted when code optimization is performed. The following
example shows a compilation of just a program's types for the purpose of obtaining, in
object file form, the symbolic information required to use the symbolic formatter.
$SYMDEBUG 'xdb'$
PROGRAM gradtyp;
$include 'tgrades.demo.telesup'; { Include all types/constants }
VAR x : integer;
BEGIN { Outer block must have a stmt }
x := 1;
END.
:COMMENT *** The above program is in the file OGRADTYP.DEMO.TELESUP
:
:PASXL OGRADTYP,YGRADTYP,$NULL
:
:COMMENT *** The above command generates the file "YGRADTYP"
Convert The Relocatable Library into a Program File
The relocatable object module(s) generated by the compiler must now be converted into an
executable object module (a program file). This step is performed by using the LINKEDIT
program.
:LINKEDIT.PUB.SYS