Introduce partial_symbol::address
authorTom Tromey <tom@tromey.com>
Thu, 3 May 2018 22:36:18 +0000 (16:36 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 26 Jul 2018 15:18:30 +0000 (09:18 -0600)
commit02e9e7f7e2bed3b82cb6541f566caf07256b9b2f
treee3d593639dbffe803aab7e2fb141a14e20bb80b8
parent8a6d4234503bfe1c656d8cd335cac828507df9a3
Introduce partial_symbol::address

This introduces a partial_symbol::address method.  This method takes
an objfile argument.  This is necessary so that we can later relocate
a partial symbol at its point of use.  It also adds an accessor to
compute the unrelocated value; and a method to be used for setting the
field.

Note that the new method doesn't actually perform any relocation yet.
That will come in a subsequent patch.  However, the comments are
written to reflect the intended, rather than the temporary, semantics.

gdb/ChangeLog
2018-07-26  Tom Tromey  <tromey@redhat.com>

* psympriv.h (struct partial_symbol) <unrelocated_address,
address, set_address>: New methods.
* psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
(fixup_psymbol_section, relocate_psymtabs): Update.
(print_partial_symbols): Add 'objfile' parameter.  Update.
(dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
Update.
gdb/ChangeLog
gdb/psympriv.h
gdb/psymtab.c