add-symbol-file filename address, add-symbol-file filename address [ -readnow ]

[-mapped ], add-symbol-file filename address data_address bss_address, add-symbol-file filename -section address

section

To do this, use the kill command (see “Killing the child process” (page 45)).

The add-symbol-file command reads additional symbol table information from the file filename. You would use this command when filename has been dynamically loaded (by some other means) 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 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 -ssectionaddress 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.

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.

128 GDB Files

Page 128
Image 128
HP gnu source-level debugger 5992-4701 manual Section