From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5228A39484BD; Mon, 19 Jul 2021 14:17:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5228A39484BD From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/101473] debug_line info depends on toolchain path Date: Mon, 19 Jul 2021 14:17:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2021 14:17:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101473 --- Comment #10 from Richard Biener --- (In reply to Richard Biener from comment #9) > (In reply to Richard Biener from comment #8) > > (In reply to tonyb from comment #6) > > > The only thing I know is that roughly similar issues were handled wit= h the > > > -fdebug-prefix-map=3Dold=3Dnew switch, but I am not the expert. > >=20 > > Yes, that works to strip the install location as well. So not a bug? >=20 > But then -fdebug-prefix-map is applied after computing the CU checksum > and thus after producing the symbol that shows the difference with -flto. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 82783c4968b..07ea7c5af0c 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -7064,7 +7064,7 @@ attr_checksum (dw_attr_node *at, struct md5_ctx *ctx,= int *mark) case dw_val_class_file: case dw_val_class_file_implicit: - CHECKSUM_STRING (AT_file (at)->filename); + CHECKSUM_STRING (remap_debug_filename (AT_file (at)->filename)); break; case dw_val_class_data8: might fix it (I wonder if we shouldn't simply remap once when we generate the locations rather than in dozen places...).=