Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Peter Bergner via Gdb <gdb@sourceware.org>
To: "Billie Alsup (balsup)" <balsup@cisco.com>,
	Florian Weimer <fweimer@redhat.com>,
	Peter Bergner via Libc-help <libc-help@sourceware.org>
Cc: Michael Meissner <meissner@linux.ibm.com>,
	"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	"gdb@sourceware.org" <gdb@sourceware.org>,
	Surya Kumari Jangala <jskumari@linux.ibm.com>,
	Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	Florian Weimer <fweimer@redhat.com>,
	Carl Love <cel@linux.ibm.com>
Subject: Re: [EXT] Re: gdb does not stop at printf for ppc
Date: Thu, 2 Oct 2025 14:09:01 -0500	[thread overview]
Message-ID: <d17cc55f-af88-4320-a892-58dffe4c1152@tenstorrent.com> (raw)
In-Reply-To: <BY5PR11MB4244E0E99DDA5C13CAD028AED9E7A@BY5PR11MB4244.namprd11.prod.outlook.com>

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


  reply	other threads:[~2025-10-02 19:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f4e905f7-48cb-439a-a8e6-a50242c18e6a@linux.ibm.com>
2025-10-01  4:03 ` Peter Bergner via Gdb
2025-10-01 17:20   ` Adhemerval Zanella Netto via Gdb
2025-10-02 15:57     ` [EXT] " Peter Bergner via Gdb
2025-10-02 16:19       ` Carl Love via Gdb
2025-10-02 16:58       ` Florian Weimer via Gdb
2025-10-02 18:12         ` Peter Bergner via Gdb
2025-10-02 18:49           ` Billie Alsup (balsup) via Gdb
2025-10-02 19:09             ` Peter Bergner via Gdb [this message]
2025-10-03 19:43     ` Tom Tromey
2025-10-07 17:21       ` Adhemerval Zanella Netto via Gdb
2025-10-15 14:33         ` [EXT] " Peter Bergner via Gdb
2025-10-15 17:09           ` Sachin Monga via Gdb
2025-11-05  6:00             ` Sachin Monga via Gdb
2025-11-06  4:13               ` Peter Bergner via Gdb

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=d17cc55f-af88-4320-a892-58dffe4c1152@tenstorrent.com \
    --to=gdb@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=balsup@cisco.com \
    --cc=bergner@tenstorrent.com \
    --cc=cel@linux.ibm.com \
    --cc=fweimer@redhat.com \
    --cc=jskumari@linux.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-help@sourceware.org \
    --cc=meissner@linux.ibm.com \
    --cc=segher@kernel.crashing.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