From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86486 invoked by alias); 31 Oct 2018 00:34:04 -0000 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 Received: (qmail 86473 invoked by uid 89); 31 Oct 2018 00:34:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=answers, findings, awesome, H*M:15b2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Oct 2018 00:34:02 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7DF3588304; Wed, 31 Oct 2018 00:34:01 +0000 (UTC) Received: from theo.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 365EC60F87; Wed, 31 Oct 2018 00:34:01 +0000 (UTC) Subject: Re: [PATCH] gdb: Handle ICC's unexpected void return type To: Andrew Burgess Cc: gdb-patches@sourceware.org, Kevin Buettner References: <20181023212843.4774-1-andrew.burgess@embecosm.com> <0794714d-b2f8-6175-cc98-6000d77ea933@redhat.com> <20181031002259.GM15098@embecosm.com> From: Keith Seitz Message-ID: Date: Wed, 31 Oct 2018 00:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181031002259.GM15098@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00736.txt.bz2 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 [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