From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 65C7D385E00E; Tue, 2 Mar 2021 17:26:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65C7D385E00E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/99319] DW_MACRO_define_strp uses uleb128 for second operand Date: Tue, 02 Mar 2021 17:26:48 +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: 11.0 X-Bugzilla-Keywords: wrong-debug 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: jakub 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, 02 Mar 2021 17:26:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99319 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5a233ae4d8c978a3c863c8199d6c3050389a84d1 commit r11-7457-g5a233ae4d8c978a3c863c8199d6c3050389a84d1 Author: Jakub Jelinek Date: Tue Mar 2 18:25:45 2021 +0100 dwarf2out: Fix up split-dwarf .debug_macro handling [PR99319] The -gsplit-dwarf changes came a few months after .debug_macro and the r0-120109 changes just changed the 2nd operand of DW_MACRO_GNU_{define,undef}_indirect from the usual .debug_str section offset argument to leb128 index into .debug_str_offsets without changing the opcodes. DWARF5 standardized different opcodes for those, but GCC hasn't been changed yet for that. This patch starts using DW_MACRO_define_strx and DW_MACRO_undef_strx instead of DW_MACRO_define_strp and DW_MACRO_undef_strp when -gsplit-dw= arf -gdwarf-5 -g3. I'm not sure what to do if anything with the -gdwarf-4 -gsplit-dwarf -g3 -gno-strict-dwarf case, we've been emitting it that w= ay for 8 years and it is an extension, so presumably the consumers that ca= red have already hacks to handle DW_MACRO_GNU_{define,undef}_indirect differently in .debug_macro 4 sections depending on if it is .debug_macro.dwo or .debug_macro. Another change the patch does is that it will use DW_MACRO_{define,undef}_str{p,x} even with -gdwarf-5 -gstrict-dwarf -g3, for DWARF 4 we were doing that only for -gno-strict-dwarf as we've emit= ted .debug_macro section only in that case. 2021-03-02 Jakub Jelinek PR debug/99319 * dwarf2out.c (output_macinfo_op): Use DW_MACRO_*_str* even with -gdwarf-5 -gstrict-dwarf. For -gsplit-dwarf -gdwarf-5 use DW_MACRO_*_strx instead of DW_MACRO_*_strp. Handle DW_MACRO_define_strx and DW_MACRO_undef_strx. (save_macinfo_strings): Use DW_MACRO_*_str* even with -gdwarf-5 -gstrict-dwarf. Handle DW_MACRO_define_strx and DW_MACRO_undef_strx.=