public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/37237]  New: Debug information for virtual destructors omits DW_AT_vtable_elem_location
@ 2008-08-25 19:54 drow at gcc dot gnu dot org
  2010-02-11 18:44 ` [Bug debug/37237] " dodji at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: drow at gcc dot gnu dot org @ 2008-08-25 19:54 UTC (permalink / raw)
  To: gcc-bugs

Compile a C++ file containing a class with a virtual destructor.  Example from
gdb's class2.cc test:

struct A
{
  virtual ~A ();
  int a1;
};

A::~A()
{
  a1 = 800;
}

>From the DWARF:

 <2><270>: Abbrev Number: 10 (DW_TAG_subprogram)
  <271>     DW_AT_external    : 1
  <272>     DW_AT_name        : ~A
  <275>     DW_AT_decl_file   : 1
  <276>     DW_AT_decl_line   : 25
  <277>     DW_AT_virtuality  : 1       (virtual)
  <278>     DW_AT_containing_type: <221>
  <27c>     DW_AT_declaration : 1

There's a DIE for the member function definition which refers to this
(DW_AT_specification), too.  But neither of them has
DW_AT_vtable_elem_location; this is not optional for virtual methods.

I assume this is related to the fact that the destructor is cloned (whole
object and partial object).  That's why it doesn't get a
DW_AT_MIPS_linkage_name.  I believe there are two vtable slots for the two
clones; the most practical thing would be to describe the whole-object version
in the DWARF since that's what a debugger will be looking up.

I can't think of a better way to handle this; maybe someone else can.


-- 
           Summary: Debug information for virtual destructors omits
                    DW_AT_vtable_elem_location
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drow at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37237


^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <bug-37237-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2013-11-14 16:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-25 19:54 [Bug debug/37237] New: Debug information for virtual destructors omits DW_AT_vtable_elem_location drow at gcc dot gnu dot org
2010-02-11 18:44 ` [Bug debug/37237] " dodji at gcc dot gnu dot org
2010-02-12 15:48 ` dodji at gcc dot gnu dot org
2010-02-12 15:52 ` drow at gcc dot gnu dot org
2010-02-21 16:47 ` dodji at gcc dot gnu dot org
2010-02-23 16:56 ` tromey at gcc dot gnu dot org
2010-02-26 12:59 ` dodji at gcc dot gnu dot org
2010-02-26 20:48 ` jason at gcc dot gnu dot org
     [not found] <bug-37237-4@http.gcc.gnu.org/bugzilla/>
2011-05-24 13:51 ` tromey at gcc dot gnu.org
2012-07-12 18:34 ` tromey at gcc dot gnu.org
2012-07-13 17:15 ` tromey at gcc dot gnu.org
2013-01-31 19:32 ` jason at gcc dot gnu.org
2013-02-18 15:21 ` tromey at gcc dot gnu.org
2013-02-26  4:35 ` jason at gcc dot gnu.org
2013-11-14 16:56 ` tromey at gcc dot gnu.org

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).