[PATCH v2 1/1] gdb: Preserve IFUNC marker when finding inferior functions
Florian Weimer
fweimer@redhat.com
Tue Jun 30 11:53:40 GMT 2026
* Wilco Dijkstra:
> Hi,
>
>> Perhaps we should add an alias to __libc_malloc (and other malloc
>> functions that GDB needs) for GDB, something like `__gdb_malloc`
>> that would become Glibc's ABI for GDB? This is not ideal of course
>> as GDB would need to look for this new symbol and than still fallback
>> to 'malloc' to support other non-Glibc runtimes.
>
> If the debugger just randomly changes malloc state, it's impossible to
> debug memory or pointer issues...
>
> So I don't believe it should use malloc or a different helper. String
> arguments can be placed on the stack just like any other arguments
> (within a reasonable limit - anything too large could simply be refused
> just like a call with 1M arguments).
I think for literals, most uses expect different life-times.
Does GDB ever free the copy of the literal?
Thanks,
Florian
More information about the Gdb-patches
mailing list