Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/1] gdb: Preserve IFUNC marker when finding inferior functions
@ 2026-06-24  9:50 Muhammad Kamran
  2026-06-24  9:50 ` [PATCH 1/1] " Muhammad Kamran
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Muhammad Kamran @ 2026-06-24  9:50 UTC (permalink / raw)
  To: gdb-patches
  Cc: Wilco Dijkstra, Yury Khrustalev, Thiago Jung Bauermann,
	Adhemerval Zanella Netto, Carlos O'Donell, Muhammad Kamran

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-16 21:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24  9:50 [PATCH 0/1] gdb: Preserve IFUNC marker when finding inferior functions Muhammad Kamran
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox