This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: Handle ICC's unexpected void return type


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]