diff options
author | Petr Tesarik <ptesarik@suse.cz> | 2018-06-28 08:33:17 +0200 |
---|---|---|
committer | Petr Tesarik <ptesarik@suse.cz> | 2018-06-28 08:35:34 +0200 |
commit | 291f9a9643f87fa4eb6a7c280eaa3877c11e3a1f (patch) | |
tree | 4318a3a5a93f7f82ada7a658b214783a334098fe /gdb/doc | |
parent | d81a3eaff36b41ed67758a119a6864b50f60a60d (diff) | |
download | gdb-291f9a9643f87fa4eb6a7c280eaa3877c11e3a1f.zip gdb-291f9a9643f87fa4eb6a7c280eaa3877c11e3a1f.tar.gz gdb-291f9a9643f87fa4eb6a7c280eaa3877c11e3a1f.tar.bz2 |
Add an optional offset option to the "add-symbol-file" command
If all sections of a symbol file are loaded with a fixed offset, it
is easier to specify that offset than listing all sections
explicitly. There is also a similar option for "symbol-file".
gdb/ChangeLog:
2018-06-28 Petr Tesarik <ptesarik@suse.cz>
* symfile.c (add_symbol_file_command, _initialize_symfile): Add
option "-o" to add-symbol-file-load to add an offset to each
section's load address.
* symfile.c (set_objfile_default_section_offset): New function.
gdb/doc/ChangeLog:
2018-06-28 Petr Tesarik <ptesarik@suse.cz>
* gdb.texinfo (Files): Document "add-symbol-file -o offset".
gdb/testsuite/ChangeLog:
2018-06-28 Petr Tesarik <ptesarik@suse.cz>
* gdb.base/relocate.exp: Add test for "add-symbol-file -o ".
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 9fd3d3c..6954398 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,9 @@ 2018-06-28 Petr Tesarik <ptesarik@suse.cz> + * gdb.texinfo (Files): Document "add-symbol-file -o offset". + +2018-06-28 Petr Tesarik <ptesarik@suse.cz> + * gdb.texinfo (Files): The address argument for "add-symbol-file" is no longer mandatory. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 64c511d..7fb6ac5 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -18918,7 +18918,7 @@ the program is running. To do this, use the @code{kill} command @kindex add-symbol-file @cindex dynamic linking -@item add-symbol-file @var{filename} @r{[} -readnow @r{|} -readnever @r{]} @r{[} @var{textaddress} @r{]} @r{[} -s @var{section} @var{address} @dots{} @r{]} +@item add-symbol-file @var{filename} @r{[} -readnow @r{|} -readnever @r{]} @r{[} -o @var{offset} @r{]} @r{[} @var{textaddress} @r{]} @r{[} -s @var{section} @var{address} @dots{} @r{]} The @code{add-symbol-file} command reads additional symbol table information from the file @var{filename}. You would use this command when @var{filename} has been dynamically loaded (by some other means) @@ -18930,6 +18930,10 @@ If a section is omitted, @value{GDBN} will use its default addresses as found in @var{filename}. Any @var{address} or @var{textaddress} can be given as an expression. +If an optional @var{offset} is specified, it is added to the start +address of each section, except those for which the address was +specified explicitly. + The symbol table of the file @var{filename} is added to the symbol table originally read with the @code{symbol-file} command. You can use the @code{add-symbol-file} command any number of times; the new symbol data |