From: Muhammad Kamran <muhammad.kamran@arm.com>
To: <gdb-patches@sourceware.org>
Cc: Wilco Dijkstra <Wilco.Dijkstra@arm.com>,
Yury Khrustalev <Yury.Khrustalev@arm.com>,
Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
Carlos O'Donell <carlos@redhat.com>,
Muhammad Kamran <muhammad.kamran@arm.com>
Subject: [PATCH 0/1] gdb: Preserve IFUNC marker when finding inferior functions
Date: Wed, 24 Jun 2026 09:50:01 +0000 [thread overview]
Message-ID: <20260624095002.5247-1-muhammad.kamran@arm.com> (raw)
This patch fixes a GDB inferior-call issue exposed by malloc being a GNU
IFUNC in glibc on AArch64.
GDB calls find_function_in_inferior ("malloc") when expression evaluation
needs to allocate memory in the inferior, for example for string literal
arguments. In the minimal-symbol fallback, GDB created a synthetic ordinary
function pointer from the minimal symbol address. If the symbol was a GNU
IFUNC, this lost the IFUNC marker, so call_function_by_hand did not
resolve the symbol before calling it.
The patch uses find_minsym_type_and_address to classify the minimal symbol
and propagates the IFUNC marker to the synthetic function type when needed.
The existing fallback return type is unchanged.
Should this be considered for backporting to release branches?
Muhammad Kamran (1):
gdb: Preserve IFUNC marker when finding inferior functions
gdb/valops.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--
2.43.0
next reply other threads:[~2026-06-24 9:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 9:50 Muhammad Kamran [this message]
2026-06-24 9:50 ` [PATCH 1/1] " Muhammad Kamran
2026-06-24 15:53 ` Andrew Burgess
2026-06-25 15:37 ` Muhammad Kamran
2026-06-24 12:18 ` [PATCH 0/1] " Carlos O'Donell
2026-06-24 12:56 ` Yury Khrustalev
2026-06-25 20:16 ` Simon Marchi
2026-06-25 23:08 ` Carlos O'Donell
2026-06-25 23:52 ` Simon Marchi
2026-07-16 21:00 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260624095002.5247-1-muhammad.kamran@arm.com \
--to=muhammad.kamran@arm.com \
--cc=Wilco.Dijkstra@arm.com \
--cc=Yury.Khrustalev@arm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox