Loads the symbol records of a module in the current image into
the run-time symbol table (RST) of that image.
NOTES
The current image is either the main image (by default) or
the image established as the current image by a previous SET
IMAGE command.
By default, the debugger automatically loads symbols in a
module as needed. As such, this behavior makes the use of an
explicit SET MODULE command optional. For more information,
see SET MODE DYNAMIC.
Format
SET MODULE [module-name[, . . . ]]
1 – Parameters
module-name
Specifies a module of the current image whose symbol records
are loaded into the RST. Do not use the asterisk (*) wildcard
character. Instead, use the /ALL qualifier. Do not specify a
module name with /ALL or /CALLS.
2 – Qualifiers
2.1 /ALL
Specifies that the symbol records of all modules in the current
image be loaded into the RST.
2.2 /CALLS
Sets all the modules that currently have routines on the call
stack. If a module is already set, /CALLS has no effect on that
module.
2.3 /RELATED
/RELATED (default)
/NORELATED
(Applies to Ada programs.) Controls whether the debugger loads
into the RST the symbol records of a module that is related to a
specified module through a with-clause or subunit relationship.
Once loaded, you can reference names declared in related modules
within debugger commands exactly as you reference them within the
Ada source code.
3 – Description
The SET MODULE command loads the symbol records of a module in
the current image into the run-time symbol table (RST) of that
image. Symbol records must be present in the RST if the debugger
is to recognize and properly interpret the symbols declared in
your program. The process by which the symbol records of a module
are loaded into the RST is called setting a module. This command
also supports user-provided mixed-case and lowercase module names
on Integrity and Alpha servers.
At debugger startup, the debugger sets the module containing
the transfer address (the main program). By default, dynamic
mode is enabled (SET MODE DYNAMIC). Therefore, the debugger sets
modules (and images) automatically as the program executes so
that you can reference symbols as you need them. Specifically,
whenever execution is suspended, the debugger sets the module
and image containing the routine in which execution is suspended.
In the case of Ada programs, as a module is set dynamically, its
related modules are also set automatically, by default, to make
the appropriate symbols accessible (visible).
Dynamic mode makes accessible most of the symbols you might need
to reference. If you need to reference a symbol in a module that
is not already set, proceed as follows:
o If the module is in the current image, use the SET MODULE
command to set the module where the symbol is defined or
reference the symbol with a fully-qualified path name. For
example:
DBG>SET BREAK X\Y
o If the module is in another image, use the SET IMAGE command
to make that image the current image, then use the SET MODULE
command to set the module where the symbol is defined.
If dynamic mode is disabled (SET MODE NODYNAMIC), only the module
containing the transfer address is set automatically. You must
set any other modules explicitly.
If you use the SET IMAGE command to establish a new current
image, all modules previously set remain set. However, only the
symbols in the set modules of the current image are accessible.
Symbols in the set modules of other images are temporarily
inaccessible.
When dynamic mode is enabled, memory is allocated automatically
to accommodate the increasing size of the RST. If dynamic mode
is disabled, the debugger automatically allocates more memory as
needed when you set a module or an image.
If a parameter in a SET SCOPE command designates a program
location in a module that is not already set, the SET SCOPE
command sets that module.
For information specific to Ada programs, type Help
Language_Support Ada.
Related commands:
(SET,SHOW,CANCEL) IMAGE
SET MODE [NO]DYNAMIC
(SHOW) MODULE
4 – Examples
1.DBG> SET MODULE SUB1
This command sets module SUB1 (loads the symbol records of
module SUB1 into the RST).
2.DBG> SET IMAGE SHARE3
DBG> SET MODULE MATH
DBG> SET BREAK %LINE 31
In this example, the SET IMAGE command makes shareable image
SHARE3 the current image. The SET MODULE command sets module
MATH in image SHARE3. The SET BREAK command sets a breakpoint
on line 31 of module MATH.
3.DBG> SHOW MODULE/SHARE
module name symbols language size
FOO yes MACRO 432
MAIN no FORTRAN 280
. . .
SHARE$DEBUG no Image 0
SHARE$LIBRTL no Image 0
SHARE$MTHRTL no Image 0
SHARE$SHARE1 no Image 0
SHARE$SHARE2 no Image 0
total modules: 17. bytes allocated: 162280.
DBG> SET MODULE SHARE$SHARE2
DBG> SHOW SYMBOL * IN SHARE$SHARE2
In this example, the SHOW MODULE/SHARE command identifies all
modules in the current image and all shareable images (the
names of the shareable images are prefixed with SHARE$).
The SET MODULE SHARE$SHARE2 command sets the shareable image
module SHARE$SHARE2. The SHOW SYMBOL command identifies any
universal symbols defined in the shareable image SHARE2. For
more information, see the SHOW MODULE/SHARE command.
4.DBG> SET BREAK X/Y:
In this example, the debugger automatically loads the module
information when you specify the module name in the command.
Debugger ensures that the module information for module X is
loaded, and then locates the information for the routine named
Y.