From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2079.outbound.protection.outlook.com [40.107.20.79]) by sourceware.org (Postfix) with ESMTPS id 0D9C73858C56 for ; Thu, 13 Oct 2022 07:18:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0D9C73858C56 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AdGO1Q7Heg/wQSSBSjm2g8xUDYksD1kLmSmMrz2Knru3R3LGjsokqw98HRgVuxrq3supGgB4fWDBb9B4u05mVmfR8MVTMdIXzKVMxUBoXo7t01jA9WS6vMOqzDZ8Xy5/olXABUxPyhleEVUe2Ni4CK4rRCtjpKEETBipcywW3AlkUk29y3HliXOVtpwzbevdQYL5YnUmpipyWq3SfEg1IabOxHScPJVwtsCKmtZlYvpy2rwPSw/T1ylRebuhSBzSzGMKeJSM1EgVG2z1pyelTtQLtoQMehbdC1fB6Pu3SzQtykohmg10noO9scKXG/LPx7NYsArpMJJztVKQqHHsYQ== 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=jb/syzIfFQ93jbsOA0TH8bQc1Bvfl1B2ZZSgqVKCQDc=; b=KGGcMUuslaSMFkGoBkabAxVot7DZXa0YILPohu4oBJqFhP2NrKQgw+pm5o7I3pPCRzDDRSSjQlmRrPTihReTTshpc+Cl8hoPK1hyYVc4saiwoEjV9mvgiJhE8y20+omGAN0dw7SB4Ji2ZYl6ubKBpGQWeNspnAtMuG/PrYX+eWxyV9DLLM8P5b7XxbN9Lw67lYvDs0X8qVAObSV1VqXEJ3Z/WFXaQ55J4UwXT86D3CpZSIpX2CT4nI+ARXIavxAjWM0kjin2R4eBOEKF3vQoD+3VDWm+LOfvjLqdXWfDH8kayODNfY1v8je8vQNUzv2ObrCZwJVKceOXd9TrKetorA== 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 DUZPR01CA0038.eurprd01.prod.exchangelabs.com (2603:10a6:10:468::12) by DU0PR08MB8640.eurprd08.prod.outlook.com (2603:10a6:10:400::17) 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 07:18:44 +0000 Received: from DBAEUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:468:cafe::75) by DUZPR01CA0038.outlook.office365.com (2603:10a6:10:468::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.25 via Frontend Transport; Thu, 13 Oct 2022 07:18:44 +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 DBAEUR03FT049.mail.protection.outlook.com (100.127.142.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20 via Frontend Transport; Thu, 13 Oct 2022 07:18:44 +0000 Received: ("Tessian outbound 7e4a920b87c0:v128"); Thu, 13 Oct 2022 07:18:44 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e5355d9bf3856528 X-CR-MTA-TID: 64aa7808 Received: from a17cbe44750e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 56403F5A-7599-4AD5-AA7F-FA7703CE1EB5.1; Thu, 13 Oct 2022 07:18:36 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a17cbe44750e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 13 Oct 2022 07:18:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HXeImvYYxO4s89EcDt+Y9hrMF8ImUsKLMa7hLi/rWq3HqES+FUQAmx3PrvtOxjpPGNeXg4ebXxwUmCuyY9GtWHNUwXACsQTMU2EJawRXb/HVC1IlBMYX1tLLFm9uzKmP9ZWSO7a9wGHP2oTVUm8yl8ywVkWHKn56tA+ryivCQ/mbRd4AB3ujYnqI9AUxVtabdN52/L9Z50JXqy/CxfVenz6VIl1PXKLwcC5KN97yZ62dc5xdUAnwBLxAkBfHEyJj8wm46EHwSNq4xFtf3Uc52FXuFUOP0td/N5inEKP2n+92px7CxG094yFWWby6DdAyHQjFCHGHB0S5N1k7ovQq/Q== 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=jb/syzIfFQ93jbsOA0TH8bQc1Bvfl1B2ZZSgqVKCQDc=; b=EGzyYeOzqBxMLIqP0gsgv0P6+T8QR6lGA2Nof3YQedk/IfPhtZ8bvM4WAXb642EmQaK2VsMkSJgfulNtEMdIXJnAwzas9T7LdCR+/32Ak+AaXi+uyl2qV0TWqS6nzpnMJZlMwqWPQ3lN2lZO1vXVAne3wuHb1EOy8mXL9b8bPrLIUSO3crsj0UXwH4XQPBq9kisHbT/5tsXHqkKNB0qcZP87vFrhsDIZkIdQdU3hSoV63ohniLrnhi4QA3PN4PmzgoYltpQNAqo/tnGe6/niKIC+ZQgFDJCYW27NtAhvRyfc8FbsL/s36Cuf4PkFV0rKeYdMyVMdYcs/iP4N72UsDA== 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 DBAPR08MB5800.eurprd08.prod.outlook.com (2603:10a6:10:1a9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24; Thu, 13 Oct 2022 07:18:33 +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 07:18:33 +0000 Message-ID: <555eafe1-4314-a68b-a048-67d6f462abf1@arm.com> Date: Thu, 13 Oct 2022 08:18:32 +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> From: Luis Machado In-Reply-To: <8b615b88-26d8-a480-ad9f-51be749169cb@palves.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0431.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18b::22) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DBAPR08MB5800:EE_|DBAEUR03FT049:EE_|DU0PR08MB8640:EE_ X-MS-Office365-Filtering-Correlation-Id: a691d2ba-c4b7-4d06-1820-08daaceb29c9 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: eJiqOyDeYOmsLPP6mbVlJV7IRDU6Joei9nxJ2e7i+7VewOyxbxao4WxRA/4BPO5RJzGiFpUA3ZD6BIqHVDYxgFI/sa9tSq41E6Z8Dj747u566lgWOjMm3evnhxhbRAJYdHDExpRZPnT2R33/8L4hN18El3CmD9+o9CxCn9YtA2Jty/0iAdwwuhkg2puPhlk2fKOerzjkgMQncYtLAleR8AgaXRUUHGZOJlVAION2B8jM6rr4EwIngRoVcwN/xYVVTfy5FQ3g2plFdJuKY/On5t961Wq3h/07f9F93aGWd2dubFcxsCyCbmmfYzpah34KZ7z7dAtc5Fgz1eh1+dKjM1J5+x8/f7GGWnhldYGtFKKv6YLCGYQVDT6rPfs0EUmqtbSquSNVLH2R5i2NFOrtGhvWImvp2FnvjHuf9Qlj8e75EgJu0jBnUFe8wAdUU249q+P+5i40+9Ivzsx7pe9YeDvTZ07QfPwYNjb5Y4ANxjcGQd7UsnYTxuQVhg/LuwNNlWwUJjf47VvCIvcs1b9BbiM6FK+SwJYKUHXafk3bHEzwiMy/kjTYS9TlM7PgI7Rpvbf6m1vRRJDgWMbV93Dg3PzA2jWCXoyGeOvjdsV4gmB/E+g1GwtzqffOXDxhbKY+J/EfQM8u50BJy4CJmjRDpDoGslOA1mRI+Vl+ukDuQbnTV/ONLyZ2ScU9/xdo8nfraTWE3dnHu6MIApCJuEJeQCW8TBCz7FPOPtzs7i/g3Wykw/pwEp/D/WAqlz2eYAz+kb+TKTSMZS6KG13ZpcpK8K4DghcVe5nk2IVOucL8RRE= 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)(136003)(376002)(396003)(39860400002)(366004)(346002)(451199015)(31696002)(36756003)(66556008)(6512007)(86362001)(31686004)(186003)(66476007)(83380400001)(44832011)(2616005)(8676002)(41300700001)(2906002)(53546011)(316002)(38100700002)(66946007)(26005)(6486002)(478600001)(5660300002)(6506007)(8936002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5800 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: DBAEUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 496505b9-433c-4c42-faf0-08daaceb2330 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WVIic8ow7ns+Kl1cWtN2L2P/f27HLWmP94eGsDs09aAVcf8uOd8h6UXfK2Le9hhS8doTMzG07tTQ6zgNVaL/zKd6lpzFcaKdvTfHhOiWhqEI8Md7bArSMlF8LaeYcMPtEjGnw+Xip+loYlUYSt7VdndT7lwTCQ+iCh/ElvXdHX62AmbEyObQODnBzdm+KgwjEPQ1nd8AnnTjpr06BehKASqtG5fxouxMzxjKiF1R884XnQKlkykG6FSnQ+BNVVkVil3FwNll3KqilexTp6ESsrlWDh0NnPzzFgQOxOD+5V0JxQoJH2fTm7BsrO8itMjmCT8N0vYh1HDMf1V/qbeICgJjC/yiuCO0/EM404CGl9pRJJ36XcpzGzz6wPAgUgxRZbmQvmAqm5X3c8D2+aJvGLlsQuSCveKCHXq1EAZMxbPdknsA9aU+JtogCL11QuTJ/DMwUX3/JLnvW3GDikIV3Jphd9yO63HzyGuJeQmlLqxn/pUgIUc46Sbl+Gzq7km9Z+8IX+QjBxD9EtfmQI29vBWv+gyWlnk72dJdG5zoqaw7BskLa5koACerLb7f1Uc7+IWjys21eO2Hl4/vyFnqnDljtB+9Ttdp9RttFYdI6VugzAxN1eCcxSM2rD7liy1w4YbuuqRIGWVmGOxIMGWceB/PNmJe0xm7CxcgL69haF39k4yo7wYMgyw+xOHZAy+rmOMXIUA87LK3w908TfR0xxuDp9NEMq9KxzOnP+yRywmx89UAcJaHqByZlhbsbapYc8uRwtkIl7+Qd9p1PD2JZgV9pfBl4YfEbXtqYmZX/DA7NbbWGMwWoAAP2EMBHE6b 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)(346002)(136003)(376002)(396003)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(70586007)(70206006)(316002)(8676002)(86362001)(41300700001)(26005)(6506007)(40480700001)(53546011)(47076005)(6486002)(478600001)(36756003)(2616005)(40460700003)(2906002)(36860700001)(83380400001)(336012)(186003)(356005)(6512007)(31696002)(81166007)(82310400005)(8936002)(44832011)(5660300002)(82740400003)(31686004)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2022 07:18:44.4527 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a691d2ba-c4b7-4d06-1820-08daaceb29c9 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: DBAEUR03FT049.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8640 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, BODY_8BITS, 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 07:18:54 -0000 On 10/10/22 15:56, Pedro Alves wrote: > Hi, > > On 2022-10-04 9:43 a.m., Luis Machado wrote: >> >> >>>> -   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) >>>> -{ >>>> -  arm_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); >>>> - >>>> -  if (tdep->is_m) >>>> -    { >>>> -      const target_desc *tdesc; >>>> - >>>> -      /* If we know from the executable this is an M-profile target, >>>> -     cater for remote targets whose register set layout is the >>>> -     same as the FPA layout.  */ >>>> -      tdesc = arm_read_mprofile_description (ARM_M_TYPE_WITH_FPA); >>>> -      register_remote_g_packet_guess (gdbarch, >>>> -                      ARM_CORE_REGS_SIZE + ARM_FP_REGS_SIZE, >>>> -                      tdesc); >>>> - >>>> -      /* The regular M-profile layout.  */ >>>> -      tdesc = arm_read_mprofile_description (ARM_M_TYPE_M_PROFILE); >>>> -      register_remote_g_packet_guess (gdbarch, ARM_CORE_REGS_SIZE, >>>> -                      tdesc); >>>> - >>>> -      /* M-profile plus M4F VFP.  */ >>>> -      tdesc = arm_read_mprofile_description (ARM_M_TYPE_VFP_D16); >>>> -      register_remote_g_packet_guess (gdbarch, >>>> -                      ARM_CORE_REGS_SIZE + ARM_VFP2_REGS_SIZE, >>>> -                      tdesc); >>>> -      /* M-profile plus MVE.  */ >>>> -      tdesc = arm_read_mprofile_description (ARM_M_TYPE_MVE); >>>> -      register_remote_g_packet_guess (gdbarch, ARM_CORE_REGS_SIZE >>>> -                      + ARM_VFP2_REGS_SIZE >>>> -                      + ARM_INT_REGISTER_SIZE, tdesc); >>>> - >>>> -      /* M-profile system (stack pointers).  */ >>>> -      tdesc = arm_read_mprofile_description (ARM_M_TYPE_SYSTEM); >>>> -      register_remote_g_packet_guess (gdbarch, 2 * ARM_INT_REGISTER_SIZE, tdesc); >>> >>> And what about all these other non-FPA guesses?  Do you really mean to drop them? >>> >> >> 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. 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). I should probably add something to that effect in the future. >> So in my opinion, we should >> drop the g packet guesses completely and rely solely on XML descriptions. > > Then I think that it should be proposed in a separate patch, as it has nothing to > do with dropping FPA support. Makes sense. I don't think we should be adding any other guesses for newer features/regsets. > > Off hand, I don't really see what you win much removing the guesses. The code that it allows > removing isn't something that would block any redesign or big cleanup in gdb, as gdb needs to know > how to create built-in tdescs for core files, anyhow (even if not these particular tdescs), > and the tdesc generation code is even shared with gdbserver. Well, based on recent discussions, we're not going to drop this, as Linux/BSD kgdb is still relying on it. 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.