Add an optional offset option to the "add-symbol-file" command
authorPetr Tesarik <ptesarik@suse.cz>
Thu, 28 Jun 2018 06:33:17 +0000 (08:33 +0200)
committerPetr Tesarik <ptesarik@suse.cz>
Thu, 28 Jun 2018 06:35:34 +0000 (08:35 +0200)
commit291f9a9643f87fa4eb6a7c280eaa3877c11e3a1f
tree4318a3a5a93f7f82ada7a658b214783a334098fe
parentd81a3eaff36b41ed67758a119a6864b50f60a60d
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 ".
gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/symfile.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/relocate.exp