public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dblaikie at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/8218] ptype claims destructors have arg
Date: Tue, 22 Jan 2013 17:34:00 -0000	[thread overview]
Message-ID: <bug-8218-4717-MKvo4ZUnht@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-8218-4717@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=8218

David Blaikie <dblaikie at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dblaikie at gmail dot com

--- Comment #2 from David Blaikie <dblaikie at gmail dot com> 2013-01-22 17:34:20 UTC ---
This looks like a GCC bug, not a GDB bug.

Using llvm-dwarfdump, GCC's dwarf for the dtor looks like this:

0x00000051:     DW_TAG_subprogram [5] *
0x00000052:       DW_AT_external [DW_FORM_flag] (0x01)
0x00000053:       DW_AT_name [DW_FORM_string]   ("~C")
0x00000056:       DW_AT_decl_file [DW_FORM_data1]       (0x01)
0x00000057:       DW_AT_decl_line [DW_FORM_data1]       (0x03)
0x00000058:       DW_AT_declaration [DW_FORM_flag]      (0x01)
0x00000059:       DW_AT_object_pointer [DW_FORM_ref4]   (cu + 0x005d =>
{0x0000005d})

0x0000005d:       DW_TAG_formal_parameter [4]
0x0000005e:         DW_AT_type [DW_FORM_ref4]   (cu + 0x006b => {0x0000006b})
0x00000062:         DW_AT_artificial [DW_FORM_flag]     (0x01)

0x00000063:       DW_TAG_formal_parameter [4] 
0x00000064:         DW_AT_type [DW_FORM_ref4]   (cu + 0x0071 => {0x00000071})
0x00000068:         DW_AT_artificial [DW_FORM_flag]     (0x01)

0x00000069:       NULL  

0x0000006a:     NULL    

whereas Clang's dwarf looks like this:

0x00000086:     DW_TAG_subprogram [10] *
0x00000087:       DW_AT_accessibility [DW_FORM_data1]   (0x01)
0x00000088:       DW_AT_name [DW_FORM_strp]     ( .debug_str[0x00000049] =
"~C")
0x0000008c:       DW_AT_decl_file [DW_FORM_data1]       (0x01)
0x0000008d:       DW_AT_decl_line [DW_FORM_data1]       (0x03)
0x0000008e:       DW_AT_declaration [DW_FORM_flag_present]      (true)
0x0000008e:       DW_AT_external [DW_FORM_flag_present] (true)

0x0000008e:       DW_TAG_formal_parameter [9]
0x0000008f:         DW_AT_type [DW_FORM_ref4]   (cu + 0x006b => {0x0000006b})
0x00000093:         DW_AT_artificial [DW_FORM_flag_present]     (true)

0x00000093:       NULL  

0x00000094:     NULL

And GDB's output when given your example and compiled with Clang is:

(well I modified the example a bit: struct C { C() {} ~C() {} }; int main() { C
c; } (mostly I was curious whether "(void)" was the way GDB was printing things
generally or whether it would print the ctor as "()" instead)):

ptype C
type = struct C {
  public:
    C(void);
    ~C(void);
}

Shall we close this & open a GCC bug instead? (& change the kfail to an xfail
referencing the GCC bug - and add the correct pattern so Clang can pass this
test)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


       reply	other threads:[~2013-01-22 17:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-8218-4717@http.sourceware.org/bugzilla/>
2013-01-22 17:34 ` dblaikie at gmail dot com [this message]
2013-01-22 18:05 ` tromey at redhat dot com
2024-01-14 14:28 ` ssbssa at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-8218-4717-MKvo4ZUnht@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).