From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 74AA23858D33; Wed, 12 Apr 2023 21:19:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74AA23858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681334355; bh=fwM1gZc47ywnKQmMsiZUUIOHKUMLnLawKIkmwlTvi90=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kb+338dEgx0000LrXv2FalCtCFdktp5T7lGPLTZzcyXDMaTOit5a56tT3/W2SDodo cvP+sTImzdW8ZGW/S/hygAt2Rfk8okm3RkqrY3dBxlMRsVsH7BxKTXbLvZ0T9XhRib D/IAnryT0Qlv3NHAY49Kn3j+qQL/ogHRme+/4yP0= From: "ibhagat at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/109161] Bad CTF generated for stub in function scope Date: Wed, 12 Apr 2023 21:19:14 +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: 13.0 X-Bugzilla-Keywords: wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: ibhagat at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibhagat 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109161 --- Comment #3 from Indu Bhagat --- Excerpt from the generated DWARF debug info: <1><32>: Abbrev Number: 3 (DW_TAG_subprogram) <33> DW_AT_external : 1 <33> DW_AT_name : (indirect string, offset: 0x12c4): set_cpu_a= rch ... <4c> DW_AT_sibling : <0x8e> <2><50>: Abbrev Number: 4 (DW_TAG_structure_type) <51> DW_AT_name : (indirect string, offset: 0x227c): arch_stack_entry ...=20 <59> DW_AT_sibling : <0x70> <3><5d>: Abbrev Number: 5 (DW_TAG_member) <5e> DW_AT_name : (indirect string, offset: 0x79a): prev ... <65> DW_AT_type : <0x8e> <69> DW_AT_data_member_location: 0 <3><6a>: Abbrev Number: 6 (DW_TAG_const_type) <6b> DW_AT_type : <0x50> <3><6f>: Abbrev Number: 0 <2><70>: Abbrev Number: 7 (DW_TAG_typedef) <71> DW_AT_name : (indirect string, offset: 0x227c): arch_stack_entry ... <78> DW_AT_type : <0x50> <2><7c>: Abbrev Number: 8 (DW_TAG_variable) <7d> DW_AT_name : (indirect string, offset: 0x9c5): arch_stack= _top ... <84> DW_AT_type : <0x88> <2><88>: Abbrev Number: 1 (DW_TAG_pointer_type) <89> DW_AT_byte_size : 8 <89> DW_AT_type : <0x70> <2><8d>: Abbrev Number: 0 <1><8e>: Abbrev Number: 1 (DW_TAG_pointer_type) <8f> DW_AT_byte_size : 8 <8f> DW_AT_type : <0x6a> <1><93>: Abbrev Number: 0 I see the issues to be the result of: #1. The gen_ctf_sou_type function is processing <3><6a>: Abbrev Number: 6 (DW_TAG_const_type) as a member of the struct. #2. The top-level DIE=20 <1><8e>: Abbrev Number: 1 (DW_TAG_pointer_type) is being processed by ctf_do_die.=