From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8281B395100D; Mon, 26 Apr 2021 15:40:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8281B395100D From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27743] Internal error psymtab.c Date: Mon, 26 Apr 2021 15:40:53 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: 10.2 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: Mon, 26 Apr 2021 15:40:53 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27743 --- Comment #24 from cvs-commit at gcc dot gnu.org --- The gdb-10-branch branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De7d77ce0c408= e7019f9885b8be64c9cdb46dd312 commit e7d77ce0c408e7019f9885b8be64c9cdb46dd312 Author: Tom Tromey Date: Fri Apr 23 11:28:48 2021 -0600 Fix crash when expanding partial symtabs with DW_TAG_imported_unit PR gdb/27743 points out a gdb crash when expanding partial symtabs, where one of the compilation units uses DW_TAG_imported_unit. The bug is that partial_map_expand_apply expects only to be called for the outermost psymtab. However, filename searching doesn't (and probably shouldn't) guarantee this. The fix is to walk upward to find the outermost CU. A new test case is included. It is mostly copied from other test cases, which really sped up the effort. This bug does not occur on trunk. There, psym_map_symtabs_matching_filename is gone, replaced by psymbol_functions::expand_symtabs_matching. When this find a match, it calls psymtab_to_symtab, which does this same upward walk. Tested on x86-64 Fedora 32. I propose checking in this patch on the gdb-10 branch, and just the new test case on trunk. gdb/ChangeLog 2021-04-23 Tom Tromey PR gdb/27743: * psymtab.c (partial_map_expand_apply): Expand outermost psymta= b. gdb/testsuite/ChangeLog 2021-04-23 Tom Tromey PR gdb/27743: * gdb.dwarf2/imported-unit-bp.exp: New file. * gdb.dwarf2/imported-unit-bp-main.c: New file. * gdb.dwarf2/imported-unit-bp-alt.c: New file. --=20 You are receiving this mail because: You are on the CC list for the bug.=