[Bug gdb/34330] GDB does not resolve GNU ifunc in inferior
"cvs-commit at gcc dot gnu.org via Gdb-prs" <[email protected]>
| Newsgroups | gmane.comp.gdb.bugs.discuss |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=34330 --- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Yury Khrustalev <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=de930032d883219559d1dba575f2c0f5359e80fc commit de930032d883219559d1dba575f2c0f5359e80fc Author: Muhammad Kamran <[email protected]> Date: Tue Aug 11 13:12:18 2026 +0000 gdb: Preserve IFUNC marker when finding inferior functions GDB calls find_function_in_inferior ("malloc") when expression evaluation needs to allocate memory in the inferior, e.g. for string literal arguments. The minimal-symbol fallback created a synthetic ordinary function pointer from msymbol.value_address (). If the symbol was a GNU IFUNC, this discarded the IFUNC marker, so call_function_by_hand did not resolve the symbol before calling it. Check the minimal symbol kind directly and propagate the GNU IFUNC marker to the synthetic function type for mst_text_gnu_ifunc and mst_data_gnu_ifunc symbols. This keeps the existing fallback address and return type while allowing inferior calls through IFUNC symbols to be resolved correctly. Extend gdb.base/gnu-ifunc.exp with an internal inferior-call test that uses an IFUNC malloc. The test runs through the existing IFUNC matrix for resolver attr, resolver debug info, and resolved-target debug info. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34330 Reviewed-By: Kevin Buettner <[email protected]> Approved-By: Andrew Burgess <[email protected]> -- You are receiving this mail because: You are on the CC list for the bug.