[EXT] Re: gdb does not stop at printf for ppc
Peter Bergner
bergner@tenstorrent.com
Thu Oct 2 19:09:01 GMT 2025
On 10/2/25 1:49 PM, Billie Alsup (balsup) wrote:
> I have a similar problem with other functions. I discovered that the
> linker --wrap option no longer wraps what I was expecting. For example,
> wrapping strtoul stopped working with a new glibc, as what was really
> being invoked was _isoc23_strtoul (and apparently the linker never sees
> the symbol strtoul). I think it is related to the use of asm in the
> REDIRECT macros for such functions, which I'm guessing is similar to
> how printf is being redirected in this thread.
Similar issues, but seem to have different causes. In your case, it
looks like glibc is doing the redirection. Maybe the REDIRECT macro
could use Adhemerval's suggestion?
Have you bisected where the behavior you're seeing changed?
In the printf case, glibc simultaneously supports both IBM128 and IEEE128
floating point formats and has separate printf functions for each format,
"printf" for IBM128 and "__printfieee128" for IEEE128. It is up to the
compiler to map any calls to printf() to the correct glibc printf function,
so it's the compiler, rather than glibc, that is doing the redirection.
It could be we solve the two problems using the same technique though.
Peter
More information about the Libc-alpha
mailing list