From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94184 invoked by alias); 20 Aug 2015 13:14:45 -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 94175 invoked by uid 89); 20 Aug 2015 13:14:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 20 Aug 2015 13:14:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id D4C6F2928A; Thu, 20 Aug 2015 09:14:41 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z215R3PnvpC8; Thu, 20 Aug 2015 09:14:41 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C1EB529282; Thu, 20 Aug 2015 09:14:41 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4F9AF44451; Thu, 20 Aug 2015 09:14:41 -0400 (EDT) Date: Thu, 20 Aug 2015 13:14:00 -0000 From: Joel Brobecker To: Max Filippov Cc: gdb-patches@sourceware.org, Maxim Grigoriev , Woody LaRue , Marc Gauthier Subject: [RFC] Re: [PATCH v2] xtensa: initialize call_abi in xtensa_tdep Message-ID: <20150820131441.GG4571@adacore.com> References: <1440075160-13310-1-git-send-email-jcmvbkbc@gmail.com> <20150820130736.GF4571@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150820130736.GF4571@adacore.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-08/txt/msg00544.txt.bz2 > I think you missed or ignored one comment about the fact that > the code I am seeing in current xtensa-tdep.h is not what your patch > says. So it seems to me you are sending a patch that doesn't seem > to be applying to master. > > I would also be beneficial to explore what I was trying to explain > regarding the fact that determining the proper ABI should be done > on the fly, rather than hardcoded. This is particularly true with > the fact that changing the hardcoded values involves adapting > the contents of a file, which is not user-friendly, and nearly > impossible for anyone but a knowledgeable GDB contributor. You answered in the other email: | I agree with that, but currently we can't distinguish executables with | different call ABI. Odd; that means that the linker would not reject the link of objects that use different calling conventions? Wow, better be careful! In any case, I think what should really be done, if it has to be hard-set in the debugger, is use a configure command-line option. Or use a GDB setting "set xtensa call-abi [...]". In the meantime, I have no strong objection to this code going in on the grounds that it doesn't really make things all that worse. But given that this is going against what I would recommend, give it another week so that other Maintainers have a chance to comment as well if they disagree with letting this in. > > --- > > Changes v1 -> v2: > > - fix call_abi code formatting. > > > > gdb/xtensa-tdep.h | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h > > index adacaf8..ff090f3 100644 > > --- a/gdb/xtensa-tdep.h > > +++ b/gdb/xtensa-tdep.h > > @@ -246,7 +246,9 @@ struct gdbarch_tdep > > .spill_location = -1, \ > > .spill_size = (spillsz), \ > > .unused = 0, \ > > - .call_abi = 0, \ > > + .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0 \ > > + ? CallAbiCall0Only \ > > + : CallAbiDefault), \ > > .debug_interrupt_level = XCHAL_DEBUGLEVEL, \ > > .icache_line_bytes = XCHAL_ICACHE_LINESIZE, \ > > .dcache_line_bytes = XCHAL_DCACHE_LINESIZE, \ > > -- > > 1.8.1.4 > > -- > Joel -- Joel