From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114100 invoked by alias); 15 Sep 2015 16:55:22 -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 114088 invoked by uid 89); 15 Sep 2015 16:55:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp11.uk.ibm.com Received: from e06smtp11.uk.ibm.com (HELO e06smtp11.uk.ibm.com) (195.75.94.107) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 15 Sep 2015 16:55:20 +0000 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Sep 2015 17:55:17 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 15 Sep 2015 17:55:15 +0100 X-MailFrom: uweigand@de.ibm.com X-RcptTo: gdb-patches@sourceware.org Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1B09F1B08067 for ; Tue, 15 Sep 2015 17:56:56 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t8FGtF7Z32243916 for ; Tue, 15 Sep 2015 16:55:15 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t8FGtFi5012334 for ; Tue, 15 Sep 2015 10:55:15 -0600 Received: from oc7340732750.ibm.com (dyn-9-152-213-225.boeblingen.de.ibm.com [9.152.213.225]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t8FGtEHj012331; Tue, 15 Sep 2015 10:55:14 -0600 Received: by oc7340732750.ibm.com (Postfix, from userid 500) id B37A22209; Tue, 15 Sep 2015 18:55:14 +0200 (CEST) Subject: Re: [ppc64le patch v3] Use skip_entrypoint for skip_trampoline_code To: jan.kratochvil@redhat.com (Jan Kratochvil) Date: Tue, 15 Sep 2015 16:55:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20150915165019.GA28110@host1.jankratochvil.net> from "Jan Kratochvil" at Sep 15, 2015 06:50:19 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20150915165514.B37A22209@oc7340732750.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15091516-0041-0000-0000-000005D11993 X-SW-Source: 2015-09/txt/msg00349.txt.bz2 Jan Kratochvil wrote: > On Tue, 15 Sep 2015 18:39:17 +0200, Ulrich Weigand wrote: > > This is OK. > > Thanks for the ppc64le arch review but I am not sure if it is also approval of > the coding style which I asked about (not specifically you) by: > > On Mon, 07 Sep 2015 22:47:20 +0200, Jan Kratochvil wrote: > # Currently gdbarch_skip_entrypoint() has been called in skip_prologue_sal() and > # fill_in_stop_func() but that is not enough. I believe > # gdbarch_skip_entrypoint() should be called after every > # gdbarch_skip_trampoline_code(), shouldn't it? > # > # The attached patch is a bit hack but I am not sure what is a clean solution. > # Maybe create a gdbarch_skip_trampoline_code() wrapper function calling also > # gdbarch_skip_entrypoint() and forbid calling gdbarch_skip_trampoline_code() > # directly? > > I did not want to refactor it before asking as there are too many > possibilities how to do it and I expect I would not guess the right one. > > OTOH the refactorization can be also considered a future task, if you mean it > that way. Actually, I thought it was fine to have this just be PowerPC-specific. The need to skip entrypoints in skip_trampoline_code is only due to the quite PowerPC-specific dynamic linker optimization to redirect the PLT slot to the local entry point. I'm not sure if any other target that may want to use the skip_entrypoint logic in the future will have the same requirement, so it seemed preferable to have that platform-specific. In any case, it is probably better to wait with refactoring this into common code until such time as there actually *is* a second platform that uses skip_entrypoint, so we're clearer about the actual requirements. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com