From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 30B243858C53; Sun, 6 Aug 2023 22:00:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30B243858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691359225; bh=tHTmU9zz6VgRpMx94M7oRhf4UEb2h5q24qcvLfqo9qU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ew2FlAfsM1kRagIEzTy1IhkM//k449ZUP3Pv83sPdyq9ZyaDayzH0Vzk/eA/6/tiG 27zg2fiWUno6czzzZnIcIJ9BcPiys/xigLiKEEKRAVMS6q+DcXD86peQ9spum3EBWJ dz5aelO7wVvf6ZENFa1ehP7noX7ehgASdjElaDak= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30728] [gdb/symtab, cc-with-dwz] FAIL: gdb.cp/breakpoint-locs.exp: break N1::C1::baz Date: Sun, 06 Aug 2023 22:00:24 +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=3D30728 --- Comment #4 from Tom de Vries --- I'm starting to understand somewhat why it's not 100% reproducible. With t= his patch: ... diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index dd4fac52ca8..ed36b5e890b 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -16889,6 +16889,13 @@ cooked_index_functions::expand_symtabs_matching =3D lookup_name_without_params.split_name (lang); std::string last_name =3D gdb::to_string (name_vec.back ()); + for (const cooked_index_entry *entry : table->find (last_name, + completing)) + { + QUIT; + fprintf (stderr, "Trying entry: %lx\n", (unsigned long)entry->die_offset); + } + for (const cooked_index_entry *entry : table->find (last_name, completing)) { @@ -16953,6 +16960,7 @@ cooked_index_functions::expand_symtabs_matching continue; } + fprintf (stderr, "matched entry: %lx\n", (unsigned long)entry->die_offset); if (!dw2_expand_symtabs_matching_one (entry->per_cu, per_objfile, file_matcher, expansion_notify)) ... I get: ... $ gdb -q -batch ./breakpoint-locs -ex "break N1::C1::baz" Trying entry: 14 Trying entry: 10e Trying entry: 199 matched entry: 14 Trying entry: 2e Trying entry: 2e Trying entry: 2e Breakpoint 1 at 0x4004db: file /data/vries/gdb/src/gdb/testsuite/gdb.cp/breakpoint-locs.h, line 23. ... or: ... $ gdb -q -batch ./breakpoint-locs -ex "break N1::C1::baz" Trying entry: 10e Trying entry: 14 Trying entry: 199 matched entry: 10e Trying entry: 2e matched entry: 2e Trying entry: 2e Trying entry: 2e Breakpoint 1 at 0x4004db: N1::C1::baz. (2 locations) ... The root cause of the difference seems to be that the order of table->find = is not stable. --=20 You are receiving this mail because: You are on the CC list for the bug.=