From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2054.outbound.protection.outlook.com [40.107.22.54]) by sourceware.org (Postfix) with ESMTPS id 6CFE33857BB5 for ; Thu, 13 Oct 2022 09:15:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6CFE33857BB5 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Xf99PXB56YA6WYZFLZ7KBfQB8ioC55vVo0sM1wL2GYiedRvoqloMJFULz+82H0Sdh4U84U0Nxn6vYwPZJ+Hdlh8UgJG3V8RNB9jhglwbNIjty10Fv7CmT4DZItQvgU6wRnMvXcUR0r6OwhjW/Ffn0ZXT35RSVaEsspfpT8bnalbJMhqJE4RC41s4naFS9CxUH4E2LPPqSdAXGThqD00tGC3D3roXdMUZNyM6nXM9AhAKt0+ZUmh/Rhke4tJ3xbD6Ji2/G7PkLOQtyfN7Q7K1AIuUra9MmTlDa08ZE0D25EXDJyA7zY7vaiNQ9lZufXXfSE7VBhQQwBLoUOeQJEGy9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=RNnwC5yfxDZ/Vhrw8BweFpUGa76HuMTbPuGr6JRUw7A=; b=hStMVG8sp7aZnEQMtZ/tUsAArmtDB5EyOFVeCcyZPoZ4+BUcx7tAEhKCrDVLa72Oi4MJHx324F/+gld92IAPsqc0U3cZTocyhh0KxNC9aFRic6HNi91lX0SffWmjqk/20UM4T8M++ZGrWqFfWidv8sLuG7T7PpIkX7RaeSenhw1lPhOZw02DiN9y/yIECURh+mVkrOZxUvYFtSEFK2MJoMXYdlbQv9dnOAf2XD2/+MJr9FCHksFCCgNi/BK26JCunakJSP61QmhgS17l2jJBohbrygvs+Y7+eJNObNzSjMOcelyoracxwKnGSw3Snm821Ani3Xy8vcimPyb09VvoBw== 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=armh.onmicrosoft.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]) Received: from AS9PR06CA0728.eurprd06.prod.outlook.com (2603:10a6:20b:487::32) by PR3PR08MB5769.eurprd08.prod.outlook.com (2603:10a6:102:91::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.21; Thu, 13 Oct 2022 09:15:27 +0000 Received: from AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:487:cafe::d8) by AS9PR06CA0728.outlook.office365.com (2603:10a6:20b:487::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26 via Frontend Transport; Thu, 13 Oct 2022 09:15:27 +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=armh.onmicrosoft.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 AM7EUR03FT036.mail.protection.outlook.com (100.127.140.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.10 via Frontend Transport; Thu, 13 Oct 2022 09:15:27 +0000 Received: ("Tessian outbound ce981123c49d:v128"); Thu, 13 Oct 2022 09:15:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 820d282dca3bd126 X-CR-MTA-TID: 64aa7808 Received: from ce4c37dfec5a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1BFA0A88-0DED-4796-A4B3-28ED834D9CE3.1; Thu, 13 Oct 2022 09:15:21 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ce4c37dfec5a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 13 Oct 2022 09:15:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QAAjnb3oXXuRPAeO2zoNQ2mJby6FLfyIeiN7C0VGhTWurDj3kdoU+mCrwMmOV5aJBhA/QTk7QzgUm2Z1SyDzD7TKRgdNjeOoV+7g/wIHroDeptVfnvpKepMUFK063xiXtiGulidOrLuuaxRv7LxMRSgz2H+yCPYce9R7i7NKwMsQT4+NGJ0n34tpcq3bSfujteVy024L1k2QTk22vDhj4h5l5NVfBBVnvq40wiFi4g5wGb767NdB3iwKASUPpDQyEYVYctwTGt+FK3vhl+AwntcBNI51UaQicjzQKWMa/pM6KIFCnZfR0AAV30lklAgCHEajwkYrHsVV7J1bIkEfhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=RNnwC5yfxDZ/Vhrw8BweFpUGa76HuMTbPuGr6JRUw7A=; b=TxwFcNCzfcUKCsjYijmRt/SjVeOeccIgeJXsN+f7f7/u3mCxvosN++tcHHJy3YOEP+l0ZGaxBut2fHC1n22kEK1P02eQ3aPjYSe2ZPoMT8tJ4TEhc6Xp9ma7NW3tbdHGLUhr5VriVygLBu5ejFtMypD8dMFTukAQedFOAaU0G8evjA8G9Smd5jMVz30IS/IGt6cLiGUptWT8fycwrQXLO53ewuur/wQJjj2FW6byQfX1Rs4/F0ja9M96MX4lUCp3J6J6le002w40NesCqDH6R3U1yLdp1MOv2GhXCs93wlrlaNW85Dxto5zVxguybZlfQsej+WEgAUp+8xSzyo5TVQ== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AM8PR08MB5570.eurprd08.prod.outlook.com (2603:10a6:20b:1d2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5709.21; Thu, 13 Oct 2022 09:15:19 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bbeb:a49e:d969:5d2]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bbeb:a49e:d969:5d2%6]) with mapi id 15.20.5709.021; Thu, 13 Oct 2022 09:15:19 +0000 Message-ID: <0c094a7d-25c7-4e39-7dc7-0ce7dd6dfd5c@arm.com> Date: Thu, 13 Oct 2022 10:15:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] [Arm] Remove dead FPA code Content-Language: en-US To: Pedro Alves , gdb-patches@sourceware.org References: <20220920123012.189293-1-luis.machado@arm.com> <8b615b88-26d8-a480-ad9f-51be749169cb@palves.net> <555eafe1-4314-a68b-a048-67d6f462abf1@arm.com> From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA9PR03CA0021.namprd03.prod.outlook.com (2603:10b6:806:20::26) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AM8PR08MB5570:EE_|AM7EUR03FT036:EE_|PR3PR08MB5769:EE_ X-MS-Office365-Filtering-Correlation-Id: 0b0e7a99-cfd9-4a98-c5c1-08daacfb781d x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Srv5Pe51/1UoCP+RV44S28bpmp2XM9NHp9sYu1+UuRpFlPZ/CnByKBBc0DFVEeNDxOcMNyLLahvG/iFFG725QAX5gJHVZSoqZKoGSI/6nASpe47EPe+PNklL60Z/FE9YBIPBq5lqqlZcjXn3zvFXyzlxdTxK1lHFVVv9aXBTdACD10M8XhwGhFsASkDnwIeXgExJuuTmjH7CNYBXTsCmcwWfM1oZPkI/f3DqCz7+CpY/6Ul1nU0MJPKvbsIj/AUM29gkm6uUr8JQRNsP0ymAznOQUB1/GYhDwFSGrZdF2jeZv9vfKvYgePxI5f6HTV6GiNVYdTVDWUc00WcosHELzbWlxL2oQWWAowVDEz5AUlraFJA3+/OH6HyYP3Wq03+zQsE261wWQONDKLYZziRpJLKQGN5kg28c+ZSniyBFCZfgmieg8Qph3EpJNp1a5bGR/oENdJ3ul0Vx7/m50bPsgFZoBdDDIJEDFrl/vk8RitgRna30si+LRQQAGsz24LOeL4R5ZfMBQiAejqqxcaPiqhOttMuvHjLLFkhbJLYebP7xIk7qryP7F4bmJkPIL6oBm15QytO/+FsyQrfzJLMB1CWlNGzAoHeHdVkqlJy8S/asgXlKaAa3rVrSqqB8iScwX3nuSreAvQCmZ2iS8M7dMShEHNB/oY+RAGLeU4ufVeadKqhnUDfofEKHWlzgi7JSkojy9XmwM81VuA7LZdf9gze7nghhjkYlKdamf4EctjXL3vBi053PFXsF9tZsfLVg1yTMtyhm9ObLaQvYhYXRVHewEvE7vbBUo/Hgew0lAUc= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3919.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(366004)(396003)(346002)(376002)(136003)(451199015)(4001150100001)(316002)(31696002)(2906002)(38100700002)(83380400001)(44832011)(86362001)(66946007)(8676002)(66556008)(66476007)(41300700001)(8936002)(5660300002)(6666004)(2616005)(6512007)(186003)(6506007)(26005)(478600001)(53546011)(6486002)(36756003)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5570 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-Transport-CrossTenantHeadersStripped: AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ec7fffda-b271-426d-05e8-08daacfb72bd X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GwU1doj9bgmX6XKCwfmCJFNsjAt0KEew3/O5NhnCyPQFOucuSRe98EjzOzvT7Z2FHZ89atZ8ZXkGaaNsVRJZ3ZIBumrPgfTwSpPwIUEOINAC1L/k42C+jAf/kOZN/2kXrbDULMzDMAvXE3HaBanJ4dcgA9SfBEMcQ4nKr9hUCVubYHwEgflw6zPZ041WjNsRc33H0+srvJF1SLpf5nqh3o65Bp3+CleX3++MAhNJr8VpMUZ/PpX3eKHWUJ6LKYoV9MczZ6Vs+AK4YWEA+W2mIOJFL43h49CzO3XVzhPwqT8OeSOvfCgDZhe2V6uvwVSybK6fNu1I/Tm3uorBiL+9I9qE7UBWtRoX2NQb8n+6NXOkawYjI/3b30aU1nDF6Xk1aiOE+7FweFu7shwPNkiCsZKMzHZ+0p/RjE1qYWhOKZN7fxG5ZMJdwuPD0tA2/dsa57Yen84kiLwXrD2Xg56ua4zWGb1psiG/efDGmy9LJjcIJsZksHyFnbdDDJ9Qsc+hNbDRljZxvOLIskMYzoQw7tFMh7Pz8CnPQKNZYRh/DsFDulBRYMV6YG7cNQ6N4kcfAnz74CyaY77rsmLiwoO/QzVe89F7y/bNF72YIc3ODNlUdaRy5fc0bFzrH9E0CKq+eVZN8VXipLTWmBxcCU4Ma3xGQwjY7H7YdSDS2NDxQXMpI6Jz7lkYrzju+S5C1VfI1QMQw8d4EFwEnL/8SjpVmqNYfDVK7Ap8Msxwva+WBauF7hOYTObgWTY5r3JOPcoxv+rJ/CRs60QIoLLGijb/U//KCkfQxrLIc+4RERqAMvtZ2ThaDUfPNeAZ/1vzvbYH 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:(13230022)(4636009)(396003)(39860400002)(136003)(376002)(346002)(451199015)(36840700001)(46966006)(40470700004)(6666004)(6486002)(86362001)(186003)(478600001)(2616005)(53546011)(6506007)(26005)(6512007)(82310400005)(8936002)(316002)(36756003)(5660300002)(70586007)(40480700001)(82740400003)(70206006)(47076005)(8676002)(31696002)(83380400001)(356005)(336012)(36860700001)(40460700003)(81166007)(4001150100001)(31686004)(41300700001)(2906002)(44832011)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2022 09:15:27.7707 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0b0e7a99-cfd9-4a98-c5c1-08daacfb781d 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: AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5769 X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, KAM_DMARC_NONE, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2022 09:15:41 -0000 On 10/13/22 09:44, Pedro Alves wrote: > On 2022-10-13 8:18 a.m., Luis Machado wrote: >> On 10/10/22 15:56, Pedro Alves wrote: > >>>> More recently we've added two new guesses for MVE and M-profile system registers, but it doesn't >>>> make sense to do so, as these features are advertised as XML already. >>> >>> What was the justification for adding them back then, then? >>> >> >> It was meant to support other register sets under a situation where no XML is sent back. > > Well, that's the reason for all the guesses existing. The question was more about -- why were _those_ > particular guesses needed / added? Maybe because such stubs already existed in the wild, and > people were using some downstream patched version of GDB to work with them? > They weren't needed at all. mve is reported through XML by gdbserver and qemu. The system registers are only currently supported by STLink, and that also uses XML. >> Though valid, my feeling is that >> it was done mostly as copy/pasting what was already being done for the GPR's/FPA. The documentation isn't exactly clear >> on whether one should do it or not. Only a few targets use these guesses (Arm, Mips and Microblaze). > > It's strictly a backwards compatibility feature. It's explained in the comment: > Right, but since this is an old port and the background is fairly convoluted, it might be easy to miss if you don't know some of its history. I consider the mve/system bits of the guesses dead code. Though we could argue now someone may come up with a stub that uses mve and the system registers without XML, and that we will need to support that going forward. I don't think that's realistic though. I hope you'll agree. > /* For backward-compatibility we allow two 'g' packet lengths with > the remote protocol depending on whether FPA registers are > supplied. M-profile targets do not have FPA registers, but some > stubs already exist in the wild which use a 'g' packet which > supplies them albeit with dummy values. The packet format which > includes FPA registers should be considered deprecated for > M-profile targets. */ > > static void > arm_register_g_packet_guesses (struct gdbarch *gdbarch) > { > > Is there something that could be improved in that comment to make it clearer? Yes, we should put a big warning stating we should no longer update this code, until it can be dropped without upsetting other software. > >> Removing the guesses doesn't buy us much on its own, but there is opportunity to get targets to move >> to XML descriptions, which is something easier to work with, more flexible and less error-prone. So it looks >> like a step in the right direction. > > The thing is that the old/existing stubs that don't send an XML don't need the flexibility. They just need > to continue working as they do today. Removing the guesses and changing the default g/G packet layout > causes pain to _users_ foremost. IMO, removing backwards compatibility just for the sake of it doesn't > really help anyone. Although that's true, it is also true that a recent-enough GDB could be used to debug those very old targets after the compatibility layer is dropped in the future. > > For new registers/features, XML is how to get the flexibility. So I think the angle should be that > we, as maintainers, should not accept adding support for more/new registers without XML tdescs. Yes, and that's already the case.