public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/23773] gdb crashed when I tried get backtrace
       [not found] <bug-23773-4717@http.sourceware.org/bugzilla/>
@ 2024-01-04 22:24 ` ssbssa at sourceware dot org
  2024-01-05 19:50 ` keiths at redhat dot com
  1 sibling, 0 replies; 2+ messages in thread
From: ssbssa at sourceware dot org @ 2024-01-04 22:24 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=23773

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #5 from Hannes Domani <ssbssa at sourceware dot org> ---
(In reply to Sourceware Commits from comment #4)
> The master branch has been updated by Keith Seitz <kseitz@sourceware.org>:
> 
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
> h=c24bdb023c8e1fa969d6eb945059fa8ed0d490c7
> 
> commit c24bdb023c8e1fa969d6eb945059fa8ed0d490c7
> Author: Keith Seitz <keiths@redhat.com>
> Date:   Wed Jan 16 11:38:06 2019 -0800
> 
>     Introduce dwarf2_cu::get_builder
>     
>     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/23773,
>     rhbz1638798, and dups for other concrete examples.
>     
>     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 introduces 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 searched
>     for the first one with a builder.
>     
>     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.
>     
>     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.
>     
>     gdb/ChangeLog:
>     
>     	PR gdb/23773
>     	* dwarf2read.c (dwarf2_cu) <ancestor>: New field.
>     	<builder>: Rename to ..
>     	<m_builder>: ... 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.
>     
>     gdb/testsuite/ChangeLog:
>     
>     	PR gdb/23773
>     	* gdb.dwarf2/inlined_subroutine-inheritance.exp: New file.

Can this be closed?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/23773] gdb crashed when I tried get backtrace
       [not found] <bug-23773-4717@http.sourceware.org/bugzilla/>
  2024-01-04 22:24 ` [Bug gdb/23773] gdb crashed when I tried get backtrace ssbssa at sourceware dot org
@ 2024-01-05 19:50 ` keiths at redhat dot com
  1 sibling, 0 replies; 2+ messages in thread
From: keiths at redhat dot com @ 2024-01-05 19:50 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=23773

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |keiths at redhat dot com
         Resolution|---                         |FIXED
           Assignee|unassigned at sourceware dot org   |keiths at redhat dot com

--- Comment #6 from Keith Seitz <keiths at redhat dot com> ---
(In reply to Hannes Domani from comment #5)
> (In reply to Sourceware Commits from comment #4)
> > The master branch has been updated by Keith Seitz <kseitz@sourceware.org>:
> > 
> > https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
> > h=c24bdb023c8e1fa969d6eb945059fa8ed0d490c7
> > 
> > commit c24bdb023c8e1fa969d6eb945059fa8ed0d490c7
> > Author: Keith Seitz <keiths@redhat.com>
> > Date:   Wed Jan 16 11:38:06 2019 -0800
> > 
> >     Introduce dwarf2_cu::get_builder
> 
> Can this be closed?

Certainly seems like this was fixed a long time ago. Thank you for bringing
this to my attention!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-05 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23773-4717@http.sourceware.org/bugzilla/>
2024-01-04 22:24 ` [Bug gdb/23773] gdb crashed when I tried get backtrace ssbssa at sourceware dot org
2024-01-05 19:50 ` keiths at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).