Download Debugging with GDB - ESA Microelectronics Section

Transcript
Chapter 9: Examining the Symbol Table
73
set symbol-reloading on
Replace symbol definitions for the corresponding source file when
an object file with a particular name is seen again.
set symbol-reloading off
Do not replace symbol definitions when re-encountering object files
of the same name. This is the default state; if you are not running on a system that permits automatically relinking modules,
you should leave symbol-reloading off, since otherwise GDB may
discard symbols 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.
maint print symbols filename
maint print psymbols filename
maint print msymbols filename
Write a dump of debugging symbol data into the file filename. These commands 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 11.1 [Commands to specify
files], page 79, for a discussion of how GDB reads symbols (in the description
of symbol-file).