From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2275 invoked by alias); 22 Jan 2013 17:34:28 -0000 Received: (qmail 1964 invoked by uid 48); 22 Jan 2013 17:34:24 -0000 From: "dblaikie at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/8218] ptype claims destructors have arg Date: Tue, 22 Jan 2013 17:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dblaikie at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00107.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=8218 David Blaikie changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dblaikie at gmail dot com --- Comment #2 from David Blaikie 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.