From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6242A3857829; Wed, 25 Aug 2021 08:18:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6242A3857829 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/28261] [debug-names] FAIL: gdb.dwarf2/dw2-ranges-psym.exp: No complaints Date: Wed, 25 Aug 2021 08:18:18 +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: vries at gcc dot gnu.org 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: 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: Wed, 25 Aug 2021 08:18:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28261 --- Comment #4 from Tom de Vries --- Alternatively, we can do: ... diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index 4e00c716d91..7333e2b2d55 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -1481,14 +1481,11 @@ write_debug_names (dwarf2_per_objfile *per_objfile, header.append_uint (2, dwarf5_byte_order, 0); /* comp_unit_count - The number of CUs in the CU list. */ - header.append_uint (4, dwarf5_byte_order, - per_objfile->per_bfd->all_comp_units.size () - - per_objfile->per_bfd->tu_stats.nr_tus); + header.append_uint (4, dwarf5_byte_order, counter); /* local_type_unit_count - The number of TUs in the local TU list. */ - header.append_uint (4, dwarf5_byte_order, - per_objfile->per_bfd->tu_stats.nr_tus); + header.append_uint (4, dwarf5_byte_order, types_counter); /* foreign_type_unit_count - The number of TUs in the foreign TU list. */ ... which gives us: ... CU table: [ 0] 0x0 [ 1] 0x2e [ 2] 0xa5 [ 3] 0xd2 [ 4] 0x150 [ 5] 0x308 ... but then we run into: ... $ gdb -q -batch \ -ex "set trace-commands on" \ -x outputs/gdb.dwarf2/dw2-ranges-psym/gdb.in.6 +set height 0 +set width 0 +dir +dir /home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.dwarf2 +show complaints Max number of complaints about incorrect symbols is 0. +set complaints 5 +file ./outputs/gdb.dwarf2/dw2-ranges-psym/dw2-ranges-psym +set complaints 0 +delete breakpoints +info breakpoints No breakpoints or watchpoints. +break -qualified main Breakpoint 1 at 0x4004ab +run=20 Breakpoint 1, 0x00000000004004ab in main () +break someothername src/gdb/dwarf2/read.c:6627: internal-error: cutu_reader::cutu_reader(dwarf2_per_cu_data*, dwarf2_per_objfile*, abbrev_table*, dwarf2_cu*, bool): Assertion `this_cu->length =3D=3D cu->header.get_length ()' failed. ... --=20 You are receiving this mail because: You are on the CC list for the bug.=