From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6626F386F805; Thu, 4 Jan 2024 22:24:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6626F386F805 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704407076; bh=SVCtIqf4TAB74i9JyBKP+17d+fqYBWeGLlqz1vMqICo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W8REh06nXsHLskpO+XI8IjUkxPQkf7NMFyyk52nPF4qo8jAbfyxRBpdoeJ01Fwwwp y44Fl8CbPRPNQV0/nMNhsSI3jWVM558uwDeCYd+v8l/t7OGaNV5AeC1hvSB2cDo/t1 LTwIHaZIMmy04gw6IjEq0K9dbWyMvm7yKb8nSEFc= From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/23773] gdb crashed when I tried get backtrace Date: Thu, 04 Jan 2024 22:24:34 +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: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ssbssa 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: cc 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=3D23773 Hannes Domani changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ssbssa at sourceware dot o= rg --- Comment #5 from Hannes Domani --- (In reply to Sourceware Commits from comment #4) > The master branch has been updated by Keith Seitz : >=20 > https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git; > h=3Dc24bdb023c8e1fa969d6eb945059fa8ed0d490c7 >=20 > commit c24bdb023c8e1fa969d6eb945059fa8ed0d490c7 > Author: Keith Seitz > Date: Wed Jan 16 11:38:06 2019 -0800 >=20 > Introduce dwarf2_cu::get_builder >=20=20=20=20=20 > This patch is an attempt to deal with a variety of bugs reported where > GDB segfaults attempting to access a dwarf2_cu's builder. In certain > circumstances, this builder can be NULL. This is especially common > when inheriting DIEs via inlined subroutines in other CUs. The test > case demonstrates one such situation reported by users. See gdb/2377= 3, > rhbz1638798, and dups for other concrete examples. >=20=20=20=20=20 > The approach taken here is to save the ancestor CU into the dwarf2_cu= of > all CUs with DIEs that are "imported." This can happen whenever > follow_die_offset and friends are called. This essentially introduce= s a > chain of CUs that caused the importation of a DIE from a CU. Whenever > a builder is requested of a CU that has none, the ancestors are searc= hed > for the first one with a builder. >=20=20=20=20=20 > A design side effect of this is that the builder can now only be > accessed by getter and setter methods because the builder itself > is private. >=20=20=20=20=20 > The bulk of the patch is relatively mindless text conversion from > "cu->builder" to "cu->get_builder ()". I've included one test which > was derived from one (of the many) bugs reported on the issue in both > sourceware and Fedora bugzillas. >=20=20=20=20=20 > gdb/ChangeLog: >=20=20=20=20=20 > PR gdb/23773 > * dwarf2read.c (dwarf2_cu) : New field. > : Rename to .. > : ... this and make private. > (dwarf2_cu::get_builder): New method. Change all users of > `builder' to use this method. > (dwarf2_start_symtab): Move to ... > (dwarf2_cu::start_symtab): ... here. Update all callers > (setup_type_unit_groups): Move to ... > (dwarf2_cu::setup_type_unit_groups): ... here. Update all > callers. > (dwarf2_cu::reset_builder): New method. > (process_full_compunit, process_full_type_unit): Use > dwarf2_cu::reset_builder. > (follow_die_offset): Record the ancestor CU if it is different > from the followed DIE's CU. > (follow_die_sig_1): Likewise. >=20=20=20=20=20 > gdb/testsuite/ChangeLog: >=20=20=20=20=20 > PR gdb/23773 > * gdb.dwarf2/inlined_subroutine-inheritance.exp: New file. Can this be closed? --=20 You are receiving this mail because: You are on the CC list for the bug.=