Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
filename address
data_address bss_address,
into the program that is running. address should
be the memory address at which the file has been
loaded; GDB cannot figure this out for itself. You
add-symbol-file filename
-section address
can specify up to three addresses, in which case
they are taken to be the addresses of the text,
data, and bss segments respectively. For
complicated cases, you can specify an arbitrary
number of -ssection address pairs, to give an
explicit section name and base address for that
section. You can specify any address as an
expression.
The symbol table of the file filename is added to
the symbol table originally read with the
symbol-file command. You can use the
add-symbol-file command any number of times;
the new symbol data thus read keeps adding to
the old. To discard all old symbol data instead,
use the symbol-file command without any
arguments.
add-symbol-file does not repeat if you press RET
after using it.
You can use the `-mapped' and `-readnow' options
just as with the symbol- file command, to change
how GDB manages the symbol table information
for filename.
section The section command changes the base
address of section SECTION of the exec file to
ADDR. This can be used if the exec file does not
contain section addresses, (such as in the a.out
format), or when the addresses specified in the
file itself are wrong. Each section must be changed
separately. The info files command, described
below, lists all the sections and their addresses.
info files, info target info files and info target are
synonymous; both commands print the current
target (see Chapter 13 (page 126)), including the
names of the executable and core dump files
currently in use by GDB, and the files from which
symbols were loaded. Both the commands list all
possible targets rather than the current targets.
12.1 Commands to specify files 121