Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Tom de Vries <tdevries@suse.de>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/build] Work around GCC ipa-modref bug
Date: Sat, 12 Jul 2025 22:11:05 +0100	[thread overview]
Message-ID: <877c0dp11y.fsf@gentoo.org> (raw)
In-Reply-To: <87h5zhmbyy.fsf@redhat.com>

Andrew Burgess <aburgess@redhat.com> writes:

> Tom de Vries <tdevries@suse.de> writes:
>
>> PR mi/32571 reports the following problem:
>> ...
>> $ gdb -q -batch -ex "b bla.c:100"
>> <random output>
>> Make breakpoint pending on future shared library load? (y or [n]) \
>>   [answered N; input not from terminal]
>> ...
>> while this is expected:
>> ...
>> $ gdb -q -batch -ex "b bla.c:100"
>> No symbol table is loaded.  Use the "file" command.
>> Make breakpoint pending on future shared library load? (y or [n]) \
>>   [answered N; input not from terminal]
>> ...
>>
>> A few factors in reproducing this are building gdb using gcc 14,
>> "-O2 -flto=auto" and --disable-nls.  For more details, see the PR.
>>
>> This turns out to be caused by a GCC PR [1], more specifically a problem in
>> ipa-modref.
>>
>> Work around this by disabling ipa-modref for GCC versions 12-15 and 16.0,
>> assuming the GCC 16.1 release will contain a fix.
>
> First, massive thanks for tracking this issue down.
>
>>
>> Tested on aarch64-linux and x86_64-linux.
>>
>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32571
>>
>> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120987
>> ---
>>  gdbsupport/common-defs.h | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h
>> index 07caf3bd7e4..bdf04d9ec09 100644
>> --- a/gdbsupport/common-defs.h
>> +++ b/gdbsupport/common-defs.h
>> @@ -27,6 +27,14 @@
>>  #pragma GCC optimize("-fno-hoist-adjacent-loads")
>>  #endif
>>  
>> +#if defined (__GNUC__) && !defined (__clang__) \
>> +  && ((__GNUC__ >= 12 && __GNUC__ <= 15)       \
>> +      || (__GNUC__ == 16 && __GNUC_MINOR__ < 1))
>> +/* Work around PR gcc/110799 starting gcc 12, and assume it will be fixed in
>> +   the gcc 16.1 release.  */
>
> Should that not be gcc/120987?

Ah, yeah.

> Also I notice the target milestone on
> that gcc bug is set to 13.5, maybe that field is used differently for
> gcc, but I was expecting to see 16.1 maybe?  I know there's limits on
> what we can do to ensure gcc fix this, but might as well get these
> fields as correct as possible :)

It's correct as it is in terms of the upstream bug milestone. The milestone is the
first supported version it affects. gdb doesn't have that issue as it
tends to not support multiple branches and doesn't always do point
releases for the branches.

> [...]

sam

  reply	other threads:[~2025-07-12 21:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-12 13:16 Tom de Vries
2025-07-12 15:16 ` Sam James
2025-07-12 19:43 ` Andrew Burgess
2025-07-12 21:11   ` Sam James [this message]
2025-07-14  9:36   ` Tom de Vries
2026-03-31 11:25 ` Tom de Vries

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=877c0dp11y.fsf@gentoo.org \
    --to=sam@gentoo.org \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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