From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6A4F3384BC33; Wed, 10 Mar 2021 12:29:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A4F3384BC33 From: "jan.kratochvil at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/99490] -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file Date: Wed, 10 Mar 2021 12:29:37 +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: jan.kratochvil at redhat dot com 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: Wed, 10 Mar 2021 12:29:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99490 --- Comment #10 from Jan Kratochvil --- clang is using DW_AT_ranges+DW_FORM_rnglistx+DW_AT_rnglists_base in the main file but in the DWO file it assumes DW_AT_rnglists_base is right after the .debug_rnglists header (as it does not make sense to point it anywhere else= in a DWO file having single CU). It makes sense although I do not see it speci= fied in DWARF-5: .debug_info contents: ... 0x00000014: DW_TAG_skeleton_unit [1]=20=20 ... DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist =3D 0x00000010 [0x0000000000401110, 0x0000000000401111) [0x0000000000401120, 0x0000000000401121) [0x0000000000401130, 0x0000000000401171)) ... DW_AT_rnglists_base [DW_FORM_sec_offset] (0x0000000c) .debug_info.dwo contents: ... 0x00000014: DW_TAG_compile_unit [1] * ... DW_AT_ranges [DW_FORM_rnglistx] (indexed (0x0) rangelist =3D 0x00000010 [0x0000000000000004, 0x0000000000000016) [0x0000000000000022, 0x0000000000000034)) https://github.com/llvm/llvm-project/blob/523d7bc6f427f9ae32e54dbf1764826cf= b269d21/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp#L388=