From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37441 invoked by alias); 22 May 2018 08:34:32 -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 37426 invoked by uid 89); 22 May 2018 08:34:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=ideal, regcachec, XML, UD:regcache.c X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr50083.outbound.protection.outlook.com (HELO EUR03-VE1-obe.outbound.protection.outlook.com) (40.107.5.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 May 2018 08:34:29 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2278.eurprd08.prod.outlook.com (10.172.227.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.16; Tue, 22 May 2018 08:34:26 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::a8b9:5070:6d84:1000]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::a8b9:5070:6d84:1000%14]) with mapi id 15.20.0776.015; Tue, 22 May 2018 08:34:26 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd Subject: Re: [PATCH 0/8] Add SVE support for Aarch64 GDB Date: Tue, 22 May 2018 11:00:00 -0000 Message-ID: References: <20180511105256.27388-1-alan.hayward@arm.com> In-Reply-To: <20180511105256.27388-1-alan.hayward@arm.com> x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0802MB2278;7:hiO87wEe4K5vvpYIBA+LHbiRcjC/5C9nQfZ9xF5Btj77+bK/AnYBGJdegAU8QmW3iNqKGvwbuHRSOay9RlPgqqKKJwD4q1yoqJ+Ob9JT3SvdfdVmwkJU9PMe6d35CfaFo71FZXjeFRLchifZU2tcSIxzGuMP81pLbIpmHGgzhQTDgCQ9TPzNOZ9o0PAZyBTpamIhpyES1VwJvI56eWRZCQbC30YnCexaLSxyzVlA7MIBS6k2llCKokDdAfQSRbRv x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DB6PR0802MB2278; x-ms-traffictypediagnostic: DB6PR0802MB2278: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016);SRVR:DB6PR0802MB2278;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0802MB2278; x-forefront-prvs: 0680FADD48 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(39380400002)(346002)(376002)(396003)(366004)(199004)(189003)(11346002)(476003)(486006)(446003)(105586002)(478600001)(8676002)(2616005)(33656002)(5250100002)(76176011)(6486002)(305945005)(72206003)(82746002)(6436002)(106356001)(229853002)(2900100001)(316002)(6916009)(97736004)(2351001)(99286004)(68736007)(2501003)(7736002)(3280700002)(53936002)(53546011)(6506007)(3660700001)(86362001)(25786009)(5660300001)(2906002)(102836004)(83716003)(36756003)(26005)(186003)(6116002)(6512007)(6246003)(81156014)(14454004)(5640700003)(66066001)(57306001)(81166006)(3846002)(50226002)(4326008)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2278;H:DB6PR0802MB2133.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: z709P1rMV3DdifwoXp9d71CVAq57gvAb4X7YkieSG0o7IUfP/vHD5esHKmGfdpavGZNZOydGOHljas9aObXOf10pRgFQfoLFTxGNkb4H6X/VqamOTyCs0URqkHGXNhN0xcCNZGBUYTTtd9MofoxKsWkr72MrP4mKMlpTLQaB8aBJibFafZRrOqGrNPc2HIX+ spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <2327B96039C59D4CAF1B75B386148BEF@eurprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5dc56197-bd46-4847-20a2-08d5bfbed3da X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dc56197-bd46-4847-20a2-08d5bfbed3da X-MS-Exchange-CrossTenant-originalarrivaltime: 22 May 2018 08:34:26.1147 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2278 X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00536.txt.bz2 Ping. Thanks, Alan. > On 11 May 2018, at 11:52, Alan Hayward wrote: >=20 > This set of patches adds gdb support for SVE on AArch64. >=20 > SVE is the new vector extension for Aarch64. SVE is different in that the > length of a vector register is not fixed - it is can vary for different > hardware implementors. All code compiled for SVE is vector length agnosti= c. > The Linux kernel can then further restrict the vector length up to the > supported maximum for the hardware. Potentially different process and > threads can have different vector lengths, and they could change at any > time. However, in practice, we expect the vector length to remain constant > across the lifetime of a process. > This set of patches assumes the vector length will not change and either > warns once (when reading registers) or errors (when writing registers) if= the > vector length has changed. A future set of patches will offer full suppor= t. >=20 > This series does not support gdbserver. However, where it makes sense I h= ave > commonised as much code as possible and have added the groundwork in > gdbserver. Enabling gdbserver should be a small set of additional patches. >=20 > Core files and watchpoints are not yet supported. >=20 > The vector length is read from ptrace and is required to create the target > description for the running process. There is no hardcoded SVE XML. >=20 > The patches require recent linux header files for all the SVE ptrace macr= os. > To allow builds for older headers, I've added all required macros and > structures within ifdef checks. I'm not sure if this is the ideal solutio= n. > When including kernel header code, I've not performed any reformatting (ie > they are not in GNU style). >=20 > One of the later patches adds functions to gdbserver regcache so that I c= an > add common functionality that works on gdb and gdbserver. >=20 > Given there are no working SVE systems available today, this was manually > tested on an Aarch64 SVE emulator running Ubuntu. In addition I've run ma= ke > check on X86 and Aarch64 builds for both unix and native-gdbserver. >=20 >=20 > Alan. >=20 > Alan Hayward (8): > Add Aarch64 SVE target description > Function for reading the Aarch64 SVE vector length. > Add SVE register defines > Enable SVE for GDB > Add aarch64 psuedo help functions > Aarch64 SVE pseudo register support > Add methods to gdbserver regcache and raw_compare > Ptrace support for Aarch64 SVE >=20 > gdb/Makefile.in | 1 + > gdb/aarch64-linux-nat.c | 60 +++++- > gdb/aarch64-linux-tdep.c | 5 +- > gdb/aarch64-tdep.c | 402 +++++++++++++++++++++++--------= ----- > gdb/aarch64-tdep.h | 12 +- > gdb/arch/aarch64.c | 12 +- > gdb/arch/aarch64.h | 37 +++- > gdb/configure.nat | 2 +- > gdb/doc/gdb.texinfo | 4 + > gdb/features/aarch64-sve.c | 158 ++++++++++++++ > gdb/gdbserver/Makefile.in | 1 + > gdb/gdbserver/configure.srv | 1 + > gdb/gdbserver/linux-aarch64-tdesc.c | 3 +- > gdb/gdbserver/regcache.c | 55 ++++- > gdb/gdbserver/regcache.h | 8 + > gdb/nat/aarch64-sve-linux-ptrace.c | 315 ++++++++++++++++++++++++++++ > gdb/nat/aarch64-sve-linux-ptrace.h | 193 +++++++++++++++++ > gdb/regcache.c | 17 ++ > gdb/regcache.h | 2 + > 19 files changed, 1122 insertions(+), 166 deletions(-) > create mode 100644 gdb/features/aarch64-sve.c > create mode 100644 gdb/nat/aarch64-sve-linux-ptrace.c > create mode 100644 gdb/nat/aarch64-sve-linux-ptrace.h >=20 > --=20 > 2.15.1 (Apple Git-101) >=20