From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6659B393BC33; Fri, 23 Apr 2021 15:34:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6659B393BC33 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27743] Internal error psymtab.c Date: Fri, 23 Apr 2021 15:34:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: UNCONFIRMED 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: Fri, 23 Apr 2021 15:34:42 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27743 --- Comment #20 from Tom Tromey --- I have a fix but haven't attempted to write a test case. diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 23eed6bc1c6..71b02caae51 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -127,9 +127,10 @@ partial_map_expand_apply (struct objfile *objfile, { struct compunit_symtab *last_made =3D objfile->compunit_symtabs; - /* Shared psymtabs should never be seen here. Instead they should - be handled properly by the caller. */ - gdb_assert (pst->user =3D=3D NULL); + /* We may see a shared psymtab here, but we want to expand the + outermost symtab. */ + while (pst->user !=3D nullptr) + pst =3D pst->user; /* Don't visit already-expanded psymtabs. */ if (pst->readin_p (objfile)) --=20 You are receiving this mail because: You are on the CC list for the bug.=