From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72537 invoked by alias); 29 May 2018 09:03:27 -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 60423 invoked by uid 89); 29 May 2018 09:00:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=offer X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0082.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.82) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 May 2018 09:00:11 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com (10.172.226.148) by DB6PR0802MB2455.eurprd08.prod.outlook.com (10.172.251.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.797.11; Tue, 29 May 2018 09:00:00 +0000 Received: from DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64]) by DB6PR0802MB2133.eurprd08.prod.outlook.com ([fe80::d984:bdee:1856:c64%7]) with mapi id 15.20.0797.018; Tue, 29 May 2018 08:59:59 +0000 From: Alan Hayward To: "gdb-patches@sourceware.org" CC: nd Subject: [PING 2][PATCH 0/8] Add SVE support for Aarch64 GDB Date: Tue, 29 May 2018 12:09:00 -0000 Message-ID: <7A6AAE93-DCA8-4291-B4A8-9DDE7D334CA2@arm.com> References: <20180511105256.27388-1-alan.hayward@arm.com> In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DB6PR0802MB2455;7:guLfjJfStC1WZMbXnrMFniJlgkLaFHfJAau5ZoSCNBGlvXLrGJU9zT+OjLhTKRZaiGuVI3cCOktZ49NxLjhDzxpWTlOCOata3j9TuMhNvD9tbC3CNA9ll3LPZ7j8NBo1n3yien+U1uAt9X3roVbjyyuEBYLlkleR7SHOArGPB2bRkKnrEknnnwfuaESZn1UVy7lz6SXMf8BME+32Ddjhqm5OdRuT1LUlcWiqgepp+eXFeKAC1AdeaEimJOqEiuTU 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:DB6PR0802MB2455; x-ms-traffictypediagnostic: DB6PR0802MB2455: 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)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:DB6PR0802MB2455;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0802MB2455; x-forefront-prvs: 0687389FB0 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(396003)(366004)(39860400002)(376002)(39380400002)(199004)(189003)(57306001)(2900100001)(68736007)(50226002)(83716003)(186003)(8936002)(102836004)(25786009)(53546011)(6916009)(7736002)(26005)(81156014)(72206003)(66066001)(6512007)(97736004)(5250100002)(86362001)(53936002)(478600001)(5660300001)(36756003)(76176011)(2501003)(8676002)(316002)(5640700003)(2906002)(2616005)(3280700002)(106356001)(14454004)(11346002)(2351001)(33656002)(99286004)(6436002)(446003)(4326008)(486006)(105586002)(6486002)(305945005)(3846002)(81166006)(476003)(6506007)(6116002)(82746002)(3660700001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0802MB2455;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: YjLxZ6UQhfgPdy6DLjVjtV+uoFsLQ3lhhcjOdKSM8cgDTJcZf3qLPRJR2O0wFmKj0NKv9nnV1FGZzT1hHH/yKX8MC2TWaHmSAwhHOmUvyCagpSiJr4IRf8bbiH/+nhiLZF5NYxw3oNxopcyLXc7257X7/L5PEtqTxPYjxArQJNnfP25pZyw3hHj9UU1Z/vqW spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 477e2f69-91cf-4f6a-0652-08d5c5428ee8 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 477e2f69-91cf-4f6a-0652-08d5c5428ee8 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 May 2018 08:59:59.8564 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2455 X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00752.txt.bz2 Ping ping. Thanks, Alan. > On 22 May 2018, at 09:34, Alan Hayward wrote: >=20 > Ping. >=20 >=20 > Thanks, > Alan. >=20 >> 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 agnost= ic. >> 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 consta= nt >> 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) i= f the >> vector length has changed. A future set of patches will offer full suppo= rt. >>=20 >> This series does not support gdbserver. However, where it makes sense I = have >> commonised as much code as possible and have added the groundwork in >> gdbserver. Enabling gdbserver should be a small set of additional patche= s. >>=20 >> Core files and watchpoints are not yet supported. >>=20 >> The vector length is read from ptrace and is required to create the targ= et >> description for the running process. There is no hardcoded SVE XML. >>=20 >> The patches require recent linux header files for all the SVE ptrace mac= ros. >> 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 soluti= on. >> 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 = can >> 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 m= ake >> 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 >=20