From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BDCB2398CC09; Tue, 20 Jul 2021 10:50:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDCB2398CC09 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/101473] debug_line info depends on toolchain path Date: Tue, 20 Jul 2021 10:50:18 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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: Tue, 20 Jul 2021 10:50:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101473 --- Comment #15 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:7cc2df084b7977653a9b59cbc34a9ad500ae619c commit r12-2412-g7cc2df084b7977653a9b59cbc34a9ad500ae619c Author: Richard Biener Date: Tue Jul 20 11:00:33 2021 +0200 debug/101473 - apply debug prefix maps before checksumming DIEs The following makes sure to apply the debug prefix maps to filenames before checksumming DIEs to create the global symbol for the CU DIE used by LTO to link the late debug to the early debug. This avoids binary differences (in said symbol) when compiling with toolchains installed under a different path and that compensated with appropriate -fdebug-prefix-map options. The easiest and most scalable way is to record both the unmapped and the remapped filename in the dwarf_file_data so the remapping process takes place at a single point and only once (otherwise it creates GC garbage at each point doing that). 2021-07-20 Richard Biener PR debug/101473 * dwarf2out.h (dwarf_file_data): Add key member. * dwarf2out.c (dwarf_file_hasher::equal): Compare key. (dwarf_file_hasher::hash): Hash key. (lookup_filename): Remap the filename and store it in the filename member of dwarf_file_data when creating a new dwarf_file_data. (file_name_acquire): Do not remap the filename again. (maybe_emit_file): Likewise.=