public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org, Kevin Buettner <kevinb@redhat.com>
Subject: Re: [PATCH] gdb: Handle ICC's unexpected void return type
Date: Wed, 31 Oct 2018 00:34:00 -0000	[thread overview]
Message-ID: <af6bbbf0-15b2-fd5c-fcd4-a81ebd962c00@redhat.com> (raw)
In-Reply-To: <20181031002259.GM15098@embecosm.com>

On 10/30/18 5:22 PM, Andrew Burgess wrote:

> Thanks for your feedback.  Sorry for the delay in replying, I've
> managed to get some more test binaries since my original patch, so I
> have a better response now.

This is awesome. Thank you so much for humoring me!

> * Keith Seitz <keiths@redhat.com> [2018-10-24 14:00:16 -0700]:
> 
>> On 10/23/18 2:28 PM, Andrew Burgess wrote:
>> Is this the appropriate place for this? The patch is attempting to deal specifically
>> with the void return of a function. I would have thought to catch this anomaly in
>> read_func_scope/add_dwarf2_member_fn. These sorts of exceptions are handled
>> relatively commonly in dwarf2read.c.
> 
> In the new patch you'll see that after further testing the
> non-standard DWARF is actually from more than just the return type.
> Function arguments also pick up these strange integer void types.

Yikes. That certainly changes the landscape.

> As such, moving the fix into read_func_scope/add_dwarf2_member_fn
> isn't the right solution - though given my original patch that was a
> sensible suggestion.

I agree.

>> Also, if it this is the appropriate place (or even if it is decided to move this
>> check elsewhere), why limit this to ICC? Is it simply because ICC only handles
>> C/C++? Would it hurt/be worth it to safe guard that gcc or clang or rustc or
>> who-knows-what wouldn't cause us similar harm?
> 
> I guess I added the check for ICC specifically because of your concern
> above.  I'm certainly not going to claim to know all the nasty details
> for all the different DWARF producers.  And, as we say above this
> isn't obviously "wrong" (though like you, I tend to think it is) it's
> more just "non-standard", so, who am I to say that if some other
> producer is creating this we should transform it....
> 
> I would certainly be happy to drop the ICC check if there was a
> feeling that this is the right way to go.

I'm okay with the check, especially given your expanded findings. [And
I'm all for minimizing the impact of a patch.]

> The new patch moves the conversion from integer type to void type into
> a new function which is now called from a couple of places, but all
> from within dwarf2read.c:read_base_type, this catches the return type
> and the variable type issues.  The test has been renamed to remove the
> focus on return type.  Otherwise, everything is pretty similar.
> 
> Let me know what you think.

That answers all the questions I had. Thank you very much.

Kevin has already approved the patch, so unless he has anything further,
I would say this patch is good to go in.

Keith

  reply	other threads:[~2018-10-31  0:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 21:28 Andrew Burgess
2018-10-24 17:10 ` Kevin Buettner
2018-10-24 21:00 ` Keith Seitz
2018-10-31  0:23   ` Andrew Burgess
2018-10-31  0:34     ` Keith Seitz [this message]
2018-10-31  3:26       ` Kevin Buettner
2018-11-06 18:11 ` Tom Tromey
2018-11-06 20:43   ` Andrew Burgess
2018-11-06 22:42     ` Tom Tromey

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=af6bbbf0-15b2-fd5c-fcd4-a81ebd962c00@redhat.com \
    --to=keiths@redhat.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.com \
    /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).