[PATCH 1/3] gdb: add support for DW_AT_trampoline in DWARF reader
Tom Tromey
tom@tromey.com
Fri Jul 15 20:05:13 GMT 2022
>>>>> Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org> writes:
> DW_AT_trampoline can be used to describe compiler generated functions
> that serve some intermediary purpose on making a call to another
> function. A compiler can emit this tag in order to help a debugger hide
> the trampolines from a user.
Thank you for the patch.
> + const char* target_name = dwarf2_name (target_die, target_cu);
"*" comes after the space.
> + {
> + CORE_ADDR target_addr = attr->as_address ();
> + target_addr = gdbarch_adjust_dwarf2_addr (objfile->arch (),
> + target_addr + baseaddr);
> + TYPE_TRAMPOLINE_TARGET (ftype)->set_target_physaddr (target_addr);
If a data structure holds an address that already has the section offset
applied, then objfile_relocate1 must be updated to relocate the value.
However, if you can possibly avoid adding the section offset, in favor
of handling this when the address is used, then that is better IMO.
thanks,
Tom
More information about the Gdb-patches
mailing list