From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PWvOKpbPcmiLGDMAWB0awg (envelope-from ) for ; Sat, 12 Jul 2025 17:11:50 -0400 Received: by simark.ca (Postfix, from userid 112) id 97D421E11C; Sat, 12 Jul 2025 17:11:50 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 722AB1E089 for ; Sat, 12 Jul 2025 17:11:48 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E85843858D3C for ; Sat, 12 Jul 2025 21:11:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E85843858D3C Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id DAC1B3858D3C for ; Sat, 12 Jul 2025 21:11:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DAC1B3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DAC1B3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752354669; cv=none; b=UapcqfcHZpD/slcny5VeyEJ3mF3yGQgyoh72TVkkjFYQcwp5RP+AV73zA7/Gkz8LvhY/AMnR57uQmv1iDctfVXaMIRidZb5yqEvMRQi5L0mlA6n7if4YoScjsqJB7gcBb8hKvmFq5TSpFS6LMdTmtLdfFNyiDaK2eK4JgNkF6p8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752354669; c=relaxed/simple; bh=EV47qv63yfanYQ+yoJ226p0KwLhYm2SjGHGor2/u/j8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Cem2mND6ZxoND/zO02wM1k2L4eB5hiqpK99fcM8bMlEQO38Tv/6VCRNqaU/BOlE8hP9EWCJ6C1AM6RcL5ZeBeKTn2qcO0QKY2ZElDwNnSM4hq/SJ29y7FjmLs20UoPK2T/UpG2nfF+Mm29CMDR/ehkVumktgtCx74SR7+tXStLA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAC1B3858D3C Received: from mop.sam.mop (unknown [82.8.138.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sam) by smtp.gentoo.org (Postfix) with ESMTPSA id 80537341F1C; Sat, 12 Jul 2025 21:11:07 +0000 (UTC) From: Sam James To: Andrew Burgess Cc: Tom de Vries , gdb-patches@sourceware.org Subject: Re: [PATCH] [gdb/build] Work around GCC ipa-modref bug In-Reply-To: <87h5zhmbyy.fsf@redhat.com> Organization: Gentoo References: <20250712131649.8372-1-tdevries@suse.de> <87h5zhmbyy.fsf@redhat.com> User-Agent: mu4e 1.12.11; emacs 31.0.50 Date: Sat, 12 Jul 2025 22:11:05 +0100 Message-ID: <877c0dp11y.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Andrew Burgess writes: > Tom de Vries writes: > >> PR mi/32571 reports the following problem: >> ... >> $ gdb -q -batch -ex "b bla.c:100" >> >> 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