]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Handle function descriptors in call_site_target
authorTom Tromey <tromey@adacore.com>
Fri, 3 Mar 2023 17:29:06 +0000 (10:29 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 21 Apr 2023 13:13:45 +0000 (07:13 -0600)
commit532d55c0ab4bda1d5da90c6301c7d28ddd98ad18
tree0d1accde94c6c7a390aceb3a604593444f6a5285
parent32c8e7265a55ab4cf14fa255115a81134c62fb16
Handle function descriptors in call_site_target

call_site_target::iterate_over_addresses may look up a minimal symbol.
On platforms like PPC64 that use function descriptors, this may find
an unexpected address.  The fix is to use gdbarch_convert_from_func_ptr_addr
to convert from a function descriptor to the address recorded at the
call site.

I've added a new test case that is based on the internal AdaCore test
that provoked this bug.  However, I'm unable to test it as-is on
PPC64.
gdb/dwarf2/loc.c
gdb/testsuite/gdb.ada/finish-large.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/finish-large/p.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/finish-large/pck.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/finish-large/pck.ads [new file with mode: 0644]