f78
Examining the Symbol Table
Occasionally, you may need to refer to symbols that contain unusual
characters, which GDB ordinarily treats as word delimiters. The most frequent case is in
referring to static variables in other source files (see
Note:
This command differs from
Some systems allow individual object files that make up your program to be
replaced without stopping and restarting your program. For example, in VxWorks you
can simply recompile a defective object file and keep on running. If you are
running on one of these systems, you can allow GDB to reload the symbols for the
following automatically relinked modules:
If you use ‘
You can use the command,
Finally, ‘
Describe where the data for symbol is stored. For a register variable, this says which register it is kept in.
For a non-register local variable, this prints the stack-frame offset at which
the variable is always stored.
The contrast with ‘
Print the data type of expression exp. exp is not actually evaluated, and any side-effecting operations (such as
assignments or function calls) inside it do not take place. See Expressions.
Print the data type of $, the last value in the value history.
Print a description of data type typename. typename may be the name of a type, or for C code it may have the form ‘class class-name’, ‘struct struct-tag’, ‘union union-tag’ or ‘enum enum-tag’.
Print a description of the type of expression exp. ptype differs from whatis by printing a detailed description, instead of just the name of the type. For
instance, consider the following variable declaration example.
type = struct complex
(gdb) ptype v
type = struct complex {
double real;
double imag;
}
Print a brief description of all types whose name matches regexp (or all types in your program, if you supply no argument). Each complete
typename is matched as though it were a complete
ffb
line; thus, ‘i type value’ gives information on all types in your program whose name includes the
string value, but ‘i type ˆvalue$’ gives information only on types whose complete name is value.
Show the name of the current source file—that is, the source file for the
function containing the current point of execution—and the language it was written
in.
Print the names of all source files in your program for which there is
debugging information, organized into two lists: files whose symbols have already been
read, and files whose symbols will be read when needed.
Print the names and data types of all defined functions.
Print the names and data types of all defined functions whose names contain a
match for regular expression, regexp. Thus, ‘info fun step’ finds all functions whose names include step; ‘info fun ˆstep’ finds those whose names start with step.
Print the names and data types of all variables that are declared outside of
functions (i.e., excluding local variables).
Print the names and data types of all variables (except for local variables)
whose names contain a match for regular expression regexp.
Replace symbol definitions for the corresponding source file when an object
file with a particular name is seen again.
Do not replace symbol definitions when re-encountering object files of the
same name. This is the default state; if you
cac
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 the current on or off setting.
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.