From patchwork Mon Oct 29 19:50:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Franco de Carvalho X-Patchwork-Id: 29953 Received: (qmail 71969 invoked by alias); 29 Oct 2018 19:50:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 71918 invoked by uid 89); 29 Oct 2018 19:50:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=ppc-linux-nat.c, ppclinuxnatc, UD:ppc-linux-nat.c, UD:ppc-linux-common.h X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Oct 2018 19:50:27 +0000 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9TJiTus058332 for ; Mon, 29 Oct 2018 15:50:25 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ne6kx58jv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 29 Oct 2018 15:50:25 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Oct 2018 15:50:24 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 29 Oct 2018 15:50:23 -0400 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9TJoLZo26476636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 29 Oct 2018 19:50:21 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1DB9CAE05F; Mon, 29 Oct 2018 19:50:21 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E5E88AE064; Mon, 29 Oct 2018 19:50:20 +0000 (GMT) Received: from pedro.localdomain (unknown [9.18.235.45]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 29 Oct 2018 19:50:20 +0000 (GMT) Received: by pedro.localdomain (Postfix, from userid 1000) id 9557A3C0441; Mon, 29 Oct 2018 16:50:18 -0300 (-03) From: Pedro Franco de Carvalho To: gdb-patches@sourceware.org Cc: uweigand@de.ibm.com Subject: Re: Regression on old kernels (Re: [PATCH v5 00/12] GDB support for more powerpc registers on linux) Date: Mon, 29 Oct 2018 16:50:07 -0300 In-Reply-To: <20181029142042.D1BFBD802E4@oc3748833570.ibm.com> References: <20181029142042.D1BFBD802E4@oc3748833570.ibm.com> x-cbid: 18102919-2213-0000-0000-0000030C7B6C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009949; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01109795; UDB=6.00574993; IPR=6.00889887; MB=3.00023954; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-29 19:50:24 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18102919-2214-0000-0000-00005C10A268 Message-Id: <20181029195007.9384-1-pedromfc@linux.ibm.com> Sorry, didn't think about this possibility! I've simply added the .h files in the patch below to both the native and the server targets. The ptrace call will still be made to determine the tdesc, but it should return in error and cause the new features not to be selected (no exceptions are thrown by check_regset). Is this ok? --- Pedro Franco de Carvalho -- >8 -- Subject: [PATCH] [PowerPC] Include nat/linux-ptrace.h in native targets Patch "[PowerPC] Add support for PPR and DSCR" used PTRACE_GETREGSET/SETREGSET without including the fallback definitions from "nat/linux-ptrace.h". Include this header to avoid breaking builds in older kernels that don't define them. gdb/ChangeLog: YYYY-MM-DD Pedro Franco de Carvalho * ppc-linux-nat.c: Include nat/linux-ptrace.h. gdb/gdbserver/ChangeLog: YYYY-MM-DD Pedro Franco de Carvalho * linux-ppc-low.c: Include nat/linux-ptrace.h. --- gdb/gdbserver/linux-ppc-low.c | 1 + gdb/ppc-linux-nat.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c index 12cb56a2b2..fd3d8fe194 100644 --- a/gdb/gdbserver/linux-ppc-low.c +++ b/gdb/gdbserver/linux-ppc-low.c @@ -28,6 +28,7 @@ #include "arch/ppc-linux-common.h" #include "arch/ppc-linux-tdesc.h" #include "nat/ppc-linux.h" +#include "nat/linux-ptrace.h" #include "linux-ppc-tdesc-init.h" #include "ax.h" #include "tracepoint.h" diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index e83912de4b..8d35682ca4 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -36,6 +36,7 @@ #include #include #include "nat/gdb_ptrace.h" +#include "nat/linux-ptrace.h" #include "inf-ptrace.h" /* Prototypes for supply_gregset etc. */