Appendix B. How does Debug Tool locate source, listing, or separate debug files?
Debug Tool obtains information (called debug information) it needs
about a compilation unit (CU) by searching through the following sources:
- In some cases, the debug information is found
in the load module. With this information, Debug Tool uses the information
in the source or listing file to display source code on the screen.
- For C and C++ CUs compiled with the FORMAT(DWARF) suboption
of the DEBUG compiler option, Debug Tool uses debug information
stored in the .dbg file.
- For COBOL and PL/I CUs compiled with the SEPARATE suboption
of the TEST compiler option, Debug Tool uses the information
stored in a separate file (called a separate debug file) that contains both
the debug information and the information needed to display source
code on the screen.
- For assembler and non-Language Environment COBOL CUs, Debug Tool uses
the information stored in a separate file (called an EQALANGX file)
that contains both the debug information and the information needed
to display source code on the screen.
In all of these cases, there is a default data set name associated
with each CU. This name is either the name of the data set where
the compiler processed the source, listing, or separate debug file or a name
constructed from the CU name. The way this default name is generated
differs depending on the source language and compiler used. See Appendix A. Data sets used by Debug Tool for a description of this default name and how it
is generated for each language and compiler.
The source or listing data, separate debug file data, or EQALANGX data
is obtained from one of the following sources:
- the default data set name
- the SET SOURCE command
- the SET DEFAULT LISTINGS command
- the EQADEBUG DD statement
For C and C++ programs compiled with the DEBUG(FORMAT(DWARF)) compiler
option, Debug Tool needs the following files:
- The source file. Debug Tool obtains the source file from one of the
following sources:
- the default data set name
- the SET SOURCE command
- the SET DEFAULT LISTINGS command
- The .dbg file. Debug Tool obtains the file from
one of the following sources:
- the default data set name
- the EQADEBUG DD statement
The order in which these are located is different for each type
of file. For the default data set name and the SET DEFAULT LISTINGS command,
the EQAUEDAT user exit might modify the data set name before the file
is opened. However, if a EQADEBUG DD statement is
present, the EQAUEDAT user exit is not run, except for the case of
a .dbg file.
How does Debug Tool locate source and listing files?
Debug Tool reads the source or listing file for a CU each time it needs
to display information about that CU. While you are debugging your
CU, the data set from which the file is read can change. Each time Debug Tool needs
to read a source or listing file, it searches for the data set in
the following order:
- SET SOURCE command
- SET DEFAULT LISTINGS command. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might
be modified by the EQAUEDAT user exit.
- if present, the EQADEBUG DD statement
- default data set name. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might
be modified by the EQAUEDAT user exit.
How does Debug Tool locate COBOL and PL/I separate debug file files?
Debug Tool might read from a COBOL or PL/I separate debug file more than once
but it always reads the separate debug file from the same data set. After Debug Tool locates
a valid separate debug file, you cannot direct Debug Tool to a different separate debug file.
When the CU first appears, Debug Tool looks for the separate debug file in the
following order:
- SET SOURCE command
- default data set name. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might
be modified by the EQAUEDAT user exit.
- SET DEFAULT LISTINGS command. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might
be modified by the EQAUEDAT user exit.
- if present, the EQADEBUG DD statement
The SET SOURCE command can be entered only after the
CU name appears as a CU and the separate debug file is not found in any of
the other locations. The SET DEFAULT LISTINGS command can
be entered at any time before the CU name appears as a CU or, if the separate debug file is
not found in any of the other possible locations, it can be entered
later.
How does Debug Tool locate EQALANGX files
An EQALANGX file, which contains debug information for an assembler
or non-Language Environment COBOL program, might be read more than once
but it is always read from the same data set. After Debug Tool locates
a valid EQALANGX file, you cannot direct Debug Tool to a different EQALANGX
file. After you enter the LOADDEBUGDATA (LDD)
command (which is run immediately or run when the specified CU becomes
known to Debug Tool), Debug Tool looks for the EQALANGX file in the following
order:
- SET SOURCE command
- a previously loaded EQALANGX file that contains a CSECT that matches
the name and length of the program
- default data set name. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might
be modified by the EQAUEDAT user exit.
- SET DEFAULT LISTINGS command. If the EQAUEDAT user exit is implemented
and a EQADEBUG DD statement is not specified, the data set name might
be modified by the EQAUEDAT user exit.
- the EQADEBUG DD statement
The SET SOURCE command can be entered during any of
the following situations:
- Any time after the CU name appears as a disassembly CU.
- If the CU is known when the LDD command is entered
but then Debug Tool does not find the EQALANGX file.
- If the CU is not known to Debug Tool when the LDD command
is entered and then Debug Tool runs the LDD after the CU becomes
known to Debug Tool.
The SET DEFAULT LISTINGS command can be entered any
time before you enter the LDD command or, if the EQALANGX
file is not found by the LDD command, after you enter the LDD command.
How does Debug Tool locate the C/C++ source file or
the .dbg file
To debug C and C++ programs compiled with the DEBUG(FORMAT(DWARF)) compiler
option, Debug Tool needs the source file and the .dbg file.
Debug Tool reads the source file for a CU each time it needs to display
information about that CU. While you are debugging your CU, the data
set from which the source file is read can change. Each time Debug Tool needs
to read the source file, it searches for the data set in the following
order:
- SET SOURCE command
- SET DEFAULT LISTINGS command. If the EQAUEDAT user exit is implemented, the
data set name might be modified by the EQAUEDAT user exit.
- default data set name. If the EQAUEDAT user exit is implemented, the
data set name might be modified by the EQAUEDAT user exit.
Debug Tool might read from the .dbg file more than
once but it always reads this file from the same data set. After Debug Tool locates
this file, you cannot direct Debug Tool to a different file. When
the CU first appears, Debug Tool looks for this file in the following
order:
- default data set name. If the EQAUEDAT user exit is implemented, the
data set name might be modified by the EQAUEDAT user exit.
- if present, the EQADEBUG DD statement
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)