Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] dwarf2_physname
Date: Tue, 15 Sep 2009 15:53:00 -0000	[thread overview]
Message-ID: <4AAFB868.9050407@redhat.com> (raw)
In-Reply-To: <20090915133207.GA17606@caradoc.them.org>

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


  reply	other threads:[~2009-09-15 15:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-31 22:51 Keith Seitz
2009-08-31 23:10 ` Michael Eager
2009-08-31 23:23   ` Keith Seitz
2009-08-31 23:35     ` Michael Eager
2009-09-01 22:11     ` Daniel Jacobowitz
2009-09-01 22:27       ` Daniel Jacobowitz
2009-09-01 23:18       ` Michael Eager
2009-09-01 23:37         ` Daniel Jacobowitz
2009-09-02  1:12           ` Michael Eager
2009-09-01 23:26       ` Keith Seitz
2009-09-01 23:42         ` Daniel Jacobowitz
2009-09-14 18:39           ` Keith Seitz
2009-09-14 22:48             ` Daniel Jacobowitz
2009-09-14 23:56               ` Keith Seitz
2009-09-15 13:32                 ` Daniel Jacobowitz
2009-09-15 15:53                   ` Keith Seitz [this message]
2009-09-15 16:12                     ` Daniel Jacobowitz
2009-09-16 20:27                       ` Keith Seitz
2009-09-18 22:34                         ` Tom Tromey
     [not found]   ` <m37hwjy2tl.fsf@fleche.redhat.com>
2009-09-01  0:06     ` Michael Eager
2009-09-01 21:27 ` Tom Tromey
2009-09-01 22:10   ` Keith Seitz

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=4AAFB868.9050407@redhat.com \
    --to=keiths@redhat.com \
    --cc=gdb-patches@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