From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20605.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::605]) by sourceware.org (Postfix) with ESMTPS id AD7D93858023 for ; Tue, 5 Nov 2024 14:51:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD7D93858023 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 AD7D93858023 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::605 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730818307; cv=pass; b=VqurzXG+th73f3xHblofZb8bL8SNRmiBtxO1TPU0YtqmCP0eZ71yKqjX9yHVobIMotiglb+PzQNCc3KPMnCkvLAjuhRCF8PIWuzteVC4iz22520+T3Xyom8jrlhhRfb+59PGBmHkyrkH4TSaHU6YmNtJdLS/wjXWVaJIv0Eysi8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730818307; c=relaxed/simple; bh=6NuHUELxEEVgMv7KA32u7MkkLVfKJBy8PDK8YdJLQLo=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=kQx5atO2X48YALdDQyeEUg6CEL7tcyeqKdYOh4JMoRia5llqBKWpt9tvDUe3xKE6InAjjl7ZJtt2hEcIiby2EChaotfiQEzxio8aBwj37ebN6vTrcAegv7D6ogiPTaodszJxZ38i3cBmNB840WafUgQIltI049IYJggaukYSpW8= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=Ywgv2bYr7rGhVnE44XPJ8nNB8gNZlRbuZxCVPT1bpi/98JJ8xipvD+Z+CN5w8l4VmdYaxbc1yLJGwLsCNMub7xMORh2IJ2K9vEd1FSKQwCGxjdeodmh+DLnItoWDd/w7K9ARVUNhZSOVREa8V/nBHFNUvS7vLC+ZLjVzIIS2o3J40JSttPZISHw7YRIj/EGWJNWF/0WlPKJCtQU8gfmI8ahZiBNgBmBDkPFyLbGq95T/MQ4qI84IouyLsZp3hEkTKYzp9koFGJvcRT6hJqxoGmvV4+RG8QYAA8akYabj/arqD6QD0Yv7qP6iwS0stDTzlR8JTGAq2XzJAXdwIdG/ig== 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=p/Ea/59yVURYDE/u3H7i/je2KviJk1v+fE1NL+0BAJI=; b=NLoIevBTmnV+Ir3KR9CHyPflPjU90w39b+UKugFOZqZJMcbN5T+MBJOl7mLPDMk2/tH3N7AT0+kQoXOZYIOsPNTIuWn1Fxq9fGSXedUZqHjiKEnaN4SDFTbxiPnXrmjk/xgtBTpIMxzJEB8tWc0ZDo+GlKFMr6nvHFFpNOQz1OoYtDjBk/iF8Sbqwdxr0ENqf2fxCl5HpB9onZ7kc3Q+85USzNmp342Td/MqWuczmoMCXuKsxHvRgHHj1QCWi4XA7yQCrCETr9wanADzm6pNbhIXcxolf/kdVhYtW9v029o10kNelikIWrYoGcDMx/xDfFOTjRUnlq5Nh8JtpG9+fQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) 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] dkim=[1,1,header.d=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=p/Ea/59yVURYDE/u3H7i/je2KviJk1v+fE1NL+0BAJI=; b=MAoVowrX45m1uyq0TnE0ag4/1kkOLfqChtibs+uIg7XeMWUte/v6/tM9LWtWNYVjA84aJfALPff9MnNgtSoF2PTo0/xxYKKQD9gq0682af1DVQlxDwGYHCL36s6+awxACKQ175WPZ2h/SF3lzhYMsPMLasKPbEJgAMS8plerCg8= Received: from DUZPR01CA0316.eurprd01.prod.exchangelabs.com (2603:10a6:10:4ba::14) by AM0PR08MB5426.eurprd08.prod.outlook.com (2603:10a6:208:184::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.31; Tue, 5 Nov 2024 14:51:36 +0000 Received: from DB5PEPF00014B8A.eurprd02.prod.outlook.com (2603:10a6:10:4ba:cafe::69) by DUZPR01CA0316.outlook.office365.com (2603:10a6:10:4ba::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18 via Frontend Transport; Tue, 5 Nov 2024 14:51:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) 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 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5PEPF00014B8A.mail.protection.outlook.com (10.167.8.198) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Tue, 5 Nov 2024 14:51:36 +0000 Received: ("Tessian outbound 4a86a9c66651:v490"); Tue, 05 Nov 2024 14:51:36 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 932b51312c7583fb X-TessianGatewayMetadata: WuAm7dAnRErntW/nag5gl6hIbgKqhW7bH6kMFedRHJjfE2O4jXCa/t4swJGOI+JaI1WPF8TupykaYOMJ3n3hYCT2Dlyy9lSrV1jaj7yd5TmREOfg1Piz2YS/QtLZWzOJr/KjEr5tli9FV+hBjalc9B7+ELjmLFgzVG1rUOz2TU8= X-CR-MTA-TID: 64aa7808 Received: from Lf2cc637aca88.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 335B267F-9C19-4E4D-86D1-C9F9E5B116A7.1; Tue, 05 Nov 2024 14:51:30 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lf2cc637aca88.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 05 Nov 2024 14:51:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h6hUQe6G1yCH/9qr5CCX4vZYvJ1EIB8x+0DIlkT6SLCGn83Des5BcRw81CZBQm8yfIQCzY0hoshVoSkk4zhx8uQVZ39MCaHsNOLp57LMoa8d+IrpF+Ti5opd/n6KWTKE8JIU1tyIc85skbdKquonOhAyWR3pQsvMq4lch5dQMjlobedzyxwpvoZvfxcAo5hRGehDTbMIeMdWcGetnHqcIBA0KgztkTsjJpFxwnYpaZ2ah6Un7hLDV5mdxsyl+WB98G6EqhEH7PYwk8+rLa+DUST48sQqA5oxr3UEzjoUtG8FzkihndFo0Qyox+ELoAbk9A3wERg92JWn8PgNmDc7jA== 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=p/Ea/59yVURYDE/u3H7i/je2KviJk1v+fE1NL+0BAJI=; b=Ro9r/93cpAD285GmrHaJP2V34tWSsWCfAFK3aDbbiTTjdM7aF5SWQ9v/N/tVGmtbRBifoEixZvTD05H/s0TW7Cjs9eBmq543Qb5xwVS0Jf75gPH0WgKyOVeFfDoTqOGYVPW5h1rA2w2cKmIQu2A0zgantfZPwIHSRjcLeabkSrLvJsh8EdDXjnXXj/Hyfr4xJaeEbpwWPeLcVJjli5fVVTMcV1/8zai73ZVgQuCH5DxnwVGgyApZbxqu7JrdtciVz0IeA8FLABNKZ3BWZvw11AmEmJqbAnhfWSCTXKTW7NJFVeEv8Ma9rIsBHm7h9BfF5f/tGEbzEleNQIQCswb5CQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none 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=p/Ea/59yVURYDE/u3H7i/je2KviJk1v+fE1NL+0BAJI=; b=MAoVowrX45m1uyq0TnE0ag4/1kkOLfqChtibs+uIg7XeMWUte/v6/tM9LWtWNYVjA84aJfALPff9MnNgtSoF2PTo0/xxYKKQD9gq0682af1DVQlxDwGYHCL36s6+awxACKQ175WPZ2h/SF3lzhYMsPMLasKPbEJgAMS8plerCg8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5852.eurprd08.prod.outlook.com (2603:10a6:102:8e::21) by AS8PR08MB9386.eurprd08.prod.outlook.com (2603:10a6:20b:5a9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Tue, 5 Nov 2024 14:51:26 +0000 Received: from PR3PR08MB5852.eurprd08.prod.outlook.com ([fe80::f44:d113:1c29:825d]) by PR3PR08MB5852.eurprd08.prod.outlook.com ([fe80::f44:d113:1c29:825d%6]) with mapi id 15.20.8114.031; Tue, 5 Nov 2024 14:51:26 +0000 Message-ID: Date: Tue, 5 Nov 2024 14:51:24 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 1/2] gdb: Make tagged pointer support configurable. Content-Language: en-US To: "Schimpe, Christina" , "gdb-patches@sourceware.org" Cc: Tiezhu Yang References: <20241028084627.453792-1-christina.schimpe@intel.com> <20241028084627.453792-2-christina.schimpe@intel.com> <5b1646e6-4cfc-43e9-afc5-4a6cacb787bb@arm.com> <091cf4c1-1ee3-4c42-8d01-d5ed71472051@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0148.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::9) To PR3PR08MB5852.eurprd08.prod.outlook.com (2603:10a6:102:8e::21) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PR3PR08MB5852:EE_|AS8PR08MB9386:EE_|DB5PEPF00014B8A:EE_|AM0PR08MB5426:EE_ X-MS-Office365-Filtering-Correlation-Id: e0ca833a-838e-418a-a8f9-08dcfda95929 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?OTVZekpYWkhWZkZpdU81S0dEaGJPcU9qbS9PR2pEekc4WUVaSi8rejVUeWxW?= =?utf-8?B?N044S2p6MXpvYWc5U0VHUkE3cXRkSVBuVDBVZXhHdDYrWXViZTFpMEFFcCtU?= =?utf-8?B?amw1Smd1dGxMRHdxUmJULzR4cHh0ZFZTY3lIV1BNUTFrQTNjaS9SQnhScHpW?= =?utf-8?B?dDB5dk44VTdBZHN2TlEza2VmQURkNFB0SEl1K3c4UW93VE5ZYTBxcCtWRXd0?= =?utf-8?B?aDBEK09SVzk1RnREYW1xRkt4Rm5FWDNrcVVJbUJvdXNhM3dNaEtCZlpOME4y?= =?utf-8?B?R3J3OHU3TzNTYy9RMmg1UloxRG9GZDllV0F6ZFpKQU1CcVc4TFlkSDFTbFV6?= =?utf-8?B?RXhRVzJnUm5TS3BXN2RYSWFidFZ6MDFGZVVFNmRlRFFmV2tzWE0wME9XSlhR?= =?utf-8?B?SGpEWkkxM1Y2bDJMRzczTEd6QVdUSjJhbUcxdnBYcjF5Mlp2QlFmaU1IeDlG?= =?utf-8?B?d2JOMFRPNC9nU2ZSSlhxeEZDNWJ2MVJ0VGV2VGxrbmk4NTEwQmFxR0V2bTd0?= =?utf-8?B?QzlEZFROYkxqZHdWY2E4dXhpM2ptT3o4Q2c1RERPV3MwNkcvc3pqSTIvbTlw?= =?utf-8?B?a1F3c1RqWmNRSCtTbllOWEZ4TEgwSFVNSzJja2IvQm1xWTFqMDJ1RlpsTHF3?= =?utf-8?B?R1VXRzJhRHNpV0JDd3VnU1lNalg0WGtxWVRZNUxya3FuUHVOc0taRjg4VHR1?= =?utf-8?B?UnZOekZEQkdHMjdGd2Z3eGtHUU5zbkl6cUptZzVnQXlDZVpYUmE2cjdoZFV0?= =?utf-8?B?TTNzaElDRnA2NnZIa2MrNENvZDNBM0lxZWJTcTJSRnh4N0xnTjFOOFpGV1li?= =?utf-8?B?YStEeFhST1JQbzlqbk10bGxwNEVVV2QxUE55STQvWVI3bVpsRUR4MzhOOTAx?= =?utf-8?B?QUc1TzFYZzFnZUlvN2R4SVE3NVNzSU9IQlhwOXBuRFN4ZFhicEZrZU5GazNQ?= =?utf-8?B?eW94Z00wQktxdVBJOG5NZlh3NVFZZTc1Y0U4b2lPNkRBZzJEQUpEZ0xUMHYx?= =?utf-8?B?UXZDQXNyS3BFQVBzN0xkOCtwQS81eVRsYXNyUHVzUXpMR0gvQ2RyTjlTMC9D?= =?utf-8?B?QkhXeVptczBiVzlKbnZEUk04Z2xuNXgramh5d0RIK1F5ai9DZFNVT1RPSVNF?= =?utf-8?B?bm5SOE1DZnc0Z1lCVENVM0pPM0VYTmpwT3hkdHdWZ0lmTTU1T3VjZGVsV0xu?= =?utf-8?B?aExyMXdPMTJBTXBhZ1R2QWNaSEFUd2ZhRElPYkN0TXM4UEJZUHFnRWIzYVJv?= =?utf-8?B?aEU0ZUc3VFZWRGVIM0k4QzFrOExBLy9Od1pKbVZzSEVBSkNzTFJPbkFqcU84?= =?utf-8?B?K0JaMWYwdzJFY2g3SC9zYlNrRVphR1NmbDUrZ2FsUUpGT3YrUHh4c2thYnFV?= =?utf-8?B?Z0d2MDB4YVpjcXpvMlhnR2NvT1VyMlJIclBVRTk1T3FEK0VnbzdkVjVxMlRI?= =?utf-8?B?ekFLcTliTU9IY2JwaFFaQVRpbWExNEJxRm1rTDlKTTE3K0JTRWNEZG8ybkha?= =?utf-8?B?SEVqTWVvbmZpdnFsRUpHNUtybXNxdXNwZ25rck4vcitwZURRN1dRZng0OHJW?= =?utf-8?B?aHNCZVllaHR5OXYybXkyVExyZmI4MlVoYkRvbnBaUUZnbjRPa0dBVTFwM0dj?= =?utf-8?B?MWlTSk1KZElQWWZvK3R2VjVVNVN0azZ1V2hqWmlMNUdKUzRTQ0diakUva0Rt?= =?utf-8?B?TFFnUldkaDB1eFFRTVorWXZGNkppK3NnMEJhektnTjRhZUZvV1F1dzB6VzIv?= =?utf-8?Q?rJDOzrukbtqdnLcCIwXw76Y/qM6g9Qjd9+AsHr6?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PR3PR08MB5852.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9386 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:8e::21];domain=PR3PR08MB5852.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B8A.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 41517d3a-9749-4033-87d7-08dcfda9528c X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|82310400026|14060799003|1800799024|35042699022; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eHNPcGJoOTZQa3V1V25YcnBsRGtZSHpIc0pEblRUNVhVRFo2VW5adXEwZHpZ?= =?utf-8?B?eU5ReXlSamtRZ2FxVU1FNUZjdW5jQlJnbDY0eEVxZEo5cFFnazB5N0xKYWRS?= =?utf-8?B?WEVpZzI1UG1MS2hURGIyWElONEJDeGllS1VzbmR1Zmw2bTBnZjRzaGV3eGtl?= =?utf-8?B?T1JCVHlzMDNTU3ZQcGYwMHNiRFVFVTZxY3M0cXZEQWJLVVJmMW42dHRJV2E0?= =?utf-8?B?SFBGVGIzTUFqRVcrY0ZHZk1zWC9Nd0FucFB1WHN6Rmg2US9RSi9LQXNSTE9q?= =?utf-8?B?Y2F6ZWtwVGJsWGMyZTJpZDg3ZUorVnpBZHczOEdzNSs0R1dKZHBWM2ZMdndI?= =?utf-8?B?RkY1NU1menoveHVCZWtYVjNVSlV6YW53eWcvTHFDWlVDQkJSNEdjTEovbTFB?= =?utf-8?B?RENSZllTaXlFb0UwVUVKaGZHbTFiZlJocyt0dmRzdU9UN0szalUra0xIUTAr?= =?utf-8?B?aU1lcC9VbERhdEdNd2Z0RmFtZ3BwK3F2T201Yk41UnpheEVhRGJraFpHdnZt?= =?utf-8?B?TnFYb0d3UUJhS1d1UC9ZdXlPZWhVUlFuYVlIWVdqS3FhUndEa2EycWlOMTQy?= =?utf-8?B?WDFzdlFxWEpwSXVmaDVsazU2MVNIeEd1SHpKYXpZOVRjU1hXbTdWUWczV0V0?= =?utf-8?B?ZjNQdGcwL255S0tDaXNZVGJlY2ozNnNzWU9MczFvRmlxNVJGejI4RmpwelRV?= =?utf-8?B?SGlJQUtTUjI2N21OL1ZIcElDVUdINU8rWThSWlE4bWdyNFhlS0JWUkdSNnJk?= =?utf-8?B?eHAvK1EyVGl5K01ZN1ZoQi9iVWFER2ZGQnpxM0UxL3VJdm4rbFBrejNqZDZ1?= =?utf-8?B?dWEwNUFJcHRLbnNJVk1WRDJZUGtPRHJNVEt4Znl6c3VrUVhxb1FlSERUcGNq?= =?utf-8?B?TkkxR2tJdlF3Sk9SN1NxMHBlSHZTQXFwZVJyMm1aRzlLdnlURXRLNWNSODZt?= =?utf-8?B?ZGgrem1vVXBBYWtuMTF1QmQ1TVQ3TkV6Y2EwUHdkbWJLemhQMUJDd1ExU2Zk?= =?utf-8?B?b1BJOU5ZREY4emY5TFNRMWNRU2xtaWlIQzVnUVVHTEhiajlQL05GYjVibHpO?= =?utf-8?B?S1ZWckZ5ZlY5V2thRGY4QUNhcUJmU0FMcm02eGdjQ3NwY2RML2swM21pTHZ4?= =?utf-8?B?T0R4bkxQQzhkdlFVenhXYkt4aWpuVVA5ZFZ3bXRDb3pUUGVGL1FoNGVIelBj?= =?utf-8?B?WW5YK3dNcUlWUkQ0OUNJR3dDbS9vNjc5dElYc1lsQnhwWU9RU2R1Rk5lOWY5?= =?utf-8?B?MzVDWTBYMXQwR2trSlhmVEpad05sdHR5TWZOZ01jR0pmTXZPOXVHT3Rsa3Rl?= =?utf-8?B?K1psWFM4cGtWcWVrSHNuUkZlYVM1TnBialhweGVGNXNpeHNVNHQvM1p5L05S?= =?utf-8?B?WENDcWlpR0E4K1VyeEl3WjhxQ3g1MGFNTzVyWVRsRW1iUEtpb3AzNWdzR2NN?= =?utf-8?B?VXRMd1R5ckJkaDdKYjBUb1JEVFNDQ1hkR3hWSHdJdU5pdlMveTkxYWVoMGgx?= =?utf-8?B?N0RmQ0QwZDdGOWlOQ0x6cUxJbElaNUNxdXVsU1ZRL25CSk1yY1BpcHBYY2NI?= =?utf-8?B?QkdOT2o2bDdvRWpjZ1dYcU5OM1h0aG11aG1SQXFQbSt0RkpQZlpzM3RlSXdB?= =?utf-8?B?eDJRZ1U5eDNvdjVwRUI5RVV3YitlU0l1S1FMdHlKRnZrRVN6bFF0TStWelRL?= =?utf-8?B?SkoyUG5SalMrd08xR1JtU3ZlVHJQVjlRMzJLd0Q4Qk05dHNtNi96bG50Vmpo?= =?utf-8?B?MHZjNGM1OWxWZHNQUzZBbzg4U1dkN3g5anhUdE5uWTQrT3JaZndDMlpNTHVE?= =?utf-8?B?SzdnNU9HbVI4QzlwRjY3aDJjQmhQL1Fld3NobEprUGZiZlNnYWRyWE1kVHN0?= =?utf-8?B?Y3pPK2VuVjY2SkNxMThPb2hsa3dOS1htRUJjc0k1UmZMS1E9PQ==?= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230040)(36860700013)(376014)(82310400026)(14060799003)(1800799024)(35042699022);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2024 14:51:36.5876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0ca833a-838e-418a-a8f9-08dcfda95929 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B8A.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5426 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/5/24 14:40, Schimpe, Christina wrote: >> -----Original Message----- >> From: Luis Machado >> Sent: Tuesday, November 5, 2024 3:22 PM >> To: Schimpe, Christina ; gdb- >> patches@sourceware.org >> Cc: Tiezhu Yang >> Subject: Re: [PATCH v6 1/2] gdb: Make tagged pointer support configurable. >> >> On 11/5/24 14:07, Schimpe, Christina wrote: >>> Hi Luis, >>> >>> Thanks a lot for the review. I have one questions to your comment, please see >> below. >>> >>>> -----Original Message----- >>>> From: Luis Machado >>>> Sent: Monday, November 4, 2024 12:18 PM >>>> To: Schimpe, Christina ; gdb- >>>> patches@sourceware.org >>>> Subject: Re: [PATCH v6 1/2] gdb: Make tagged pointer support configurable. >>>> >>>> Hi Christina, >>>> >>>> On 10/28/24 08:46, Schimpe, Christina wrote: >>>>> From: Christina Schimpe >>>>> >>>>> The gdbarch function gdbarch_remove_non_address_bits adjusts >>>>> addresses to enable debugging of programs with tagged pointers on >>>>> Linux, for instance for ARM's feature top byte ignore (TBI). >>>>> Once the function is implemented for an architecture, it adjusts >>>>> addresses for memory access, breakpoints and watchpoints. >>>>> >>>>> Linear address masking (LAM) is Intel's (R) implementation of tagged >>>>> pointer support. It requires certain adaptions to GDB's tagged >>>>> pointer support due to the following: >>>>> - LAM supports address tagging for data accesses only. Thus, specifying >>>>> breakpoints on tagged addresses is not a valid use case. >>>>> - In contrast to the implementation for ARM's TBI, the Linux kernel supports >>>>> tagged pointers for memory access. >>>>> >>>>> This patch makes GDB's tagged pointer support configurable such that >>>>> it is possible to enable the address adjustment for a specific >>>>> feature only (e.g memory access, breakpoints or watchpoints). This >>>>> way, one can make sure that addresses are only adjusted when >>>>> necessary. In case of LAM, this avoids unnecessary parsing of the >>>>> /proc//status file to get the untag mask. >>>>> >>>>> Reviewed-By: Felix Willgerodt >>>>> --- >>>>> gdb/aarch64-linux-nat.c | 2 +- >>>>> gdb/aarch64-linux-tdep.c | 7 +++-- >>>>> gdb/aarch64-tdep.c | 23 ++++++++------ >>>>> gdb/aarch64-tdep.h | 6 ++++ >>>>> gdb/breakpoint.c | 5 +-- >>>>> gdb/gdbarch-gen.c | 66 ++++++++++++++++++++++++++++++++------- >>>>> gdb/gdbarch-gen.h | 49 ++++++++++++++++++++++------- >>>>> gdb/gdbarch_components.py | 53 ++++++++++++++++++++++++++----- >>>>> gdb/loongarch-linux-nat.c | 2 +- >>>>> gdb/target.c | 3 +- >>>>> 10 files changed, 169 insertions(+), 47 deletions(-) >>>>> >>>>> diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index >>>>> 0fa5bee500b..48ab765d880 100644 >>>>> --- a/gdb/aarch64-linux-nat.c >>>>> +++ b/gdb/aarch64-linux-nat.c >>>>> @@ -943,7 +943,7 @@ aarch64_linux_nat_target::stopped_data_address >>>> (CORE_ADDR *addr_p) >>>>> kernel can potentially be tagged addresses. */ >>>>> struct gdbarch *gdbarch = thread_architecture (inferior_ptid); >>>>> const CORE_ADDR addr_trap >>>>> - = gdbarch_remove_non_address_bits (gdbarch, (CORE_ADDR) >>>> siginfo.si_addr); >>>>> + = aarch64_remove_non_address_bits (gdbarch, (CORE_ADDR) >>>>> + siginfo.si_addr); >>>>> >>>>> /* Check if the address matches any watched address. */ >>>>> state = aarch64_get_debug_reg_state (inferior_ptid.pid ()); diff >>>>> --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index >>>>> c608a84bc71..61c3be8b6f0 100644 >>>>> --- a/gdb/aarch64-linux-tdep.c >>>>> +++ b/gdb/aarch64-linux-tdep.c >>>>> @@ -2433,7 +2433,7 @@ static bool >>>>> aarch64_linux_tagged_address_p (struct gdbarch *gdbarch, CORE_ADDR >>>>> address) { >>>>> /* Remove the top byte for the memory range check. */ >>>>> - address = gdbarch_remove_non_address_bits (gdbarch, address); >>>>> + address = aarch64_remove_non_address_bits (gdbarch, address); >>>>> >>>>> /* Check if the page that contains ADDRESS is mapped with PROT_MTE. */ >>>>> if (!linux_address_in_memtag_page (address)) @@ -2491,8 +2491,9 >>>>> @@ aarch64_linux_report_signal_info (struct gdbarch *gdbarch, >>>>> uiout->text ("\n"); >>>>> >>>>> std::optional atag >>>>> - = aarch64_mte_get_atag (gdbarch_remove_non_address_bits (gdbarch, >>>>> - fault_addr)); >>>>> + = aarch64_mte_get_atag ( >>>>> + aarch64_remove_non_address_bits (gdbarch, fault_addr)); >>>>> + >>>>> gdb_byte ltag = aarch64_mte_get_ltag (fault_addr); >>>>> >>>>> if (!atag.has_value ()) >>>>> diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index >>>>> 8a2a9b1e23c..91fec7879ed 100644 >>>>> --- a/gdb/aarch64-tdep.c >>>>> +++ b/gdb/aarch64-tdep.c >>>>> @@ -4121,7 +4121,7 @@ aarch64_memtag_matches_p (struct gdbarch >>>>> *gdbarch, >>>>> >>>>> /* Fetch the allocation tag for ADDRESS. */ >>>>> std::optional atag >>>>> - = aarch64_mte_get_atag (gdbarch_remove_non_address_bits (gdbarch, >>>> addr)); >>>>> + = aarch64_mte_get_atag (aarch64_remove_non_address_bits >>>>> + (gdbarch, addr)); >>>>> >>>>> if (!atag.has_value ()) >>>>> return true; >>>>> @@ -4160,7 +4160,7 @@ aarch64_set_memtags (struct gdbarch *gdbarch, >>>> struct value *address, >>>>> else >>>>> { >>>>> /* Remove the top byte. */ >>>>> - addr = gdbarch_remove_non_address_bits (gdbarch, addr); >>>>> + addr = aarch64_remove_non_address_bits (gdbarch, addr); >>>>> >>>>> /* With G being the number of tag granules and N the number of tags >>>>> passed in, we can have the following cases: >>>>> @@ -4209,7 +4209,7 @@ aarch64_get_memtag (struct gdbarch *gdbarch, >>>> struct value *address, >>>>> else >>>>> { >>>>> /* Remove the top byte. */ >>>>> - addr = gdbarch_remove_non_address_bits (gdbarch, addr); >>>>> + addr = aarch64_remove_non_address_bits (gdbarch, addr); >>>>> std::optional atag = aarch64_mte_get_atag (addr); >>>>> >>>>> if (!atag.has_value ()) >>>>> @@ -4236,10 +4236,9 @@ aarch64_memtag_to_string (struct gdbarch >>>> *gdbarch, struct value *tag_value) >>>>> return string_printf ("0x%s", phex_nz (tag, sizeof (tag))); } >>>>> >>>>> -/* AArch64 implementation of the remove_non_address_bits gdbarch hook. >>>> Remove >>>>> - non address bits from a pointer value. */ >>>>> +/* See aarch64-tdep.h. */ >>>>> >>>>> -static CORE_ADDR >>>>> +CORE_ADDR >>>>> aarch64_remove_non_address_bits (struct gdbarch *gdbarch, CORE_ADDR >>>>> pointer) { >>>>> /* By default, we assume TBI and discard the top 8 bits plus the >>>>> VA range @@ -4750,9 +4749,15 @@ aarch64_gdbarch_init (struct >>>>> gdbarch_info >>>> info, struct gdbarch_list *arches) >>>>> tdep->ra_sign_state_regnum = ra_sign_state_offset + num_regs; >>>>> >>>>> /* Architecture hook to remove bits of a pointer that are not part of the >>>>> - address, like memory tags (MTE) and pointer authentication signatures. >> */ >>>>> - set_gdbarch_remove_non_address_bits (gdbarch, >>>>> - aarch64_remove_non_address_bits); >>>>> + address, like memory tags (MTE) and pointer authentication signatures. >>>>> + Configure address adjustment for watch-, breakpoints and >>>>> + memory >>>> >>>> s/watch-/watchpoints >>> >>> Fill fix, thanks. >>> >>>>> + transfer. */ >>>>> + set_gdbarch_remove_non_address_bits_watchpoint >>>>> + (gdbarch, aarch64_remove_non_address_bits); >>>>> + set_gdbarch_remove_non_address_bits_breakpoint >>>>> + (gdbarch, aarch64_remove_non_address_bits); >>>>> + set_gdbarch_remove_non_address_bits_memory >>>>> + (gdbarch, aarch64_remove_non_address_bits); >>>>> >>>>> /* SME pseudo-registers. */ >>>>> if (tdep->has_sme ()) >>>>> diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h index >>>>> 50166fb4f24..13ea37de7a3 100644 >>>>> --- a/gdb/aarch64-tdep.h >>>>> +++ b/gdb/aarch64-tdep.h >>>>> @@ -205,4 +205,10 @@ bool aarch64_displaced_step_hw_singlestep >>>>> (struct gdbarch *gdbarch); >>>>> >>>>> std::optional aarch64_mte_get_atag (CORE_ADDR address); >>>>> >>>>> +/* AArch64 implementation of the remove_non_address_bits gdbarch >> hooks. >>>>> + Remove non address bits from a pointer value. */ >>>>> + >>>>> +CORE_ADDR aarch64_remove_non_address_bits (struct gdbarch *gdbarch, >>>>> + CORE_ADDR pointer); >>>>> + >>>>> #endif /* aarch64-tdep.h */ >>>>> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index >>>>> b7e4f5d0a45..9983e905e1b 100644 >>>>> --- a/gdb/breakpoint.c >>>>> +++ b/gdb/breakpoint.c >>>>> @@ -2313,7 +2313,8 @@ update_watchpoint (struct watchpoint *b, bool >>>> reparse) >>>>> loc->gdbarch = v->type ()->arch (); >>>>> loc->pspace = wp_pspace; >>>>> loc->address >>>>> - = gdbarch_remove_non_address_bits (loc->gdbarch, addr); >>>>> + = gdbarch_remove_non_address_bits_watchpoint (loc- >>>>> gdbarch, >>>>> + addr); >>>>> b->add_location (*loc); >>>>> >>>>> if (bitsize != 0) >>>>> @@ -7538,7 +7539,7 @@ adjust_breakpoint_address (struct gdbarch >>>> *gdbarch, >>>>> } >>>>> >>>>> adjusted_bpaddr >>>>> - = gdbarch_remove_non_address_bits (gdbarch, adjusted_bpaddr); >>>>> + = gdbarch_remove_non_address_bits_breakpoint (gdbarch, >>>>> +adjusted_bpaddr); >>>>> >>>>> /* An adjusted breakpoint address can significantly alter >>>>> a user's expectations. Print a warning if an adjustment diff >>>>> --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c index >>>>> 0d00cd7c993..d05c7a3cbdf >>>>> 100644 >>>>> --- a/gdb/gdbarch-gen.c >>>>> +++ b/gdb/gdbarch-gen.c >>>>> @@ -143,7 +143,9 @@ struct gdbarch >>>>> int frame_red_zone_size = 0; >>>>> gdbarch_convert_from_func_ptr_addr_ftype >>>>> *convert_from_func_ptr_addr = >>>> convert_from_func_ptr_addr_identity; >>>>> gdbarch_addr_bits_remove_ftype *addr_bits_remove = >>>>> core_addr_identity; >>>>> - gdbarch_remove_non_address_bits_ftype *remove_non_address_bits = >>>>> default_remove_non_address_bits; >>>>> + gdbarch_remove_non_address_bits_watchpoint_ftype >>>>> + *remove_non_address_bits_watchpoint = >>>>> + default_remove_non_address_bits; >>>>> + gdbarch_remove_non_address_bits_breakpoint_ftype >>>>> + *remove_non_address_bits_breakpoint = >>>>> + default_remove_non_address_bits; >>>>> + gdbarch_remove_non_address_bits_memory_ftype >>>>> + *remove_non_address_bits_memory = default_remove_non_address_bits; >>>>> gdbarch_memtag_to_string_ftype *memtag_to_string = >>>> default_memtag_to_string; >>>>> gdbarch_tagged_address_p_ftype *tagged_address_p = >>>> default_tagged_address_p; >>>>> gdbarch_memtag_matches_p_ftype *memtag_matches_p = >>>>> default_memtag_matches_p; @@ -407,7 +409,9 @@ verify_gdbarch (struct >>>> gdbarch *gdbarch) >>>>> /* Skip verify of frame_red_zone_size, invalid_p == 0. */ >>>>> /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0. */ >>>>> /* Skip verify of addr_bits_remove, invalid_p == 0. */ >>>>> - /* Skip verify of remove_non_address_bits, invalid_p == 0. */ >>>>> + /* Skip verify of remove_non_address_bits_watchpoint, invalid_p >>>>> + == 0. */ >>>>> + /* Skip verify of remove_non_address_bits_breakpoint, invalid_p >>>>> + == 0. */ >>>>> + /* Skip verify of remove_non_address_bits_memory, invalid_p == 0. >>>>> + */ >>>>> /* Skip verify of memtag_to_string, invalid_p == 0. */ >>>>> /* Skip verify of tagged_address_p, invalid_p == 0. */ >>>>> /* Skip verify of memtag_matches_p, invalid_p == 0. */ @@ -910,8 >>>>> +914,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file >>>>> +*file) >>>>> "gdbarch_dump: addr_bits_remove = <%s>\n", >>>>> host_address_to_string (gdbarch->addr_bits_remove)); >>>>> gdb_printf (file, >>>>> - "gdbarch_dump: remove_non_address_bits = <%s>\n", >>>>> - host_address_to_string (gdbarch->remove_non_address_bits)); >>>>> + "gdbarch_dump: remove_non_address_bits_watchpoint = <%s>\n", >>>>> + host_address_to_string >>>>> +(gdbarch->remove_non_address_bits_watchpoint)); >>>>> + gdb_printf (file, >>>>> + "gdbarch_dump: remove_non_address_bits_breakpoint = <%s>\n", >>>>> + host_address_to_string >>>>> +(gdbarch->remove_non_address_bits_breakpoint)); >>>>> + gdb_printf (file, >>>>> + "gdbarch_dump: remove_non_address_bits_memory = <%s>\n", >>>>> + host_address_to_string >>>>> +(gdbarch->remove_non_address_bits_memory)); >>>>> gdb_printf (file, >>>>> "gdbarch_dump: memtag_to_string = <%s>\n", >>>>> host_address_to_string (gdbarch->memtag_to_string)); @@ >>>>> -3198,20 +3208,54 @@ set_gdbarch_addr_bits_remove (struct gdbarch >>>>> *gdbarch, } >>>>> >>>>> CORE_ADDR >>>>> -gdbarch_remove_non_address_bits (struct gdbarch *gdbarch, CORE_ADDR >>>>> pointer) >>>>> +gdbarch_remove_non_address_bits_watchpoint (struct gdbarch >>>>> +*gdbarch, CORE_ADDR pointer) { >>>>> + gdb_assert (gdbarch != NULL); >>>>> + gdb_assert (gdbarch->remove_non_address_bits_watchpoint != NULL); >>>>> + if (gdbarch_debug >= 2) >>>>> + gdb_printf (gdb_stdlog, >>>>> +"gdbarch_remove_non_address_bits_watchpoint called\n"); >>>>> + return gdbarch->remove_non_address_bits_watchpoint (gdbarch, >>>>> +pointer); } >>>>> + >>>>> +void >>>>> +set_gdbarch_remove_non_address_bits_watchpoint (struct gdbarch >>>> *gdbarch, >>>>> + >>>> gdbarch_remove_non_address_bits_watchpoint_ftype >>>>> +remove_non_address_bits_watchpoint) >>>>> +{ >>>>> + gdbarch->remove_non_address_bits_watchpoint = >>>>> +remove_non_address_bits_watchpoint; >>>>> +} >>>>> + >>>>> +CORE_ADDR >>>>> +gdbarch_remove_non_address_bits_breakpoint (struct gdbarch >>>>> +*gdbarch, CORE_ADDR pointer) { >>>>> + gdb_assert (gdbarch != NULL); >>>>> + gdb_assert (gdbarch->remove_non_address_bits_breakpoint != NULL); >>>>> + if (gdbarch_debug >= 2) >>>>> + gdb_printf (gdb_stdlog, >>>>> +"gdbarch_remove_non_address_bits_breakpoint called\n"); >>>>> + return gdbarch->remove_non_address_bits_breakpoint (gdbarch, >>>>> +pointer); } >>>>> + >>>>> +void >>>>> +set_gdbarch_remove_non_address_bits_breakpoint (struct gdbarch >>>>> +*gdbarch, >>>>> + >>>> gdbarch_remove_non_address_bits_breakpoint_ftype >>>>> +remove_non_address_bits_breakpoint) >>>>> +{ >>>>> + gdbarch->remove_non_address_bits_breakpoint = >>>>> +remove_non_address_bits_breakpoint; >>>>> +} >>>>> + >>>>> +CORE_ADDR >>>>> +gdbarch_remove_non_address_bits_memory (struct gdbarch *gdbarch, >>>>> +CORE_ADDR pointer) >>>>> { >>>>> gdb_assert (gdbarch != NULL); >>>>> - gdb_assert (gdbarch->remove_non_address_bits != NULL); >>>>> + gdb_assert (gdbarch->remove_non_address_bits_memory != NULL); >>>>> if (gdbarch_debug >= 2) >>>>> - gdb_printf (gdb_stdlog, "gdbarch_remove_non_address_bits called\n"); >>>>> - return gdbarch->remove_non_address_bits (gdbarch, pointer); >>>>> + gdb_printf (gdb_stdlog, "gdbarch_remove_non_address_bits_memory >>>>> + called\n"); return gdbarch->remove_non_address_bits_memory >>>>> + (gdbarch, pointer); >>>>> } >>>>> >>>>> void >>>>> -set_gdbarch_remove_non_address_bits (struct gdbarch *gdbarch, >>>>> - gdbarch_remove_non_address_bits_ftype >>>> remove_non_address_bits) >>>>> +set_gdbarch_remove_non_address_bits_memory (struct gdbarch >>>>> +*gdbarch, >>>>> + >>>> gdbarch_remove_non_address_bits_memory_ftype >>>>> +remove_non_address_bits_memory) >>>>> { >>>>> - gdbarch->remove_non_address_bits = remove_non_address_bits; >>>>> + gdbarch->remove_non_address_bits_memory = >>>>> + remove_non_address_bits_memory; >>>>> } >>>>> >>>>> std::string >>>>> diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index >>>>> b982fd7cd09..9fda85f860f 100644 >>>>> --- a/gdb/gdbarch-gen.h >>>>> +++ b/gdb/gdbarch-gen.h >>>>> @@ -684,19 +684,46 @@ extern CORE_ADDR gdbarch_addr_bits_remove >>>>> (struct gdbarch *gdbarch, CORE_ADDR ad extern void >>>>> set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, >>>>> gdbarch_addr_bits_remove_ftype *addr_bits_remove); >>>>> >>>>> /* On some architectures, not all bits of a pointer are significant. >>>>> - On AArch64, for example, the top bits of a pointer may carry a "tag", which >>>>> - can be ignored by the kernel and the hardware. The "tag" can be regarded >> as >>>>> - additional data associated with the pointer, but it is not part of the >> address. >>>>> + On AArch64 and amd64, for example, the top bits of a pointer may carry a >>>>> + "tag", which can be ignored by the kernel and the hardware. The >>>>> + "tag" can >>>> be >>>>> + regarded as additional data associated with the pointer, but it is not part >>>>> + of the address. >>>>> >>>>> Given a pointer for the architecture, this hook removes all the >>>>> - non-significant bits and sign-extends things as needed. It gets used to >>>> remove >>>>> - non-address bits from data pointers (for example, removing the AArch64 >> MTE >>>> tag >>>>> - bits from a pointer) and from code pointers (removing the AArch64 PAC >>>> signature >>>>> - from a pointer containing the return address). */ >>>>> - >>>>> -typedef CORE_ADDR (gdbarch_remove_non_address_bits_ftype) (struct >>>>> gdbarch *gdbarch, CORE_ADDR pointer); -extern CORE_ADDR >>>>> gdbarch_remove_non_address_bits (struct gdbarch *gdbarch, CORE_ADDR >>>>> pointer); -extern void set_gdbarch_remove_non_address_bits (struct >>>>> gdbarch *gdbarch, gdbarch_remove_non_address_bits_ftype >>>>> *remove_non_address_bits); >>>>> + non-significant bits and sign-extends things as needed. It gets used to >>>>> + remove non-address bits from pointers used for watchpoints. */ >>>>> + >>>>> +typedef CORE_ADDR >>>>> +(gdbarch_remove_non_address_bits_watchpoint_ftype) >>>>> +(struct gdbarch *gdbarch, CORE_ADDR pointer); extern CORE_ADDR >>>>> +gdbarch_remove_non_address_bits_watchpoint (struct gdbarch >>>>> +*gdbarch, CORE_ADDR pointer); extern void >>>>> +set_gdbarch_remove_non_address_bits_watchpoint (struct gdbarch >>>>> +*gdbarch, gdbarch_remove_non_address_bits_watchpoint_ftype >>>>> +*remove_non_address_bits_watchpoint); >>>>> + >>>>> +/* On some architectures, not all bits of a pointer are significant. >>>>> + On AArch64 and amd64, for example, the top bits of a pointer may carry a >>>>> + "tag", which can be ignored by the kernel and the hardware. The >>>>> +"tag" can >>>> be >>>>> + regarded as additional data associated with the pointer, but it is not part >>>>> + of the address. >>>>> + >>>>> + Given a pointer for the architecture, this hook removes all the >>>>> + non-significant bits and sign-extends things as needed. It gets used to >>>>> + remove non-address bits from pointers used for breakpoints. */ >>>>> + >>>>> +typedef CORE_ADDR >>>>> +(gdbarch_remove_non_address_bits_breakpoint_ftype) >>>>> +(struct gdbarch *gdbarch, CORE_ADDR pointer); extern CORE_ADDR >>>>> +gdbarch_remove_non_address_bits_breakpoint (struct gdbarch >>>>> +*gdbarch, CORE_ADDR pointer); extern void >>>>> +set_gdbarch_remove_non_address_bits_breakpoint (struct gdbarch >>>>> +*gdbarch, gdbarch_remove_non_address_bits_breakpoint_ftype >>>>> +*remove_non_address_bits_breakpoint); >>>>> + >>>>> +/* On some architectures, not all bits of a pointer are significant. >>>>> + On AArch64 and amd64, for example, the top bits of a pointer may carry a >>>>> + "tag", which can be ignored by the kernel and the hardware. The >>>>> +"tag" can >>>> be >>>>> + regarded as additional data associated with the pointer, but it is not part >>>>> + of the address. >>>>> + >>>>> + Given a pointer for the architecture, this hook removes all the >>>>> + non-significant bits and sign-extends things as needed. It gets used to >>>>> + remove non-address bits from any pointer used to access memory. >>>>> + */ >>>>> + >>>>> +typedef CORE_ADDR (gdbarch_remove_non_address_bits_memory_ftype) >>>>> +(struct gdbarch *gdbarch, CORE_ADDR pointer); extern CORE_ADDR >>>>> +gdbarch_remove_non_address_bits_memory (struct gdbarch *gdbarch, >>>>> +CORE_ADDR pointer); extern void >>>>> +set_gdbarch_remove_non_address_bits_memory (struct gdbarch >>>>> +*gdbarch, gdbarch_remove_non_address_bits_memory_ftype >>>>> +*remove_non_address_bits_memory); >>>>> >>>>> /* Return a string representation of the memory tag TAG. */ >>>>> >>>>> diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py >>>>> index 4006380076d..cc7c6d8677b 100644 >>>>> --- a/gdb/gdbarch_components.py >>>>> +++ b/gdb/gdbarch_components.py >>>>> @@ -1232,18 +1232,55 @@ possible it should be in TARGET_READ_PC >>>> instead). >>>>> Method( >>>>> comment=""" >>>>> On some architectures, not all bits of a pointer are significant. >>>>> -On AArch64, for example, the top bits of a pointer may carry a >>>>> "tag", which -can be ignored by the kernel and the hardware. The >>>>> "tag" can be regarded as -additional data associated with the >>>>> pointer, but it is not part of >>>> the address. >>>>> +On AArch64 and amd64, for example, the top bits of a pointer may >>>>> +carry a "tag", which can be ignored by the kernel and the hardware. >>>>> +The "tag" can be regarded as additional data associated with the >>>>> +pointer, but it is not part of the address. >>>>> >>>>> Given a pointer for the architecture, this hook removes all the >>>>> -non-significant bits and sign-extends things as needed. It gets >>>>> used to remove -non-address bits from data pointers (for example, >>>>> removing the AArch64 MTE tag -bits from a pointer) and from code >>>>> pointers (removing the AArch64 PAC signature -from a pointer >>>>> containing the return >>>> address). >>>>> +non-significant bits and sign-extends things as needed. It gets >>>>> +used to remove non-address bits from pointers used for watchpoints. >>>>> """, >>>>> type="CORE_ADDR", >>>>> - name="remove_non_address_bits", >>>>> + name="remove_non_address_bits_watchpoint", >>>>> + params=[("CORE_ADDR", "pointer")], >>>>> + predefault="default_remove_non_address_bits", >>>>> + invalid=False, >>>>> +) >>>>> + >>>>> +Method( >>>>> + comment=""" >>>>> +On some architectures, not all bits of a pointer are significant. >>>>> +On AArch64 and amd64, for example, the top bits of a pointer may >>>>> +carry a "tag", which can be ignored by the kernel and the hardware. >>>>> +The "tag" can be regarded as additional data associated with the >>>>> +pointer, but it is not part of the address. >>>>> + >>>>> +Given a pointer for the architecture, this hook removes all the >>>>> +non-significant bits and sign-extends things as needed. It gets >>>>> +used to remove non-address bits from pointers used for breakpoints. >>>>> +""", >>>>> + type="CORE_ADDR", >>>>> + name="remove_non_address_bits_breakpoint", >>>>> + params=[("CORE_ADDR", "pointer")], >>>>> + predefault="default_remove_non_address_bits", >>>>> + invalid=False, >>>>> +) >>>>> + >>>>> +Method( >>>>> + comment=""" >>>>> +On some architectures, not all bits of a pointer are significant. >>>>> +On AArch64 and amd64, for example, the top bits of a pointer may >>>>> +carry a "tag", which can be ignored by the kernel and the hardware. >>>>> +The "tag" can be regarded as additional data associated with the >>>>> +pointer, but it is not part of the address. >>>>> + >>>>> +Given a pointer for the architecture, this hook removes all the >>>>> +non-significant bits and sign-extends things as needed. It gets >>>>> +used to remove non-address bits from any pointer used to access memory. >>>>> +""", >>>>> + type="CORE_ADDR", >>>>> + name="remove_non_address_bits_memory", >>>>> params=[("CORE_ADDR", "pointer")], >>>>> predefault="default_remove_non_address_bits", >>>>> invalid=False, >>>>> diff --git a/gdb/loongarch-linux-nat.c b/gdb/loongarch-linux-nat.c >>>>> index bc9927dd751..dc4a019614a 100644 >>>>> --- a/gdb/loongarch-linux-nat.c >>>>> +++ b/gdb/loongarch-linux-nat.c >>>>> @@ -613,7 +613,7 @@ loongarch_linux_nat_target::stopped_data_address >>>> (CORE_ADDR *addr_p) >>>>> kernel can potentially be tagged addresses. */ >>>>> struct gdbarch *gdbarch = thread_architecture (inferior_ptid); >>>>> const CORE_ADDR addr_trap >>>>> - = gdbarch_remove_non_address_bits (gdbarch, (CORE_ADDR) >>>> siginfo.si_addr); >>>>> + = aarch64_remove_non_address_bits (gdbarch, (CORE_ADDR) >>>>> + siginfo.si_addr); >>>>> >>>>> /* Check if the address matches any watched address. */ >>>>> state = loongarch_get_debug_reg_state (inferior_ptid.pid ()); >>>> >>>> I think the loongarch-linux-nat.c change is spurious. Could you >>>> please address that? >>> >>> Why is it spurious? What do you mean exactly? >> >> The intention behind this change isn't clear to me, but the Loongson native Linux >> layer using a AArch64 architecture function does not make sense. >> >> I haven't built a LoongArch native Linux target, but I'd guess that it will run into a >> build error with this change, if built for LoongArch only. >> >> The right approach, in my mind, is to drop this change, but you have to touch this >> code due to your changes. It begs the question, why is the LoongArch native code >> calling gdbarch_remove_non_address_bits here without even registering a >> function for the gdbarch hook to call? > > Right, I agree. > >> Without this hook, we'll invoke the dummy implementation in gdb/arch- >> utils.c:default_remove_non_address_bits, and that just returns the unmodified >> pointer. > > True, that's probably why nobody noticed before. > >> This is a question for the LoongArch maintainer (cc-ed). If we don't hear back, we >> should probably change the LoongArch code to not call >> gdbarch_remove_non_address_bits. I think that was the original intention, but >> there might've been a copy/paste error somewhere. > > Ok. Let's wait a bit. Thanks for the detailed feedback. Alternatively, if you could replace, in the LoongArch code, gdbarch_remove_non_address_bits with one of the three new hooks, that should work as well. I think even cleaner would be to just drop the hook for Loongarch and assign siginfo.si_addr directly to addr_trap in the code. Then we wouldn't need to delay this change further. How does thar sound for a v7 (and hopefully last)?