132
Chapter 15. Examining the Symbol Table
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 auto-
matic relinking of 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.
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 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. Refer to Section 17.1
Commands to specify files
, for
a discussion of how gdb reads symbols (in the description of
symbol-file
).
maint info symtabs [
regexp
]
maint info psymtabs [
regexp
]
List the
struct symtab
or
struct partial_symtab
structures whose names match
regexp
. If
regexp
is not given, list them all. The output includes expressions which you
can copy into a gdb debugging this one to examine a particular structure in more detail. For
example:
(gdb) maint info psymtabs dwarf2read
{ objfile /home/gnu/build/gdb/gdb
((struct objfile *) 0x82e69d0)
{ psymtab /home/gnu/src/gdb/dwarf2read.c
((struct partial_symtab *) 0x8474b10)
readin no
fullname (null)
Summary of Contents for ENTERPRISE LINUX 3 - SECURITY GUIDE
Page 1: ...Red Hat Enterprise Linux 3 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......