Debugging with GDB (September 2007)
Chapter 10: Examining the Symbol Table 95
set symbol-reloading on
Replace symbol definitions for the corres ponding source file when
an object file with a particular name is seen again.
set symbol-reloading off
Do not replace symbol definitions when encountering object files of
the same name more than once. This is the default state; if you
are not running on a system that permits automatic relinking of
modules, you should leave symbol-reloading off, since otherwise
GDB may discard s ymbols when linking large programs, that may
contain several modules (from different directories or libraries) with
the same name.
show symbol-reloading
Show the current on or off setting.
set opaque-type-resolution on
Tell GDB to resolve opaque types. An opaque type is a type declared as a
pointer to a struct, class, or union—for example, struct MyType *—that
is used in one source file although the full declaration of struct MyType is in
another source file. The default is on.
A change in the setting of this subcommand will not take effect until the next
time symbols for a file are loaded.
set opaque-type-resolution off
Tell GDB not to resolve opaque types. In this case, the type is printed as
follows:
{<no data fields>}
show opaque-type-resolution
Show whether opaque types are resolved or not.
maint print symbols filename
maint print psymbols filename
maint print msymbols filename
Write a dump of debugging symbol data into the file filename. These com-
mands are used to debug the GDB symbol-reading code. Only symbols with
debugging data are included. If you use ‘maint print symbols’, GDB includes
all the symbols for which it has already collected full details: that is, filename
reflects symbols for only those files whose symbols GDB has read. You can
use the command info sources to find out which files these are. If you use
‘maint print psymbols’ instead, the dump shows information about symbols
that GDB only knows partially—that is, symbols defined in files that GDB
has skimmed, but not yet read completely. Finally, ‘maint print msymbols’
dumps just the minimal symbol information required for each object file from
which GDB has read some symbols. See Section 12.1 [Commands to specify
files], page 103, for a discussion of how GDB reads symbols (in the description
of symbol-file).