From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6536 invoked by alias); 10 May 2012 16:38:05 -0000 Received: (qmail 6296 invoked by uid 22791); 10 May 2012 16:38:04 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from poczta.oswiecenia.net (HELO poczta.oswiecenia.net) (83.13.108.61) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 May 2012 16:37:50 +0000 Received: from localhost (localhost [127.0.0.1]) by poczta.oswiecenia.net (Postfix) with ESMTP id 064C23BDB3D; Thu, 10 May 2012 18:37:47 +0200 (CEST) Received: from poczta.oswiecenia.net ([127.0.0.1]) by localhost (poczta.oswiecenia.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rd-M1dyHhVCT; Thu, 10 May 2012 18:37:41 +0200 (CEST) Received: from poczta.oswiecenia.net (unknown [192.168.5.248]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by poczta.oswiecenia.net (Postfix) with ESMTPSA id 8E1D93BDB39; Thu, 10 May 2012 18:37:41 +0200 (CEST) MIME-Version: 1.0 Date: Thu, 10 May 2012 16:38:00 -0000 From: Tomasz Grobelny To: Tom Tromey Cc: Sergio Durigan Junior , Subject: Re: sun compiler and gdb In-Reply-To: <87havoqhxm.fsf@fleche.redhat.com> References: <25b0084e43f4d35410c8dff55a3be61d@192.168.5.248> <543302446b67dbf68e8cedb69a197d77@192.168.5.248> <871umtrtab.fsf@fleche.redhat.com> <87havoqhxm.fsf@fleche.redhat.com> Message-ID: <4eaa53078c18227995efd9409baaf5eb@192.168.5.248> X-Sender: tomasz@grobelny.oswiecenia.net User-Agent: RoundCube Webmail/0.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00041.txt.bz2 On Thu, 10 May 2012 07:33:41 -0600, Tom Tromey wrote: >>>>>> "Tomasz" == Tomasz Grobelny writes: > > Tom> If you have a small test case, a dump of the DWARF information might > Tom> prove helpful. If you only have a large test case, then something > more > Tom> selective could help. > > Tomasz> A trivial test case attached. Compiled with: > Tomasz> CC: Sun C++ 5.11 SunOS_sparc 2010/08/13 > > I think it is a compiler bug. The DWARF (from your second posting) > looks like: > > <1><13b39>: Abbrev Number: 115 (DW_TAG_imported_declaration) > <13b3a> DW_AT_import : <0x0> [Abbrev Number: 0] > > I don't think this is a valid DW_AT_import. > Do you think that this portion can be just ignored by gdb? > After that you'd have to try again and see what other bugs crop up. > Actually the behaviour on the two machines I have tested on is different. Not yet sure whether this is a problem with compiler architecture (x86 vs sparc) or gdb version (7.4.1 vs. 7.0.1), but it looks like this on sparc/gdb 7.0.1: > gdb -readnow ./a.out.sparc GNU gdb (GDB) 7.0.1 (...) This GDB was configured as "sparc-sun-solaris2.10". Reading symbols from /login/sg209371/gdbtest/a.out.sparc...expanding to full symbols...Die: DW_TAG_ (abbrev 9, offset 0x1bb) parent at offset: 0x197 has children: TRUE attributes: DW_AT_name (DW_FORM_string) string: "basic_ostream" (is canonicalized) DW_AT_ (DW_FORM_string) string: "nNbasic_ostream3CTACTB_" (not canonicalized) DW_AT_decl_file (DW_FORM_data1) constant: 2 DW_AT_decl_line (DW_FORM_data1) constant: 74 Dwarf Error: Cannot find type of die [in module /login/sg209371/gdbtest/a.out.sparc] (gdb) quit > With the relevant portion of dwarfdump looking like this: <2>< 443> DW_TAG_SUN_class_template DW_AT_name basic_ostream DW_AT_SUN_part_link_name nNbasic_ostream3CTACTB_ DW_AT_decl_file 2 /opt/solstudio12.2/prod/include/CC/Cstd/ostream DW_AT_decl_line 74 Shouldn't unknown tag just be ignored? To me it looks like some compiler specific extension. I searched for other tags that might be compiler specific and here is the list: DW_AT_SUN_cf_kind DW_AT_SUN_comdat_function DW_AT_SUN_command_line DW_AT_SUN_compile_options DW_AT_SUN_func_offsets DW_AT_SUN_language DW_AT_SUN_link_name DW_AT_SUN_part_link_name DW_AT_SUN_pass_with_const DW_AT_SUN_return_with_const DW_AT_SUN_template DW_AT_SUN_vbase DW_AT_SUN_vtable DW_AT_SUN_vtable_abi Are any of these supported or (at least) explicitly ignored by gdb? -- Regards, Tomasz Grobelny