diff options
author | Petr Tesarik <ptesarik@suse.cz> | 2018-06-28 08:01:33 +0200 |
---|---|---|
committer | Petr Tesarik <ptesarik@suse.cz> | 2018-06-28 08:35:34 +0200 |
commit | d4d429d589c4d6a4450146fbcac8e1aad445114d (patch) | |
tree | 75f65c981a930edc97266228e44556fb723c7a83 /gdb/doc | |
parent | 39b27ab6ae77d4fe1735417f2de90eada658dc6b (diff) | |
download | gdb-d4d429d589c4d6a4450146fbcac8e1aad445114d.zip gdb-d4d429d589c4d6a4450146fbcac8e1aad445114d.tar.gz gdb-d4d429d589c4d6a4450146fbcac8e1aad445114d.tar.bz2 |
Add an optional offset option to the "symbol-file" command
If the main file is relocated at runtime, all symbols are offset by
a fixed amount. Let the user specify this offset when loading a
symbol file.
gdb/ChangeLog:
2018-06-28 Petr Tesarik <ptesarik@suse.cz>
* symfile.c (symbol_file_command, symbol_file_add_main_1)
(_initialize_symfile): Add option "-o" to symbol-file to add an
offset to each section of the symbol file.
gdb/doc/ChangeLog:
2018-06-28 Petr Tesarik <ptesarik@suse.cz>
* gdb.texinfo (Files): Document "symbol-file -o offset".
gdb/testsuite/ChangeLog:
2018-06-28 Petr Tesarik <ptesarik@suse.cz>
* gdb.base/relocate.exp: Add test for "symbol-file -o ".
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index ade1799..f312873 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2018-06-28 Petr Tesarik <ptesarik@suse.cz> + + * gdb.texinfo (Files): Document "symbol-file -o offset". + 2018-06-14 Tom de Vries <tdevries@suse.de> * gdb.texinfo (Background Execution): Add @cindex for '&'. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index a6bad13..3282562 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -18823,11 +18823,16 @@ if necessary to locate your program. Omitting @var{filename} means to discard information on the executable file. @kindex symbol-file -@item symbol-file @r{[} @var{filename} @r{]} +@item symbol-file @r{[} @var{filename} @r{[} -o @var{offset} @r{]]} Read symbol table information from file @var{filename}. @code{PATH} is searched when necessary. Use the @code{file} command to get both symbol table and program to run from the same file. +If an optional @var{offset} is specified, it is added to the start +address of each section in the symbol file. This is useful if the +program is relocated at runtime, such as the Linux kernel with kASLR +enabled. + @code{symbol-file} with no argument clears out @value{GDBN} information on your program's symbol table. |