From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eeO1FgohTWocLysAWB0awg (envelope-from ) for ; Tue, 07 Jul 2026 11:53: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=Ik6MifaR; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ik6MifaR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 57BFF1E024; Tue, 07 Jul 2026 11:53: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=-5.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 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 ACF721E024 for ; Tue, 07 Jul 2026 11:53:45 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 429CA4BA23D9 for ; Tue, 7 Jul 2026 15:53:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 429CA4BA23D9 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=Ik6MifaR; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ik6MifaR Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011044.outbound.protection.outlook.com [52.101.70.44]) by sourceware.org (Postfix) with ESMTPS id E519E4BA23E0 for ; Tue, 7 Jul 2026 15:52:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E519E4BA23E0 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 E519E4BA23E0 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.70.44 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1783439542; cv=pass; b=gl4JL0A/1jBjJkcVYkQY/fl7USkt/VH9IxrbR1stFjIMumMZxxrcqtdrY3pKl8I+zBJy3niQ0c5DCeS54lBH5fI8YcAzUjrp9eVK8cdmhzbMG9MbdFkrQEpJ0KwnjKVgCSwukVsh9SQoHsKzMZIIF8lTvE11GGW9dsI/SRU2RcM= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1783439542; c=relaxed/simple; bh=TwufDckUyTrzsGGfnEpoQ1WuQTFiwli46/R/sMn123U=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=jmd8gKXp5vTIRDtcNW/sKcd3fUVkDy1OShhb03vB8l86+Ct3Lm6nOfRaEgNjoaaUDlx6dwnk46xE+MA0//PNFhil2EFbZPrFvBDVd/4PQ1w3oxlwp7DnLszeo7wlXP5N3juSgO/yqrbodaCKmI62ae65HP3y0VwmvFOQMMN5R9A= 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=Ik6MifaR; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Ik6MifaR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E519E4BA23E0 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=LttxY7HdO63ASYTq31PIOKlgWHxMrtBVCJMJXLly03DeYhL2IK68yjcW9Vcmt2dNZZKZKAkaD7q+bpzdGAWyf7z5cO508qZY1scd7P/ZGHCHbyxZNbUyAkIpuzpe2nuZTKmvR4lXCNBKsIyg5qB4tGRHce6NkBvcIej2tsv6INjYC6lOSH8XLx6P8AcmPIXsWt0r3zV5gqnEbWcVizt86X4vOg1s10/Wbe/5+b4dvBR22kJW1BzXr/+uXxOX4w4GSoe4wM+lQFsBvXJKGIvqt1LdXSux9izCHk5WOLhWnbI5r1xwiwBJoahl4jHJT3J1tgueM9D4dCtRaMsjvx99nA== 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=SXL/DJJTgB20Y17Su3K448BpoyaLoHQAhcZ5dM+LE6w=; b=S1NI/0XXfrioFFos1mQ+GS7fKiRMDkRnUBTOW6AjGiFLt6OfR1cxBVgU1XDFWm4Ra7gf0jR+IKixtHPi/AtGXePh0V+Vnqe0HWwWPgwmJE/pkvdR7b19q1InrZRipJIPnsS2e1DLq5xgGJg9CogoAVzFIsTVD4Tsupi5sp01A70ONhOrppsbgvc2jhIQASdTks5E9/VF+py5fScr4UBB8nerje8XbnyI3Ob3P9ldzHIgF7z4CoLmlrBbRdhCE3G6KIupakaz5oxywSHkfJ+qR2pJQYgpzzv8UO7yYp7Qp33LfxTuuS20OrHfUjNfhRvZvNP+ZlnpiIJsBGWlyQSIXg== 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=SXL/DJJTgB20Y17Su3K448BpoyaLoHQAhcZ5dM+LE6w=; b=Ik6MifaRUwevovxzLQekEDXfgBICWHGGOMz6nbMJChMjgd+ei9s+47N/7sG2FSOEIpBF2D+ed1zpnuOm8qGxYh3XxH+lx1+YYy/DmxnpM7/R0PjeJkmuh/Y7Sz2muemxvu93qpnkNxJMmDA0rpRh4tOdKoWK+cdkknT5JCk+5Vs= Received: from AM8P190CA0021.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:219::26) by DU0PR08MB8930.eurprd08.prod.outlook.com (2603:10a6:10:465::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.8; Tue, 7 Jul 2026 15:52:14 +0000 Received: from AM4PEPF00027A67.eurprd04.prod.outlook.com (2603:10a6:20b:219:cafe::4e) by AM8P190CA0021.outlook.office365.com (2603:10a6:20b:219::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.181.8 via Frontend Transport; Tue, 7 Jul 2026 15:52:13 +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 AM4PEPF00027A67.mail.protection.outlook.com (10.167.16.84) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.181.6 via Frontend Transport; Tue, 7 Jul 2026 15:52:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ir2fH5PLmocMrhy7crFryT4/9XvSpRGrdioKJgB1WLfFAd6tWq3oz7Pc54ZpDkNyUL8GSrVIAwCg07/wDlWi8qCYrGxiAHUhPhf8d91mDFlxcnAMi58Z7MBf2gTGntm11T9uh1g9kU9AS8MLA9rff76bjfnYFI8QmGoMUcm+9NhPOU+w4IsZHj1l9ACtnLYlTBosKPO3u9HxjhkIZv9kf1lhlh+z1M9bYOHqgkCWYlzNwEL2Ud+Ed80HORqvaBd70Bmrjefg8CAeoUPtVNmcq0nS+4CppADhKPgcx5JixLKveGFqoWPrrc+5b0K0bj9tXhOmjJqU9dAybmWPeWQqcw== 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=SXL/DJJTgB20Y17Su3K448BpoyaLoHQAhcZ5dM+LE6w=; b=iZ77D8/cHwcc+rkHDEWjFfwwq/H1rjCF92d4eQlJUIDnkGpoXjbPTsFfnlpqfB6Vj+ZAjDXd9/3WuiXTxC/Nd/N+1E/ZbvthX1gDJpAqHXaL2jzmgWwmVNhapgESpwt/DJwSUhZwenZhu72Fphuyx4wrtMYUfJX45UUmdsJjA+1T2kkFD2VEKxCQKodILOvmJ852wGk6Hx1fRIMZU/kjFrSQo8LVjI4BujaoJxV4KbNlHn4tP7ARDZbybEtr/e+bYnVABCOJPs7mLwiqY2VHdNbowR9kPw1SYLPUZ8duZpNaBDmuQZQk0lOf0wD0XXJ10Mo+P3KaqKapVGX7laxzPw== 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=SXL/DJJTgB20Y17Su3K448BpoyaLoHQAhcZ5dM+LE6w=; b=Ik6MifaRUwevovxzLQekEDXfgBICWHGGOMz6nbMJChMjgd+ei9s+47N/7sG2FSOEIpBF2D+ed1zpnuOm8qGxYh3XxH+lx1+YYy/DmxnpM7/R0PjeJkmuh/Y7Sz2muemxvu93qpnkNxJMmDA0rpRh4tOdKoWK+cdkknT5JCk+5Vs= Received: from AM9P193CA0026.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:21e::31) by DB9PR08MB7511.eurprd08.prod.outlook.com (2603:10a6:10:302::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.10; Tue, 7 Jul 2026 15:51:08 +0000 Received: from AM1PEPF000252E1.eurprd07.prod.outlook.com (2603:10a6:20b:21e:cafe::74) by AM9P193CA0026.outlook.office365.com (2603:10a6:20b:21e::31) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.181.8 via Frontend Transport; Tue, 7 Jul 2026 15:51:07 +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 AM1PEPF000252E1.mail.protection.outlook.com (10.167.16.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.6 via Frontend Transport; Tue, 7 Jul 2026 15:51:07 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX04.Arm.com (10.240.25.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 7 Jul 2026 15:50:54 +0000 Received: from PF4S4363.arm.com (10.57.40.47) by mail.arm.com (10.240.25.138) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Tue, 7 Jul 2026 15:50:53 +0000 From: Matthieu Longo To: CC: Luis Machado , Luis Machado , Andrew Burgess , "Yury Khrustalev" , Pedro Alves , "Tom Tromey" , Matthieu Longo Subject: [PATCH v1 10/10] gdb/linux: add helpers to read AT_HWCAP3 and AT_HWCAP4 Date: Tue, 7 Jul 2026 16:49:00 +0100 Message-ID: <20260707154900.94542-11-matthieu.longo@arm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260707154900.94542-1-matthieu.longo@arm.com> References: <20260707154900.94542-1-matthieu.longo@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM1PEPF000252E1:EE_|DB9PR08MB7511:EE_|AM4PEPF00027A67:EE_|DU0PR08MB8930:EE_ X-MS-Office365-Filtering-Correlation-Id: 62cadb5a-2f9c-43c8-9856-08dedc3fb6a2 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|82310400026|36860700016|23010399003|376014|6133799003|18002099003|22082099003|11063799006|56012099006; X-Microsoft-Antispam-Message-Info-Original: Pw757qIRT3iKPhgOaf87tNc7ivpZG9FWsIydMxsPpPOUmP6oyxNnrd/L0b5uTCCc5xQRs9TK3j0xgpD36Wi5CquXijxX8/iFqXujA3J0wfVgl7C7PBlGy6S+B7BhET531OLSzVi75+USeb6ZJj0IJ2ZEVodvtHbVkOegX8WLf5U90s9SnWHMEP1YGY35CSIrG6n+mFuIOCfacZJ5s5JRNog/02zAij66yPpfxILywVgOgXpfrwc/m+R2G+xMrgDJfBFv+nUBYIlchkqdqDgQplggrGejFER6V2tA6sOqZ2u7L0JwPp9knj5R+PaerrDnpFjMYmSqZB/PPhyPO9fmCJobBEuiaiJ73zM0cSeVVR5bcZV9WbyZ6apEMaw75gyN8Dta4WlWPCb6RiWjaM6nIbeQRrEW+wLTstPKnJxToqkLsTjqtwWGF4HAGYJsW+GdPmANjLxaY9MllY18tHRl+qhwQz0yKkjSsf+ez4rdtMTCogLiQZtqVYiD4zwiWTeXqYagae6NMYXTx74vMSh5UwpwPyn8nCCId23T75vCSabEk17gefh37g7STqjY6c5QoUetRSBIpcRFB8EJSH/Fs/olDBqj93JPRXj8pmeHMycXjPyW3YtKFZt09lTFwPL3rwVq5o4QI3OC5poV1CSWNqWEZ3IQ1TMPETu1b2kDvQ37UeErFlWF1+a6HVgjHlDY2bwpaJt8Nd3wdCu8/a81pw== 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)(1800799024)(82310400026)(36860700016)(23010399003)(376014)(6133799003)(18002099003)(22082099003)(11063799006)(56012099006); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: OJKtC0ca45fYSG7XCCaBYSvuGXSGogETI3584RbBO+YFASV+mQmvRb+ebZ7Ug3EfmE84GFNocv3INGa1oqc3sOcQVlbUm3MPmPudJnP6XdYpqFvlxNJSceZ7ai4rDyQL4E4XNCdB6gAiOup6ECTpn0zZ21IhgZsMyuVVbP759meFohr0OqI5WCZEGFehgrV3BAJZjmTQB1KWW/ww6Xeap1pOrqudIXqR97ixYNZCcoMJ7gTCromllvthPtIUttJluvrtKyOcsGO679NCsQJCUicwjJMVkUTudxoWpZOCaOXw/dTyUp4TxTSZUMBrDK7nxvECbEU2w1oc9MW9MeGHiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7511 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00027A67.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f102138d-e485-4bd1-10c1-08dedc3f8f4d X-Microsoft-Antispam: BCL:0; ARA:13230040|23010399003|82310400026|36860700016|1800799024|376014|14060799003|35042699022|11063799006|6133799003|56012099006|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: fEWdjLuGHu7kr6pHdjYSYAEvN7qQZ7HfTD08IhKoEpyAYftkAW4GIBjzGl+ICD0q82oWVP3uGNkoLUMRkxwX7n/AmGYFnAHKPik5F+zS4gMHZkyrUGiEoJHN47XjBL+tnGhxpEKHCHvMvxU58Gu9A8rQyPWmqSo2l/s/KNkUoEwkj40LyQ6A/It+YLJakfVGFNq+kSos90EsjBYqncwGLQ6tMHM9XlZI3sYl9aeqvn1O76/FhJbfHOG1OJp9UxqDE1usaUE4yrOR9m3oyd7B10SdW6xOO7+hQ7CXScVUlexDaRHg93hceV3NoRGXnzZ60q1Vwqywi2ldwFKGwsgjKwdFUUOkvO5TdGa5c63dQOrXR/Au3W9M16HpvSfqPodai0iXSaWkSHn1w285PAU49EY6+STdRn7VblsETTuDHQZFehmKbkvjbPB+72edFUJGMzFuvGK9VgC7rVrK3PVFzmO5PfTXA5PjHyM8FvTXfdic63eLU6rzvm6Nf8Z52MGyqgmsPDDOYonqACoz+Azl5kfYQQ0MA2iGmqYMqhXd8qBM2NtzZXlmxTl0UZ1CEqaUzGmOgBydFa0y/DU3FnRXPdEvCGu95vGPE5zXAgf1xYLkZZ16jAnL0MXYRjRXhwV0f+HhiM6DEyERa9zoZsA5uJaDxrowXRfs8hsiOw1kF/IICMf3zEElq6AOEriPvhnjTe6bfoUctTlShC+f4N5a6g== 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)(23010399003)(82310400026)(36860700016)(1800799024)(376014)(14060799003)(35042699022)(11063799006)(6133799003)(56012099006)(22082099003)(18002099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iWZiAvYaJgL/JWXufKBfIBjHBk+yLF/X/WDCuq15SzuOQysjJJP6DB05nxEtL/vGEEEWXd2bdVqMsS2ljVG/S5ydYfD+Gc8vR0b0fDF6j3YWL9mMqacqvVy4zZik9eagQvgPHpn7hSFwGDilynWWsZ0Fya1GslkngM9SNbFibJ4MAZTrceH1w1LQK19f7yXiK9mrRTXZcNFAez+1l6AR83Tfgd3nSAwPekVMIsXFlJj7QV4H0HiX9oKeYGQU2UXDe6rPBvSoJ3qdmF+svrmiPer1AOOu7/nUXDAiD96b5JV8z7xt3IQJLn42dp7PUS1W0TK20pvY3EVVBEjcbRIlpaHLZilDJQP4gnw/ZuqKLFMUlEzT+g3/V85HWAPLuHuX82mmJSL+iAXP0afGIcaBNIw2geLqQV6mPggZcg24wrsbV49iB2lt2Jd1cZEEkIjq X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2026 15:52:13.7415 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62cadb5a-2f9c-43c8-9856-08dedc3fb6a2 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: AM4PEPF00027A67.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8930 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 Add linux_get_hwcap3 and linux_get_hwcap4 helpers to GDB and gdbserver, mirroring the existing linux_get_hwcap and linux_get_hwcap2 interfaces. The new helpers retrieve the AT_HWCAP3 and AT_HWCAP4 auxiliary vector entry either from explicitly supplied auxv data or from the current inferior. This prepares for future features that depend on HWCAP3 and HWCAP4 capability bits. --- gdb/linux-tdep.c | 38 ++++++++++++++++++++++++++++++++++++++ gdb/linux-tdep.h | 22 ++++++++++++++++++++++ gdbserver/linux-low.cc | 28 ++++++++++++++++++++++++++++ gdbserver/linux-low.h | 8 ++++++++ 4 files changed, 96 insertions(+) diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index d89c5ae8504..24774ad3c3d 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -3142,6 +3142,44 @@ linux_get_hwcap2 () current_inferior ()->arch ()); } +/* See linux-tdep.h. */ + +CORE_ADDR +linux_get_hwcap3 (const std::optional &auxv, + target_ops *target, gdbarch *gdbarch) +{ + return linux_get_hwcap_helper (auxv, target, gdbarch, AT_HWCAP3); +} + +/* See linux-tdep.h. */ + +CORE_ADDR +linux_get_hwcap3 () +{ + return linux_get_hwcap3 (target_read_auxv (), + current_inferior ()->top_target (), + current_inferior ()->arch ()); +} + +/* See linux-tdep.h. */ + +CORE_ADDR +linux_get_hwcap4 (const std::optional &auxv, + target_ops *target, gdbarch *gdbarch) +{ + return linux_get_hwcap_helper (auxv, target, gdbarch, AT_HWCAP4); +} + +/* See linux-tdep.h. */ + +CORE_ADDR +linux_get_hwcap4 () +{ + return linux_get_hwcap4 (target_read_auxv (), + current_inferior ()->top_target (), + current_inferior ()->arch ()); +} + /* Display whether the gcore command is using the /proc/PID/coredump_filter file. */ diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h index c19839fde2c..9b30392fb04 100644 --- a/gdb/linux-tdep.h +++ b/gdb/linux-tdep.h @@ -91,6 +91,28 @@ extern CORE_ADDR linux_get_hwcap2 (const std::optional &auxv, extern CORE_ADDR linux_get_hwcap2 (); +/* Fetch the AT_HWCAP3 entry from auxv data AUXV. Use TARGET and GDBARCH to + parse auxv entries. + + On error, 0 is returned. */ +extern CORE_ADDR linux_get_hwcap3 (const std::optional &auxv, + struct target_ops *target, gdbarch *gdbarch); + +/* Same as the above, but obtain all the inputs from the current inferior. */ + +extern CORE_ADDR linux_get_hwcap3 (); + +/* Fetch the AT_HWCAP4 entry from auxv data AUXV. Use TARGET and GDBARCH to + parse auxv entries. + + On error, 0 is returned. */ +extern CORE_ADDR linux_get_hwcap4 (const std::optional &auxv, + struct target_ops *target, gdbarch *gdbarch); + +/* Same as the above, but obtain all the inputs from the current inferior. */ + +extern CORE_ADDR linux_get_hwcap4 (); + /* Returns true if ADDR belongs to a shadow stack memory range. If this is the case, assign the shadow stack memory range to RANGE [start_address, end_address). */ diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index ade5e9e2a1c..029f64321c2 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -70,6 +70,14 @@ #define AT_HWCAP2 26 #endif +#ifndef AT_HWCAP3 +#define AT_HWCAP3 29 +#endif + +#ifndef AT_HWCAP4 +#define AT_HWCAP4 30 +#endif + /* Some targets did not define these ptrace constants from the start, so gdbserver defines them locally here. In the future, these may be removed after they are added to asm/ptrace.h. */ @@ -7198,6 +7206,26 @@ linux_get_hwcap2 (int pid, int wordsize) return hwcap2; } +/* See linux-low.h. */ + +CORE_ADDR +linux_get_hwcap3 (int pid, int wordsize) +{ + CORE_ADDR hwcap3 = 0; + linux_get_auxv (pid, wordsize, AT_HWCAP3, &hwcap3); + return hwcap3; +} + +/* See linux-low.h. */ + +CORE_ADDR +linux_get_hwcap4 (int pid, int wordsize) +{ + CORE_ADDR hwcap4 = 0; + linux_get_auxv (pid, wordsize, AT_HWCAP4, &hwcap4); + return hwcap4; +} + #ifdef HAVE_LINUX_REGSETS void initialize_regsets_info (struct regsets_info *info) diff --git a/gdbserver/linux-low.h b/gdbserver/linux-low.h index 03e11202955..c2ebdc228bc 100644 --- a/gdbserver/linux-low.h +++ b/gdbserver/linux-low.h @@ -977,4 +977,12 @@ CORE_ADDR linux_get_hwcap (int pid, int wordsize); CORE_ADDR linux_get_hwcap2 (int pid, int wordsize); +/* Fetch the AT_HWCAP3 entry from the auxv vector, where entries are length + WORDSIZE, of process with pid PID. If no entry was found, return 0. */ +CORE_ADDR linux_get_hwcap3 (int pid, int wordsize); + +/* Fetch the AT_HWCAP4 entry from the auxv vector, where entries are length + WORDSIZE, of process with pid PID. If no entry was found, return 0. */ +CORE_ADDR linux_get_hwcap4 (int pid, int wordsize); + #endif /* GDBSERVER_LINUX_LOW_H */ -- 2.55.0