From patchwork Mon Mar 19 15:30:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 26377 Received: (qmail 45868 invoked by alias); 19 Mar 2018 15:33:41 -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 45503 invoked by uid 89); 19 Mar 2018 15:33:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=4477 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, 19 Mar 2018 15:33:39 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2JFUeMP092460 for ; Mon, 19 Mar 2018 11:33:38 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gtd1k8qmt-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 19 Mar 2018 11:33:37 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Mar 2018 15:33:36 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 19 Mar 2018 15:33:34 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2JFXXVA63963260 for ; Mon, 19 Mar 2018 15:33:33 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 329BE4C058 for ; Mon, 19 Mar 2018 15:26:43 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 16E4F4C040 for ; Mon, 19 Mar 2018 15:26:43 +0000 (GMT) Received: from oc1027705133.ibm.com (unknown [9.152.212.222]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Mon, 19 Mar 2018 15:26:43 +0000 (GMT) From: Andreas Arnez To: gdb-patches@sourceware.org Subject: [PATCH 3/3] S390: Make IPA recognize tdescs with guarded storage Date: Mon, 19 Mar 2018 16:30:48 +0100 In-Reply-To: <1521473488-27210-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1521473488-27210-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18031915-0012-0000-0000-000005C0E1F9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031915-0013-0000-0000-0000193CFB2D Message-Id: <1521473488-27210-4-git-send-email-arnez@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-19_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803190176 X-IsSubscribed: yes The in-process agent does not handle tdescs with guarded storage yet. This is fixed. gdb/gdbserver/ChangeLog: * linux-s390-ipa.c (get_ipa_tdesc): Add handling for S390_TDESC_GS. * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise. (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64 and init_registers_s390_gs_linux64. --- gdb/gdbserver/linux-s390-ipa.c | 13 +++++++++++-- gdb/gdbserver/linux-s390-low.c | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gdb/gdbserver/linux-s390-ipa.c b/gdb/gdbserver/linux-s390-ipa.c index 707d3384f0..bf9addb17a 100644 --- a/gdb/gdbserver/linux-s390-ipa.c +++ b/gdb/gdbserver/linux-s390-ipa.c @@ -119,7 +119,7 @@ static const int s390_linux64_ft_collect_regmap[] = { FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31), }; -/* Used for s390-te-linux64, s390-tevx-linux64. */ +/* Used for s390-te-linux64, s390-tevx-linux64, and s390-gs-linux64. */ static const int s390_te_linux64_ft_collect_regmap[] = { /* 32-bit PSWA and PSWM. */ @@ -207,7 +207,8 @@ static const int s390x_ft_collect_regmap[] = { FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31), }; -/* Used for s390x-te-linux64, s390x-tevx-linux64. */ +/* Used for s390x-te-linux64, s390x-tevx-linux64, and + s390x-gs-linux64. */ static const int s390x_te_ft_collect_regmap[] = { /* 64-bit PSWA and PSWM. */ @@ -335,6 +336,9 @@ get_ipa_tdesc (int idx) case S390_TDESC_TEVX: SET_REGMAP(s390x_te_ft_collect_regmap, 0); return tdesc_s390x_tevx_linux64; + case S390_TDESC_GS: + SET_REGMAP(s390x_te_ft_collect_regmap, 0); + return tdesc_s390x_gs_linux64; #else case S390_TDESC_32: SET_REGMAP(s390_linux32_ft_collect_regmap, 0); @@ -363,6 +367,9 @@ get_ipa_tdesc (int idx) case S390_TDESC_TEVX: SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0); return tdesc_s390_tevx_linux64; + case S390_TDESC_GS: + SET_REGMAP(s390_te_ft_collect_regmap, 0); + return tdesc_s390_gs_linux64; #endif default: internal_error (__FILE__, __LINE__, @@ -440,6 +447,7 @@ initialize_low_tracepoint (void) init_registers_s390x_te_linux64 (); init_registers_s390x_vx_linux64 (); init_registers_s390x_tevx_linux64 (); + init_registers_s390x_gs_linux64 (); #else init_registers_s390_linux32 (); init_registers_s390_linux32v1 (); @@ -450,5 +458,6 @@ initialize_low_tracepoint (void) init_registers_s390_te_linux64 (); init_registers_s390_vx_linux64 (); init_registers_s390_tevx_linux64 (); + init_registers_s390_gs_linux64 (); #endif } diff --git a/gdb/gdbserver/linux-s390-low.c b/gdb/gdbserver/linux-s390-low.c index 7de70f3a38..cc219e2ba9 100644 --- a/gdb/gdbserver/linux-s390-low.c +++ b/gdb/gdbserver/linux-s390-low.c @@ -1431,6 +1431,8 @@ s390_get_ipa_tdesc_idx (void) return S390_TDESC_VX; if (tdesc == tdesc_s390x_tevx_linux64) return S390_TDESC_TEVX; + if (tdesc == tdesc_s390x_gs_linux64) + return S390_TDESC_GS; #endif if (tdesc == tdesc_s390_linux32) @@ -1451,6 +1453,8 @@ s390_get_ipa_tdesc_idx (void) return S390_TDESC_VX; if (tdesc == tdesc_s390_tevx_linux64) return S390_TDESC_TEVX; + if (tdesc == tdesc_s390_gs_linux64) + return S390_TDESC_GS; return 0; }