From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12741 invoked by alias); 15 Sep 2009 15:53:24 -0000 Received: (qmail 12716 invoked by uid 22791); 15 Sep 2009 15:53:22 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Sep 2009 15:53:17 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8FFrGxG026184 for ; Tue, 15 Sep 2009 11:53:16 -0400 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8FFrCmE013929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 15 Sep 2009 11:53:15 -0400 Message-ID: <4AAFB868.9050407@redhat.com> Date: Tue, 15 Sep 2009 15:53:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [RFA] dwarf2_physname References: <4A9C358E.2050904@redhat.com> <4A9C54F6.1000909@eagercon.com> <4A9C5A66.7060609@redhat.com> <20090901221122.GA24658@caradoc.them.org> <4A9DADB6.2090508@redhat.com> <20090901234212.GB32355@caradoc.them.org> <4AAE8DDB.3060005@redhat.com> <20090914224754.GA7012@caradoc.them.org> <4AAED830.5080909@redhat.com> <20090915133207.GA17606@caradoc.them.org> In-Reply-To: <20090915133207.GA17606@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00482.txt.bz2 On 09/15/2009 06:32 AM, Daniel Jacobowitz wrote: > Oh, I see. Is there any other differentiation in the ICC output > between the two relevant cases? Namely bar and baz in: > > class foo { > void bar(); > static void baz(foo*); > }; In this case, the DWARF output looks pretty much as expected. There is only one DIE defining foo::baz, and that is in the class definition. One quirk: the parameter's DW_AT_name is "$01". I played with this a bit, and it seems that only ctors and dtors have DIEs outside the class definition (ignoring "normal" C functions). However, in every case I tried, ICC does not output DW_AT_artificial for ANY class method's first parameter. Does ICC not use hidden parameter passing to implement method calls? It seems odd that it would do this for ctors/dtors and no other methods. In any case, once again, DW_AT_name for method formal parameters is also generated ("$02", "$03", etc). It seems that the only time I see a useful DW_AT_name for anything function-like is for the ctor/dtor (all parameters, not just hidden "this") and C functions. [Anecdote: Every time I run readelf -w on an ICC-generated object, it complains of "Bogus end-of-siblings marker" -- perhaps there are some bytes in the debuginfo (which readelf/gdb cannot read/interpret) which helps mitigate some of these problems?] > From discussions on the dwarf-discuss list, I've gathered that pretty > much every debugger is full of compiler-specific quirking. In > practice, to provide a good user experience, we have to interpret the > DWARF in our best understanding of each compiler's intentions rather > than just through the standard. Sure, that doesn't really surprise me. But these three quirks (conflicting DIEs for same object, missing DW_AT_artificial, nonsensical DW_AT_name) would seem truly unnecessary and fairly trivial to fix. > Of course, that relies on someone wanting to do the work for ICC support. It may just be useful to provide (yet another) switch to turn on DW_AT_MIPS_linkage_name processing (and disable the proposed physname work). We could do this switch manually (set dwarf-linkage-name on?) and/or by producer (turn it on for ICC by default). Keith