From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18BC5385843A; Thu, 7 Sep 2023 06:57:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18BC5385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694069848; bh=T/Cy1QtKXLHsT21ABvm50pVRmjbog334vH/U+UOjvXI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Lvm+QfMy8mt7wWeCg7W5X8A1X4yjfDd+Aw+TFaOplRfPxNnkN+uhkg27D2Z/e9b+z 0YRdhsT7ceB4/DUKjsj3OGKtRhinRJusPd9saHqDCecOBqzjHE+S7cLEZMWVmqwH/o pvSx+Prkmqr/79kYBc3ixvf/44LCn7A9ldjaobsU= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30827] [gdb/symtab, dwarf4-gdb-index] FAIL: gdb.ada/same_enum.exp: print red Date: Thu, 07 Sep 2023 06:57:27 +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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30827 --- Comment #1 from Tom de Vries --- This fixes it: ... diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index e178bb067a9..72848dfc26b 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -1205,12 +1205,11 @@ write_gdbindex (dwarf2_per_bfd *per_bfd, cooked_ind= ex *table, all_units, but only in their own hash table. */ int counter =3D 0; - int types_counter =3D 0; for (int i =3D 0; i < per_bfd->all_units.size (); ++i) { dwarf2_per_cu_data *per_cu =3D per_bfd->all_units[i].get (); - int &this_counter =3D per_cu->is_debug_types ? types_counter : count= er; + int &this_counter =3D counter; const auto insertpair =3D cu_index_htab.emplace (per_cu, this_counte= r); gdb_assert (insertpair.second); ... --=20 You are receiving this mail because: You are on the CC list for the bug.=