From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yZ20IZK1A2rsYDQAWB0awg (envelope-from ) for ; Tue, 12 May 2026 19:19:46 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Qc3VLYjY; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Qc3VLYjY; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 855BB1E0C3; Tue, 12 May 2026 19:19:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7C3C41E067 for ; Tue, 12 May 2026 19:19:45 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 294844BB5886 for ; Tue, 12 May 2026 23:19:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 294844BB5886 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Qc3VLYjY; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Qc3VLYjY Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11013070.outbound.protection.outlook.com [52.101.72.70]) by sourceware.org (Postfix) with ESMTPS id 61F1E4BB3BD3 for ; Tue, 12 May 2026 23:18:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 61F1E4BB3BD3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 61F1E4BB3BD3 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.72.70 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1778627910; cv=pass; b=eGSPtQ41q3Q9snHg64VmWtVFfZGTW2HsU82xUUz/T7FykuxT5ib9JM775JhHR25jEaXrpfxbe+EIQi5eFIbC9cfntClwRnV41PkCaEHTA+gb/C8vsEje2rDtSEJ2umVWUWvFygxpPYKCbYQxO4FcvUWBhE1ypqMULRKCmK8EB1c= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1778627910; c=relaxed/simple; bh=PqWWZY26uRuhDbLzwWSMh5e+eRp5LJ4Ep0nbmzuKq4c=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=q0we0x7Nl2fZ4U3cv+k0F5vtCdFCA7Sw1o8+8ymEWTieGf2IKZ+RbXepVyx1LsRNGtD7HPFG1nbMDQjd6g2zrCP7VdJfHJo5BjsuHXuCXltDfqpyWnNjIln4IgSGqL5ArI0VJJFGy+Twk4TJ4Z9+zEULh7CuSRgID/vOuv/1tww= ARC-Authentication-Results: i=3; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Qc3VLYjY; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Qc3VLYjY DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61F1E4BB3BD3 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=XjKuUMS4SuoKUiTplXba2oDyAYTfyVgl9rUCm7cCko9w4XxXEtGtBlA6mLLVnkv9nUkUjhnAbE9qewZNFnIf0j40SRHjy6LyctS+U9y4h7yAg9yiwx4x6dhNMtzeHTMxTyqE0i8t8aQbMykAfyvyXVMvrOlt83YYs+tuT0F9xi7gsZe+D42qYTf+RMHSHRi+FzVUTcYGMXZY83W1L9yBRs0NxBaTPakdELk0T8NZvOFCjiwCgx44IYT/RbsszcbhbJtpsHaCbfUoj1wyb5AnHQGXXU72h7hnFQbGQXUqBieYAHoIfx9fB0fr52VckFwv5FCinJgLfVi4YWwXpAytdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gN+kU/TV6xUROyqDGDa/bLDrTYTKAiG46UmMMsf0Q18=; b=fyB6A+JauRkrZMwSWaqSojc5++jBzaMfg/Xyd3vXfJCX0pYVV5T9iPQgZEUn6bpwXuFEVmiqjEks6zcR3a1Z4B/guPUFZYWTj6R2VOIl6VVhFF30fCbnytx4s5KHBH9b7UC4ohvtesn5nFZSfz+bFnQypOs3lyKv082Zdrpu9lJSmdzOaOmbQvm6kUuljAVBRClO7mz0EJBk90sqrMr/yr1LINPErVClW9drgE+qQAMcYz5n5GU1GcqHeIDPrqdJjs/KZp9SGclqPwXwhLFqlD8Ci4kvfwYkqcTXlt1GJddbNqo8NLJkTq52aWA/OSY3fM+Um2GgIEMSGRROJ8kS6Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gN+kU/TV6xUROyqDGDa/bLDrTYTKAiG46UmMMsf0Q18=; b=Qc3VLYjYfTBK5WlYZzNQtm0GhydyWiyC/A7IMQMLskOkSv6LI3MwOrhl5VcPq1OPb7ogUPS6yGAIZWgeuEuYy5XiVX+XshiI57C5vHNaEZgWE3eBxuuQXMGCkeMlA8st/MiLwBjDHF3mfBlPkZWkaO4VdlG0b5PmEmDTplkVdDw= Received: from PR3P189CA0030.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::35) by GVXPR08MB11471.eurprd08.prod.outlook.com (2603:10a6:150:2e3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9913.11; Tue, 12 May 2026 23:18:16 +0000 Received: from AM4PEPF00025F9C.EURPRD83.prod.outlook.com (2603:10a6:102:52:cafe::b0) by PR3P189CA0030.outlook.office365.com (2603:10a6:102:52::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.25.17 via Frontend Transport; Tue, 12 May 2026 23:18:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by AM4PEPF00025F9C.mail.protection.outlook.com (10.167.16.11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.48.3 via Frontend Transport; Tue, 12 May 2026 23:18:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X+2q9fBj5Cr01ucqqWqJPrqyNxWSuZkjz3zHwBQhmVdzNNgMshWYypGvHygcFwP3ZYf2ritg+Xu56EZigBNxiPlirwZH8iBnvIdM/Gaoj2wFp3CCg1lhWy/ErEGr52UZEMcITF7uqImkwadqYrPpgJFWa9A9DtL6HmPe7CdpYaZLqb1ol0/h6jTDqrB+3IB8yvEUgmu39SrAQKSZ2cxrQ+TRSzX4bdlAq/T2eqebnOw2Oa9lATyMhMIm3iefIvdH4tbXrUh9o6EnkGnuzWmW5o+SwIn7HKJLflUDpcdV2MJPfUUxD/Lyh7BXoAfuAKhMjlYAYvQYTIUVGirC7e/KKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gN+kU/TV6xUROyqDGDa/bLDrTYTKAiG46UmMMsf0Q18=; b=Z0nbJGUtC3c2pwAfRpLjDwU5zwq+lOC3gHYsrw/T3E1rWTz/EG15FwC/fU1wIzOHtKewRPusIdsTWz3avTo77m1rRjxIVrp7FKntAAlfok+v5V2CTreHF+yfoVvsdPWsRWBCKLETx6iVBqAplFWUIT2YBqUId7SmLylM1CiFTM78klbi5+YqvS/GgCSAsr+OB8GPyGQidzEu8LUVSAbkSsC9j14akjZT4hANmRQMviBzvrm5V1vIyc7BpVDYVsM9b06KEXrBUFj/URvmCupTXi7TEmL39R/M/iWIjkjg0/nWa8etZR9uREuMbB2ALRkhang98lxFoYFeYPbGSEq3ug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gN+kU/TV6xUROyqDGDa/bLDrTYTKAiG46UmMMsf0Q18=; b=Qc3VLYjYfTBK5WlYZzNQtm0GhydyWiyC/A7IMQMLskOkSv6LI3MwOrhl5VcPq1OPb7ogUPS6yGAIZWgeuEuYy5XiVX+XshiI57C5vHNaEZgWE3eBxuuQXMGCkeMlA8st/MiLwBjDHF3mfBlPkZWkaO4VdlG0b5PmEmDTplkVdDw= Received: from DU6P191CA0060.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:53e::10) by AS8PR08MB7354.eurprd08.prod.outlook.com (2603:10a6:20b:445::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9913.11; Tue, 12 May 2026 23:17:10 +0000 Received: from DB1PEPF0003922E.eurprd03.prod.outlook.com (2603:10a6:10:53e:cafe::29) by DU6P191CA0060.outlook.office365.com (2603:10a6:10:53e::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9913.12 via Frontend Transport; Tue, 12 May 2026 23:17:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by DB1PEPF0003922E.mail.protection.outlook.com (10.167.8.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9913.8 via Frontend Transport; Tue, 12 May 2026 23:17:10 +0000 Received: from AZ-NEU-EXJ02.Arm.com (10.240.25.139) by AZ-NEU-EX03.Arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 12 May 2026 23:17:09 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EXJ02.Arm.com (10.240.25.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 12 May 2026 23:17:09 +0000 Received: from D2G2X7XGD1.arm.com (10.57.69.127) by mail.arm.com (10.240.25.138) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Tue, 12 May 2026 23:17:08 +0000 From: To: CC: , , , Ezra Sitorus Subject: [PATCH v2 2/4] gdb/aarch64: Test record/replay support for CSSC Date: Wed, 13 May 2026 00:17:05 +0100 Message-ID: <20260512231707.18123-3-Ezra.Sitorus@arm.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260512231707.18123-1-Ezra.Sitorus@arm.com> References: <20260512231707.18123-1-Ezra.Sitorus@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF0003922E:EE_|AS8PR08MB7354:EE_|AM4PEPF00025F9C:EE_|GVXPR08MB11471:EE_ X-MS-Office365-Filtering-Correlation-Id: ac28ae12-c457-4411-fc67-08deb07cbf31 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700016|82310400026|376014|1800799024|13003099007|11063799003|3023799003|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: OTZNjqYxypkXnYgSpW5GEMkcMIHGGxrV83WzND6jfXAFGlQX4qd8zgKsnKAj69i4WpgQvTeQVhoZ4YdR2u+VV0XlNL31EpqkpSEQwJZV3GQMBU8jb9aeOlrJioqQaDvRrCxlWPIazC9q9Jk9cHSJjX0AqZWR+QvDKpezn9C1VIHApLvxDezeAlTozQjUWJTaoc6eV9ZbJ9S3htdcCWCfQbm2vr1cCtw4JbOsYLX3x+QHomNBw9BIU8e/Xjw3nBQlRheTJOHtpvZmK1sYU2mwdxlVebqpRBePdveVYvtckLJwz86F1g4xKKPwXtqcpwzfANRAqL6RxTEaGlrx4jzlFz0mUfyQekLueaVbemeYgkM7nUDz2QT4LxYM/PXxzWoa8GOFQqt8YtwRtpLSYnQFYy+Ov3dYEHBFeW7vqYE5ZX7GccRrao4syTPqH9ia/4Q0hFSJJrg+x2ABEFC2x/gffswgglYyL5YSUFu/HojmTn0eMUpTTOZKwUgSNMHbTJhKvnNZ8k5w8EqO2nsqWMb+livoUVSLit5XAEMFd563OB8c37etq6lsNWbmj8OWZwHrmHmgNHSGYoLZAWnNANPdkF0uQGv6TNmkry5ccTm96IfCs+Pyeqa+AouCNqZZYn0c9RKvum3Jm5N8XwIiWFAa7vqXH1Yibu5/D6yNLDk3L84b/GtlFsQ4t45hO4xmXsgx X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700016)(82310400026)(376014)(1800799024)(13003099007)(11063799003)(3023799003)(56012099003)(18002099003)(22082099003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: wj9c/MKs3YRC1f2Hrg31zrp3RR8Q4HJaIth5icMS3YXlQtCvvsYJhXp4C8brH89XhpG0E16YlkgQDzLkOJ6emisVHYhtuSqIijPNJ0Q89Lfcqeop1tnhKIhCU81XdLeVM+F2pAsNi8GZ4EjbNH5RFbpNghKCSLjzT70AWFgNiwKufwV3DKBD14I9P/rHn7nma41Ql6B3/DMUyGH4HNY322M2dXoFvDwuGkQoRzO6wpUSjCGOW7pPtx4aTM7lV7KfVs/RD1aDgWP8HMMCWXtoywcg7nuSPUm6ezD42lUhVhtQ0vB9dvIdu0n0HIX1A50mNCuDNbp6HjZouccNegeo7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7354 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F9C.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d9c5a7c8-d55e-48f1-2013-08deb07c9811 X-Microsoft-Antispam: BCL:0; ARA:13230040|14060799003|1800799024|376014|36860700016|82310400026|35042699022|13003099007|56012099003|3023799003|11063799003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: 3QLkHFrX01wMedNFfRZg6Od4asUTMofIzoL/uBKmiqFlctOGS8xFyeJp/d9pj24K8dUJqaK4XJWHKruO3REgK42W5E/LmgrymjIg780gjcdsQG/ZUpB/P7zrtAyhAyUEW5Nn1SEIe5dqSUWzSsYwWb1Zn1NqLgJj9QEMRopY7iVHSPrItxjh6JzORksBNkcwukfXsfASCspN0CDIRhGt150iiba3m45+laTJ4Z7Cie0PULuIEPxIwnviZUsUe2rRRRMphPzNxVp8IK7dJd1en3/EvvymIDZeCwkBOkVgXupxlmr6yXSKljU9/bcIsqAYB9qLm0goP8x/gRuax7SJmyntV+aNXLvTwjvl0hUFztsE/AhzKF37oGWCzl29CM3u84O19HS5DhkDfJZO0bW8m08Ugczfs9bg760Lr0MBbz/N/lVlb5xfOwyIADw5BaMUf5TV+sy/KLOZ/uQp6IrP6IIuLaMbS2grz/RfVAJIuxYTDZxx+2R4jzF6lm0SjS/Du9J+XYCArAhuCONsZ/rITbwMxP1yzkvCMsu/sboIGkQrwvPRIwsUA8UH7dP4Ntg5truzmJMOmoHuPZEIxusdxqJN5xV+VP6cwQ2eP9zHs+zqA8RZ2WBatVP6+IXfkpc4uMZZn7xBwSW+DiAYwbPTJ/LU1h4Z3a/hF374sP+g2CDCdYtzjEo/5qn5Wc/gy1WK X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(14060799003)(1800799024)(376014)(36860700016)(82310400026)(35042699022)(13003099007)(56012099003)(3023799003)(11063799003)(22082099003)(18002099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0uBDC+kb3k1qn/h7mbfaoPwTR5UfrQeMoN+wrYCAqx7nwtmjqfJAqM/yZMytPpRk2vJ7U1mRsuZI7DltbhhK8b/cl17RZZ8hnyWYx3wsf0qK6yWqXSkMXs3dnUXkdMH6nsWwYTSl9ruUpDnPgUj0ILSysdPHssOC3YpgNGqQpw8Ot9eSEvLSC56VYUNXe5gTiC2+k350L0JIKjU2ngVmxWi5pK8/+m3lVM82XYdcd0opOpJwApiDr9KjOH2PhnGv8/A9cFzNftK5dtmZgrckO0HHo/nI193E4swmXdgB8Gn3gXakR9UzhLjrGRDSl9lveLHOF2EwCyRUg7g8zyko8WxZZ/l3WmfF+xX86jtqRXPhN1F/VgzNsAlAjZZmrlalJfoRvtRw6Zmbe3FCCHl7YZpKzYmS48/AWfh94ESMerA91nWv7Z8v8WWjObl+BazA X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2026 23:18:16.2322 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac28ae12-c457-4411-fc67-08deb07cbf31 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F9C.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB11471 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: Ezra Sitorus GDB can handle AArch64's CSSC instructions but there were no tests ensuring that and ensuring no regressions would creep in. This commit adds some tests for these instructions. This was tested on aarch64-none-linux-gnu on QEMU with CSSC support. --- gdb/testsuite/gdb.reverse/aarch64-cssc.c | 88 +++++++++++++ gdb/testsuite/gdb.reverse/aarch64-cssc.exp | 139 +++++++++++++++++++++ gdb/testsuite/lib/gdb.exp | 52 ++++++++ 3 files changed, 279 insertions(+) create mode 100644 gdb/testsuite/gdb.reverse/aarch64-cssc.c create mode 100644 gdb/testsuite/gdb.reverse/aarch64-cssc.exp diff --git a/gdb/testsuite/gdb.reverse/aarch64-cssc.c b/gdb/testsuite/gdb.reverse/aarch64-cssc.c new file mode 100644 index 00000000..67ccb68e --- /dev/null +++ b/gdb/testsuite/gdb.reverse/aarch64-cssc.c @@ -0,0 +1,88 @@ +/* This test program is part of GDB, the GNU debugger. + + Copyright 2024-2026 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#define PREPARE_REGS(X, Y, Z) \ + __asm__ volatile ("mov x19, %0\n" : : "r"(X): "x19"); \ + __asm__ volatile ("mov x20, %0\n" : : "r"(Y): "x20"); \ + __asm__ volatile ("mov x21, %0\n" : : "r"(Z): "x21"); + +int +main (void) +{ + const uint64_t a = 0x0123456789abcdef; + const uint64_t b = 0xfedbca9876543210; + const uint64_t c = 0xdeadbeefc001face; + + PREPARE_REGS (a, b, c); + /* Before abs. */ + __asm__ volatile ("abs x19, x21\n" ::: "x19"); + /* After abs. */ + + PREPARE_REGS (a, b, c); + /* Before cnt. */ + __asm__ volatile ("cnt x19, x20\n" : :: "x19"); + /* After cnt. */ + + PREPARE_REGS (a, b, c); + /* Before ctz. */ + __asm__ volatile ("ctz x19, x20\n" : :: "x19"); + /* After ctz. */ + + PREPARE_REGS (a, b, c); + /* Before smax-1. */ + __asm__ volatile ("smax x19, x20, #10\n" : :: "x19"); + /* After smax-1. */ + + PREPARE_REGS (a, b, c); + /* Before smax-2. */ + __asm__ volatile ("smax x19, x20, x21\n" : :: "x19"); + /* After smax-2. */ + + PREPARE_REGS (a, b, c); + /* Before smin-1. */ + __asm__ volatile ("smin x19, x20, #10\n" : :: "x19"); + /* After smin-1. */ + + PREPARE_REGS (a, b, c); + /* Before smin-2. */ + __asm__ volatile ("smin x19, x20, x21\n" : :: "x19"); + /* After smin-2. */ + + PREPARE_REGS (a, b, c); + /* Before umax-1. */ + __asm__ volatile ("umax x19, x20, #10\n" : :: "x19"); + /* After umax-1. */ + + PREPARE_REGS (a, b, c); + /* Before umax-2. */ + __asm__ volatile ("umax x19, x20, x21\n" : :: "x19"); + /* After umax-2. */ + + PREPARE_REGS (a, b, c); + /* Before umin-1. */ + __asm__ volatile ("umin x19, x20, #10\n" : :: "x19"); + /* After umin-1. */ + + PREPARE_REGS (a, b, c); + /* Before umin-2. */ + __asm__ volatile ("umin x19, x20, x21\n" : :: "x19"); + /* After umin-2. */ + + return 0; +} diff --git a/gdb/testsuite/gdb.reverse/aarch64-cssc.exp b/gdb/testsuite/gdb.reverse/aarch64-cssc.exp new file mode 100644 index 00000000..1e2980a6 --- /dev/null +++ b/gdb/testsuite/gdb.reverse/aarch64-cssc.exp @@ -0,0 +1,139 @@ +# Copyright 2024-2026 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Test instruction record for AArch64 FEAT_CSSC instructions. +# Based on gdb.reverse/aarch64-mops.exp +# +# The basic flow of the record tests are: +# 1) Stop before executing the instructions of interest. Record +# the initial value of the registers that the instruction will +# change, i.e. the destination register. +# 2) Execute the instructions. Record the new value of the +# registers that changed. +# 3) Reverse the direction of the execution and execute back to +# just before the instructions of interest. Record the final +# value of the registers of interest. +# 4) Check that the initial and new values of the registers are +# different, i.e. the instruction changed the registers as expected. +# 5) Check that the initial and final values of the registers are +# the same, i.e. GDB record restored the registers to their +# original values. + +require allow_aarch64_cssc_tests +standard_testfile + +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ + [list debug additional_flags=-march=armv8-a+cssc]] } { + return +} + +if {![runto_main]} { + return +} + +gdb_test_no_output "record full" + +proc test_single_asm { name } { + with_test_prefix $name { + set before_seq [gdb_get_line_number "Before ${name}"] + set after_seq [gdb_get_line_number "After ${name}"] + set regs { x19 x20 x21 } + + set insn [lindex [split $name "-"] 0] + + gdb_test "break $before_seq" \ + "Breakpoint ${::decimal} at ${::hex}: file .*/aarch64-cssc.c, line ${::decimal}\\." \ + "$insn: break before instruction sequence" + gdb_continue_to_breakpoint "$insn: about to execute instruction sequence" \ + [multi_line ".*/aarch64-cssc.c:${::decimal}" \ + "${::decimal}\[ \t\]+__asm__ volatile \\(\"${insn} .*\".*"] + + # Depending on the compiler, the line number information may put GDB a few + # instructions before the beginning of the asm statement. + arrive_at_instruction $insn + # Add a breakpoint that we're sure is at the prologue instruction. + gdb_test "break *\$pc" \ + "Breakpoint ${::decimal} at ${::hex}: file .*/aarch64-cssc.c, line ${::decimal}\\." \ + "$insn: break at prologue instruction" + + # Record the initial register values. + foreach r $regs { + set ${r}_initial [capture_command_output "info register $r" ""] + } + + gdb_test "break $after_seq" \ + "Breakpoint ${::decimal} at ${::hex}: file .*/aarch64-cssc.c, line ${::decimal}\\." \ + "$insn: break after instruction sequence" + gdb_continue_to_breakpoint "$insn: executed instruction sequence" \ + [multi_line ".*/aarch64-cssc.c:${::decimal}" ".*"] + + # Record the new register values. + foreach r $regs { + set ${r}_new [capture_command_output "info register $r" ""] + } + + # Execute in reverse to before the instruction sequence. + gdb_test_no_output "set exec-direction reverse" + + gdb_continue_to_breakpoint "reversed execution of instruction sequence" \ + [multi_line ".*/aarch64-cssc.c:${::decimal}" \ + "${::decimal}\[ \t\]+__asm__ volatile \\(\"${insn} .*\".*"] + + # Record the final register values. + foreach r $regs { + set ${r}_final [capture_command_output "info register $r" ""] + } + + foreach v { x19 x20 x21 } { + gdb_assert ![string compare [set ${v}_initial] [set ${v}_final]] \ + "$insn: check $v initial value versus $v final value" + } + + gdb_assert [string compare [set x19_initial] [set x19_new]] \ + "$insn: check x19 initial value versus x19 new value" + + foreach v { x20 x21 } { + gdb_assert ![string compare [set ${v}_initial] [set ${v}_new]] \ + "$insn: check $v initial value versus $v new value" + } + + # Restore forward execution and go to end of recording. + gdb_test_no_output "set exec-direction forward" + gdb_test "record goto end" \ + [multi_line \ + "Go forward to insn number ${::decimal}" \ + "#0 main \\(\\) at .*/aarch64-cssc.c:${::decimal}" \ + ".*"] + } +} + +set cases { + { abs } + { cnt } + { ctz } + { smax-1 } + { smax-2 } + { smin-1 } + { smin-2 } + { umax-1 } + { umax-2 } + { umin-1 } + { umin-2 } +} + +foreach c $cases { + lassign $c insn + test_single_asm $insn +} diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3f3197cb..9d5c0e5a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5350,6 +5350,58 @@ gdb_caching_proc allow_aarch64_lrcpc3_tests {} { return $allow_lrcpc3_tests } +# Run a test on the target to see if it supports the AArch64 CSSC feature. +# Return 1 if so, 0 if it does not. Note this causes a restart of GDB. + +gdb_caching_proc allow_aarch64_cssc_tests {} { + global srcdir subdir gdb_prompt inferior_exited_re + + set me "allow_aarch64_cssc_tests" + + if { ![is_aarch64_target]} { + return 0 + } + + set compile_flags "{additional_flags=-march=armv8-a+cssc}" + + # Compile a test program reading CSSC. + set src { + int main() { + asm volatile ("abs x0, x1" ::: "x0"); + return 0; + } + } + + if {![gdb_simple_compile $me $src executable $compile_flags]} { + return 0 + } + + # Compilation succeeded so now run it via gdb. + clean_restart + gdb_load $obj + gdb_run_cmd + + gdb_expect { + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "\n$me cssc support not detected" + set allow_cssc_tests 0 + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: cssc support detected" + set allow_cssc_tests 1 + } + default { + warning "\n$me: default case taken" + set allow_cssc_tests 0 + } + } + gdb_exit + remote_file build delete $obj + + verbose "$me: returning $allow_cssc_tests" 2 + return $allow_cssc_tests +} + # Run a test on the target to see if it supports AArch64 MOPS (Memory # Operations) extensions. Return 1 if so, 0 if it does not. Note this # causes a restart of GDB. -- 2.53.0