From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4EE62385782F; Tue, 22 Sep 2020 06:18:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4EE62385782F From: "sourav0311 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug symtab/25969] Ignoring .debug_aranges with clang .debug_names Date: Tue, 22 Sep 2020 06:18:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sourav0311 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 06:18:31 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25969 Sourabh Singh Tomar changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sourav0311 at gmail dot com --- Comment #2 from Sourabh Singh Tomar --- GDB when trying to parse `debug_names` also parses `debug_aranges` section, however `debug_aranges` section is not generated/present in `clang-trunk` generated executables. This warning is the result of GDB not checking whether the section is even present/empty. clang version 12.0.0 $clang -gdwarf-5 -gpubnames test.c $readelf -S a.out | awk /debug/ [24] .debug_abbrev PROGBITS 0000000000000000 000009a4 [25] .debug_info PROGBITS 0000000000000000 000009ed [26] .debug_str_offset PROGBITS 0000000000000000 00000a46 [27] .debug_str PROGBITS 0000000000000000 00000a6e [28] .debug_addr PROGBITS 0000000000000000 00000af5 [29] .debug_names PROGBITS 0000000000000000 00000b08 [30] .debug_line PROGBITS 0000000000000000 00000b78 [31] .debug_line_str PROGBITS 0000000000000000 00000be1 A quick fix could be: ``` static void create_addrmap_from_aranges (dwarf2_per_objfile *per_objfile, struct dwarf2_section_info *section) { /*If section is empty(or not present) bail out early.*/ if (section->empty ()) return; ``` Because anyway we are bailing out after emitting the warning: ``` if (!insertpair.second) { warning (_("Section .debug_aranges in %s has duplicate " "debug_info_offset %s, ignoring .debug_aranges."), objfile_name (objfile), sect_offset_str (per_cu->sect_of= f)); return; } ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=