From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2084.outbound.protection.outlook.com [40.107.13.84]) by sourceware.org (Postfix) with ESMTPS id EEE093858D33 for ; Wed, 8 Nov 2023 11:57:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EEE093858D33 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 EEE093858D33 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.13.84 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699444676; cv=pass; b=WoaTSZD7AAwlpxS2BXpRFO71wv9DkKifT0o7SxpG0zhlX/FLf7ZDvy38ypMNT5tpDytnrxL8KQsCBkCR6QB9Sux+VhfKN3m+aC2DizXc84iaauglK6B0WHtZT0+rZ9n5YztAcFQAfO3QY8vjoIMifRvETEQcdTbTSzcid8Ega+w= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1699444676; c=relaxed/simple; bh=yFrCRrmHmMjxOmY3BT2uokAz812/hqTEtlWmOS7bI9k=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=bvUJ1sgrwZytC+KIpSInb1DZkm9y2PEAZNrPA2we9abrxc7+WPY1SrGuocluaD5od3tqmJZPk9+LksNjn/KoqyauPjUZklhAF3DGiJrIQwWpUo83G1OnT3N0CEBvwlvtzH36qFbP4ldnc9Llr9rhuAg03ApjPQZLGX9KBDn0XhE= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=SuIQ8PxvL3FYS4AGgzo/VK/xuJFODKxj0aY2DkEJgb57xVBcnFUXZxyPah02lPR3AAR/f1lYm+mm8u8jgMfKhmGw2EXKSvjxgOPgF3DHE+yW9jxRtsAAp1WtGRpeR3O2BJkPjAF3/hgBMlVptRwm+NcRYZhMkZBXNvcU28XacoaSaYxEb3DkjRkdKD8wF7Ym7jK6Nqz8A8EM07c4NQ0L6jWUOdJNPnGuVDDJLe6ZRlr5OoYL35+Uf+qSbLkdweKWEu7LqxfwuhnO/jRVa0AAT4pwJBvzf6L8o6ytMrispoeSv4SciAB5OFEZ99lkkKHRQnp+qc42j5rjwOp1aypjsQ== 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=qBBXzsRySlOgssOOIUatzxdjQyhyK8PzqmWX9e0+TSM=; b=k8KM3ZgzZs/cZinBiPtbPDYUO+1YpzRam3i6xMZOEmRHbH4w6fU+R6g4spQtzYtQRmBfG/+BF1wyBkvKgYaIfqA5sWnN+91zk0Vt0mXkg8omymq6k6kObGq4CyvIpfL5ZvYObGonCTw1luI1pFlD/rJalwjIWXP/9uxIFxdAdyVSZNVsAts/YZvLCmIShAv7NfoSQXFN3vy5jnZFyd8J1PhLs6qEj9lN/h+VLPCEQWjPysUk+WBFxULXrBnrN0+NI5nRVESMOYhHLIazOn1r9dCLo1weJyCWJxd83aZ9JXvA+vY0DCsOU0/tuc+eAGq6YgXT7GI6x7M8KXTC/ewJ/Q== 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]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qBBXzsRySlOgssOOIUatzxdjQyhyK8PzqmWX9e0+TSM=; b=HrqY3GQ2tnbKMhvCsVlpB+V+QA/viSetIsRz3TMtrZej7Y0iF4ooRyKWy9pkbN3kqtC7s5bMV1KD2hG9aOowr08Z6w4qub5ZaOElXZWmN2NomTzTAfixEs+Ashqs0bfm0yCfsTZrmtszKDIR3KRP5LmYWo5WAibGHi9bckvjwFs= Received: from DB8PR03CA0032.eurprd03.prod.outlook.com (2603:10a6:10:be::45) by AS8PR08MB6326.eurprd08.prod.outlook.com (2603:10a6:20b:335::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Wed, 8 Nov 2023 11:57:50 +0000 Received: from DU6PEPF0000B61D.eurprd02.prod.outlook.com (2603:10a6:10:be:cafe::f3) by DB8PR03CA0032.outlook.office365.com (2603:10a6:10:be::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.18 via Frontend Transport; Wed, 8 Nov 2023 11:57:50 +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 DU6PEPF0000B61D.mail.protection.outlook.com (10.167.8.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.16 via Frontend Transport; Wed, 8 Nov 2023 11:57:49 +0000 Received: ("Tessian outbound 5d213238733f:v228"); Wed, 08 Nov 2023 11:57:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c608807b39988b77 X-CR-MTA-TID: 64aa7808 Received: from d02a928bc4f4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 87CF789B-7B28-408B-9340-85458B104639.1; Wed, 08 Nov 2023 11:57:43 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d02a928bc4f4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Nov 2023 11:57:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vum22CiIbH520DW2M2teQvDNxzHNmPg7txhrgeRnj1eK8V/twg7jkChBQYugrMCXyOogyb/leyhvY0MAfJT2lZZL+7VYGhxuRKeZDDGlF2BrIlQQTK0k1TeRpXngwUiBn/FCAUtUrx5CBIeco1FVdkA2CxFdGftF74GK+5YOhXKg0T43wn9CbWgBhmN5pqhmQqrfvV9aampJAOmZSDBv/RVVTlkuCKXWCb/txz/XPWeeBVwI83k/16DEuaZEEvqflbTKNSffUf5/ETDBsdTfAe4hjWZpfQFiZyKsqM7+ojUPea25bJfcv4A7dHW21LSKPKzKGMLLQz4aZQREAZieLw== 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=qBBXzsRySlOgssOOIUatzxdjQyhyK8PzqmWX9e0+TSM=; b=akOAe7BaVemQaUdDS9e00lVwdgBiTd7no5OdglT7/USU7tQGwPLCpIz8n50aKTsV4eDNqtv4zAbdi7B9TSVhHTEQ92gdbi2czoINgeHmG0kugQL8ReinA52JsJeUjO2c1ASTALPjYWZCkjPkug6oiiUkpaBIKFbH4KxsvKt2sE+uzDyXLg51r0VZxs4UJac7V2hfnbRXSKJfv8THHuEow3Kr/lXwHlj/qnWbxjDI2+Tqkm01UBnmUaYERQ2f2ZM/Vk3FPhooEOfYkyTdNN4TdopfFR4+kUpfVXs+UWTeidEJnFexsUmHWQUJJlczxAoFyg1KwOTSYusWidW4O8/F+w== 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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qBBXzsRySlOgssOOIUatzxdjQyhyK8PzqmWX9e0+TSM=; b=HrqY3GQ2tnbKMhvCsVlpB+V+QA/viSetIsRz3TMtrZej7Y0iF4ooRyKWy9pkbN3kqtC7s5bMV1KD2hG9aOowr08Z6w4qub5ZaOElXZWmN2NomTzTAfixEs+Ashqs0bfm0yCfsTZrmtszKDIR3KRP5LmYWo5WAibGHi9bckvjwFs= 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 DU0PR08MB8206.eurprd08.prod.outlook.com (2603:10a6:10:3b3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Wed, 8 Nov 2023 11:57:40 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::3e05:d9f5:3a1c:4b2f]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::3e05:d9f5:3a1c:4b2f%5]) with mapi id 15.20.6954.028; Wed, 8 Nov 2023 11:57:39 +0000 Message-ID: <9a693dcc-9213-4300-a4ee-25820bfada78@arm.com> Date: Wed, 8 Nov 2023 11:57:37 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/24] Fix reading and writing pseudo registers in non-current frames Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20231108051222.1275306-1-simon.marchi@polymtl.ca> From: Luis Machado In-Reply-To: <20231108051222.1275306-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO3P123CA0013.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:ba::18) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DU0PR08MB8206:EE_|DU6PEPF0000B61D:EE_|AS8PR08MB6326:EE_ X-MS-Office365-Filtering-Correlation-Id: 30180322-96db-4aa4-6cb0-08dbe051ee66 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: XlXGJSIdgi+aowNje1Uv/H731HMjewyDD8UdiwGyIBUBQGMVZY8w8iDcaUsJOw+gWRICztFef6wAGrgLy52RkA9jg3wA45W1xuQZ+o0zQ1YhHHN/zfD6vYii70pDRYbeQBbustC2zUn/xsMDBfgODkyBHrbEUrvFj62tckrk73uMXHY49Shgj9NXR17IcAXrdNtzvnId7qlwdi7+zfjJm7fY6Tb4VcJypy+rcMQTKXCle9+F4vN/Sv4sivnduDOcFKSioHX1G99hycV1jiMvlHiCIGIV+VpqmlGKhi5EJIMXbtFnDQCix92VXJPCAxgFPre+TOepzXrzQi99a0NeqAtRkZ9ruRkoPdRhggGXDBiyUB5iKvXEP8/9G0eSgI4hIEXf2OkNx4Salp9kSCR4ez0ykaY3mYm5sR+DO7/3AcIVxvb2f2w8KNE7KMxhgAvQZHyg2KH8tVVULHo4uTuOXDYt0xFMukohBHGo0jwNJh3L20MC2WpSRk4cJW4RxjaQnVtWPyqJCPxq6+r1yRD+hp9mq14z0vGL4fn6t50SIpAUb5Ik6xKS3Xv/hZggdVBjvASVhqKpANMrejcnC6wpon0ilpu1yw4xHbRK0vi5rerAG3wVzQ3zFb9KUctdVdI87TdMgnOGJDBhUUobG1Jzmg== 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:(13230031)(39860400002)(366004)(396003)(376002)(346002)(136003)(230922051799003)(64100799003)(451199024)(186009)(1800799009)(2906002)(2616005)(6486002)(53546011)(478600001)(6512007)(66556008)(6506007)(83380400001)(26005)(66946007)(5660300002)(30864003)(41300700001)(44832011)(8676002)(8936002)(66476007)(316002)(36756003)(38100700002)(86362001)(31696002)(84970400001)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8206 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: DU6PEPF0000B61D.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: bc6a9422-4bbf-428e-9f1f-08dbe051e82f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aUDV7sXUroZIuMntT3jY22WwvBHUBsqnuE5O46oqMUjSMxxZWtE7PunQ8qDiw6lFO2ckPIZCL/lmPalNd4x7TcaLZqv0DXKun5OB9za6g4fyIHbcv6NZr5WdgGJ+6KNmeEAmQwNTNdQbXFGrPvWTbE3bqxPfKpNF3oBfNonNaQkwBmbe6i5uuRIujglQaFyTa7rMKndCt1OQARK2Enl/KNFxc7oEMoT/HpRet90/h00cmutS87Q4RtUDRghx2zmiMAefPZTkDAaG4V+AOJWKdYCf63wfa6wLoAkiLLBEu+hciTlI8OSqPZwNiU4sz4ezdGGht4yQ7eATsQiu9AI1Rq26xCpMAch7Hx/aQBzZPSJMjwZZNCl9GTL2Vd2AWDdu3j5C8Ny7SFXmDopEgrSb5U7MRPYYm2Rk2Lv5comI4nUyQ0XqNct725quXcNTHXesxtzV1LzdSxcJqDWJvShcyzwS3O2LZcX1UVIQi1D5xHswn4nsmavkdSPpFAapDV1yhKg6GcKmF1CK88R9whfa2+KwLWdigbRSMhJtjPjzc1bGe48QwRGMDJ7ksjuKKHFeM0m0oDdUvAU6oteuTOZAkyJ4aN09tIrTumDn5yzw1pYrsEuSCKUnvtZp4gNZzpNSY8XxfsJ0VtdFbOXjl67VtIFpuSdewUALDw6n3P+mKYJTdIz0OTuwr7YpOt1I2TKZIHcYQufesHaueV1CBB/YQT1Fx8xdvK8nlHPGNXw0hFso9pr+egWPNPHPQynQXEQ3 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:(13230031)(4636009)(39860400002)(376002)(346002)(136003)(396003)(230922051799003)(64100799003)(1800799009)(186009)(451199024)(82310400011)(36840700001)(46966006)(40470700004)(6512007)(6486002)(86362001)(44832011)(478600001)(31696002)(84970400001)(30864003)(26005)(40480700001)(2616005)(82740400003)(356005)(316002)(53546011)(6506007)(31686004)(81166007)(41300700001)(70206006)(70586007)(336012)(8936002)(8676002)(83380400001)(36860700001)(36756003)(2906002)(47076005)(5660300002)(40460700003)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2023 11:57:49.9563 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30180322-96db-4aa4-6cb0-08dbe051ee66 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: DU6PEPF0000B61D.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6326 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Simon, On 11/8/23 05:00, Simon Marchi wrote: > This series fixes reading/writing pseudo registers from/to non-current > frames (that is, frames other than frame 0). Currently, we get this: > > (gdb) frame 0 > #0 break_here_asm () at /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.arch/amd64-pseudo-unwind-asm.S:38 > 38 pop %rbx > (gdb) p/x $rbx > $1 = 0x2021222324252627 > (gdb) p/x $ebx > $2 = 0x24252627 > (gdb) frame 1 > #1 0x000055555555517d in caller () at /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.arch/amd64-pseudo-unwind-asm.S:58 > 58 call callee > (gdb) p/x $rbx > $3 = 0x1011121314151617 > (gdb) p/x $ebx > $4 = 0x24252627 > > This is a bit surprising, we would expect the last value to be > 0x14151617, the bottom half of the rbx value from frame 1 (the currently > selected frame at that point). Instead, we got the bottom half of the > rbx value from frame 0. This is because pseudo registers are always > read/written from/to the current thread's regcache. > > This series fixes this (as well as writing to pseudo registers) by > making it so pseudo registers are read/written using a frame. > > Simon Marchi (24): > gdb: don't handle i386 k registers as pseudo registers > gdb: use reg_buffer_common throughout gdbsupport/common-regcache.h > gdb: make store_integer take an array_view > gdb: simplify conditions in > regcache::{read,write,raw_collect,raw_supply}_part > gdb: change regcache interface to use array_view > gdb: fix bugs in {get,put}_frame_register_bytes > gdb: make put_frame_register take an array_view > gdb: change value_of_register and value_of_register_lazy to take the > next frame > gdb: remove frame_register > gdb: make put_frame_register take the next frame > gdb: make put_frame_register_bytes take the next frame > gdb: make get_frame_register_bytes take the next frame > gdb: add value::allocate_register > gdb: read pseudo register through frame > gdb: change parameter name in frame_unwind_register_unsigned > declaration > gdb: rename gdbarch_pseudo_register_write to > gdbarch_deprecated_pseudo_register_write > gdb: add gdbarch_pseudo_register_write that takes a frame > gdb: migrate i386 and amd64 to the new gdbarch_pseudo_register_write > gdb: make aarch64_za_offsets_from_regnum return za_offsets > gdb: add missing raw register read in > aarch64_sme_pseudo_register_write > gdb: migrate aarch64 to new gdbarch_pseudo_register_write > gdb: migrate arm to gdbarch_pseudo_register_read_value > gdb: migrate arm to new gdbarch_pseudo_register_write > gdb/testsuite: add tests for unwinding of pseudo registers > > gdb/aarch64-tdep.c | 297 +++++----- > gdb/alpha-tdep.c | 11 +- > gdb/amd64-tdep.c | 82 +-- > gdb/arch/arm-get-next-pcs.c | 6 +- > gdb/arch/arm-get-next-pcs.h | 5 +- > gdb/arch/arm.c | 2 +- > gdb/arch/arm.h | 4 +- > gdb/arm-linux-tdep.c | 11 +- > gdb/arm-tdep.c | 145 +++-- > gdb/avr-tdep.c | 3 +- > gdb/bfin-tdep.c | 3 +- > gdb/csky-tdep.c | 4 +- > gdb/defs.h | 39 +- > gdb/dwarf2/expr.c | 22 +- > gdb/dwarf2/frame.c | 5 +- > gdb/eval.c | 3 +- > gdb/findvar.c | 50 +- > gdb/frame-unwind.c | 3 +- > gdb/frame.c | 174 +++--- > gdb/frame.h | 28 +- > gdb/frv-tdep.c | 3 +- > gdb/gdbarch-gen.h | 28 +- > gdb/gdbarch.c | 40 +- > gdb/gdbarch_components.py | 29 +- > gdb/guile/scm-frame.c | 3 +- > gdb/h8300-tdep.c | 3 +- > gdb/i386-tdep.c | 380 ++++-------- > gdb/i386-tdep.h | 15 +- > gdb/i387-tdep.c | 16 +- > gdb/ia64-tdep.c | 18 +- > gdb/infcmd.c | 6 +- > gdb/loongarch-tdep.c | 3 +- > gdb/m32c-tdep.c | 3 +- > gdb/m68hc11-tdep.c | 3 +- > gdb/m68k-tdep.c | 17 +- > gdb/mep-tdep.c | 3 +- > gdb/mi/mi-main.c | 3 +- > gdb/mips-tdep.c | 29 +- > gdb/msp430-tdep.c | 3 +- > gdb/nat/aarch64-hw-point.c | 3 +- > gdb/nat/aarch64-scalable-linux-ptrace.c | 20 +- > gdb/nat/linux-btrace.c | 3 +- > gdb/nds32-tdep.c | 8 +- > gdb/python/py-frame.c | 3 +- > gdb/python/py-unwind.c | 4 +- > gdb/regcache.c | 548 +++++++++++------- > gdb/regcache.h | 113 +++- > gdb/riscv-tdep.c | 13 +- > gdb/rl78-tdep.c | 3 +- > gdb/rs6000-tdep.c | 21 +- > gdb/s12z-tdep.c | 2 +- > gdb/s390-tdep.c | 3 +- > gdb/sh-tdep.c | 9 +- > gdb/sparc-tdep.c | 3 +- > gdb/sparc64-tdep.c | 3 +- > gdb/std-regs.c | 11 +- > .../gdb.arch/aarch64-pseudo-unwind-asm.S | 82 +++ > .../gdb.arch/aarch64-pseudo-unwind.c | 33 ++ > .../gdb.arch/aarch64-pseudo-unwind.exp | 90 +++ > .../gdb.arch/amd64-pseudo-unwind-asm.S | 66 +++ > gdb/testsuite/gdb.arch/amd64-pseudo-unwind.c | 33 ++ > .../gdb.arch/amd64-pseudo-unwind.exp | 91 +++ > .../gdb.arch/arm-pseudo-unwind-asm.S | 81 +++ > .../gdb.arch/arm-pseudo-unwind-legacy-asm.S | 84 +++ > .../gdb.arch/arm-pseudo-unwind-legacy.c | 33 ++ > .../gdb.arch/arm-pseudo-unwind-legacy.exp | 86 +++ > gdb/testsuite/gdb.arch/arm-pseudo-unwind.c | 33 ++ > gdb/testsuite/gdb.arch/arm-pseudo-unwind.exp | 88 +++ > gdb/valops.c | 31 +- > gdb/value.c | 149 +++++ > gdb/value.h | 64 +- > gdb/xtensa-tdep.c | 3 +- > gdbserver/linux-arm-low.cc | 4 +- > gdbserver/regcache.cc | 69 ++- > gdbserver/regcache.h | 6 +- > gdbsupport/common-regcache.cc | 2 +- > gdbsupport/common-regcache.h | 58 +- > gdbsupport/rsp-low.cc | 8 + > gdbsupport/rsp-low.h | 2 + > 79 files changed, 2324 insertions(+), 1144 deletions(-) > create mode 100644 gdb/testsuite/gdb.arch/aarch64-pseudo-unwind-asm.S > create mode 100644 gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.c > create mode 100644 gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.exp > create mode 100644 gdb/testsuite/gdb.arch/amd64-pseudo-unwind-asm.S > create mode 100644 gdb/testsuite/gdb.arch/amd64-pseudo-unwind.c > create mode 100644 gdb/testsuite/gdb.arch/amd64-pseudo-unwind.exp > create mode 100644 gdb/testsuite/gdb.arch/arm-pseudo-unwind-asm.S > create mode 100644 gdb/testsuite/gdb.arch/arm-pseudo-unwind-legacy-asm.S > create mode 100644 gdb/testsuite/gdb.arch/arm-pseudo-unwind-legacy.c > create mode 100644 gdb/testsuite/gdb.arch/arm-pseudo-unwind-legacy.exp > create mode 100644 gdb/testsuite/gdb.arch/arm-pseudo-unwind.c > create mode 100644 gdb/testsuite/gdb.arch/arm-pseudo-unwind.exp > > > base-commit: 1185b5b79a12ba67eb60bee3f75babf7a222fde0 I haven't tracked the particular patch that causes this, but for aarch64 systems supporting SVE (and probably SME as well) I'm seeing internal errors related to one assertion: Running gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.exp ... PASS: gdb.arch/aarch64-pseudo-unwind.exp: continue to breakpoint: continue to callee PASS: gdb.arch/aarch64-pseudo-unwind.exp: callee, before change: p/x $v8.q.u PASS: gdb.arch/aarch64-pseudo-unwind.exp: callee, before change: p/x $s8.u FAIL: gdb.arch/aarch64-pseudo-unwind.exp: set $s8.u = 0x34353637 (GDB internal error) FAIL: gdb.arch/aarch64-pseudo-unwind.exp: callee, after change: p/x $v8.q.u FAIL: gdb.arch/aarch64-pseudo-unwind.exp: callee, after change: p/x $s8.u PASS: gdb.arch/aarch64-pseudo-unwind.exp: up PASS: gdb.arch/aarch64-pseudo-unwind.exp: caller, before change: p/x $v8.q.u PASS: gdb.arch/aarch64-pseudo-unwind.exp: caller, before change: p/x $s8.u FAIL: gdb.arch/aarch64-pseudo-unwind.exp: set $s8.u = 0x44454647 (GDB internal error) FAIL: gdb.arch/aarch64-pseudo-unwind.exp: caller, after change: p/x $v8.q.u FAIL: gdb.arch/aarch64-pseudo-unwind.exp: caller, after change: p/x $s8.u PASS: gdb.arch/aarch64-pseudo-unwind.exp: down FAIL: gdb.arch/aarch64-pseudo-unwind.exp: callee, after change in caller: p/x $v8.q.u FAIL: gdb.arch/aarch64-pseudo-unwind.exp: callee, after change in caller: p/x $s8.u PASS: gdb.arch/aarch64-pseudo-unwind.exp: continue to breakpoint: continue to break_here_c FAIL: gdb.arch/aarch64-pseudo-unwind.exp: p/x value Running gdb/testsuite/gdb.arch/aarch64-fp.exp ... PASS: gdb.arch/aarch64-fp.exp: set the breakpoint after setting the fp registers PASS: gdb.arch/aarch64-fp.exp: continue until breakpoint PASS: gdb.arch/aarch64-fp.exp: check register q0 value PASS: gdb.arch/aarch64-fp.exp: check register q1 value PASS: gdb.arch/aarch64-fp.exp: check register v0 value PASS: gdb.arch/aarch64-fp.exp: check register v1 value PASS: gdb.arch/aarch64-fp.exp: check register fpsr value PASS: gdb.arch/aarch64-fp.exp: check register fpcr value FAIL: gdb.arch/aarch64-fp.exp: bfloat16: set h0.bf to 129 (GDB internal error) FAIL: gdb.arch/aarch64-fp.exp: bfloat16: h0 fields are valid FAIL: gdb.arch/aarch64-fp.exp: bfloat16: set v0.h.bf[0] to 0 (GDB internal error) FAIL: gdb.arch/aarch64-fp.exp: bfloat16: v0.h.s[0] is 0 FAIL: gdb.arch/aarch64-fp.exp: bfloat16: set v0.h.bf[0] to 129 (GDB internal error) FAIL: gdb.arch/aarch64-fp.exp: bfloat16: v0.h.s[0] is 129 The failure mode is: set $s8.u = 0x34353637^M ../../../repos/binutils-gdb/gdb/frame.c:1441: internal-error: put_frame_register: Assertion `buf.size () == size' failed.^M A problem internal to GDB has been detected,^M further debugging may prove unreliable.^M ----- Backtrace -----^M FAIL: gdb.arch/aarch64-pseudo-unwind.exp: set $s8.u = 0x34353637 (GDB internal error) Resyncing due to internal error. 0xaaaaabd6e08f gdb_internal_backtrace_1^M ../../../repos/binutils-gdb/gdb/bt-utils.c:122^M 0xaaaaabd6e08f _Z22gdb_internal_backtracev^M ../../../repos/binutils-gdb/gdb/bt-utils.c:168^M 0xaaaaac315307 internal_vproblem^M ../../../repos/binutils-gdb/gdb/utils.c:396^M 0xaaaaac31556f _Z15internal_verrorPKciS0_St9__va_list^M ../../../repos/binutils-gdb/gdb/utils.c:476^M 0xaaaaac8604e3 _Z18internal_error_locPKciS0_z^M ../../../repos/binutils-gdb/gdbsupport/errors.cc:58^M 0xaaaaabec89c7 _Z18put_frame_register14frame_info_ptriN3gdb10array_viewIKhEE^M ../../../repos/binutils-gdb/gdb/frame.c:1441^M 0xaaaaabc55243 aarch64_pseudo_write_1^M ../../../repos/binutils-gdb/gdb/aarch64-tdep.c:3316^M 0xaaaaabc5c943 aarch64_pseudo_write^M ../../../repos/binutils-gdb/gdb/aarch64-tdep.c:3414^M 0xaaaaabce0913 _Z29gdbarch_pseudo_register_writeP7gdbarch14frame_info_ptriN3gdb10array_viewIKhEE^M ../../../repos/binutils-gdb/gdb/gdbarch.c:1927^M 0xaaaaabec892f _Z18put_frame_register14frame_info_ptriN3gdb10array_viewIKhEE^M ../../../repos/binutils-gdb/gdb/frame.c:1462^M 0xaaaaabed0fa7 _Z24put_frame_register_bytes14frame_info_ptrimN3gdb10array_viewIKhEE^M ../../../repos/binutils-gdb/gdb/frame.c:1592^M 0xaaaaac33092b _Z12value_assignP5valueS0_^M ../../../repos/binutils-gdb/gdb/valops.c:1260^M 0xaaaaabe8fcdf _ZN10expression8evaluateEP4type6noside^M ../../../repos/binutils-gdb/gdb/eval.c:111^M 0xaaaaac0cba9f set_command^M ../../../repos/binutils-gdb/gdb/printcmd.c:1542^M 0xaaaaabd9d91b _Z8cmd_funcP16cmd_list_elementPKci^M ../../../repos/binutils-gdb/gdb/cli/cli-decode.c:2735^M 0xaaaaac2af583 _Z15execute_commandPKci^M ../../../repos/binutils-gdb/gdb/top.c:575^M 0xaaaaabe97413 _Z15command_handlerPKc^M ../../../repos/binutils-gdb/gdb/event-top.c:552^M 0xaaaaabe9869f _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE^M ../../../repos/binutils-gdb/gdb/event-top.c:788^M 0xaaaaabe97f17 gdb_rl_callback_handler^M ../../../repos/binutils-gdb/gdb/event-top.c:259^M 0xaaaaac3ce363 rl_callback_read_char^M ../../../../repos/binutils-gdb/readline/readline/callback.c:290^M 0xaaaaabe96e93 gdb_rl_callback_read_char_wrapper_noexcept^M ../../../repos/binutils-gdb/gdb/event-top.c:195^M 0xaaaaabe97d7b gdb_rl_callback_read_char_wrapper^M ../../../repos/binutils-gdb/gdb/event-top.c:234^M 0xaaaaac2ea1f7 stdin_event_handler^M ../../../repos/binutils-gdb/gdb/ui.c:155^M 0xaaaaac860ecf gdb_wait_for_event^M ../../../repos/binutils-gdb/gdbsupport/event-loop.cc:694^M 0xaaaaac8618af gdb_wait_for_event^M ../../../repos/binutils-gdb/gdbsupport/event-loop.cc:593^M 0xaaaaac8618af _Z16gdb_do_one_eventi^M ../../../repos/binutils-gdb/gdbsupport/event-loop.cc:264^M 0xaaaaabffe02f start_event_loop^M ../../../repos/binutils-gdb/gdb/main.c:407^M 0xaaaaabffe02f captured_command_loop^M ../../../repos/binutils-gdb/gdb/main.c:471^M 0xaaaaabfffc73 captured_main^M ../../../repos/binutils-gdb/gdb/main.c:1324^M 0xaaaaabfffc73 _Z8gdb_mainP18captured_main_args^M ../../../repos/binutils-gdb/gdb/main.c:1343^M 0xaaaaabc3b457 main^M ../../../repos/binutils-gdb/gdb/gdb.c:39^M It is also worth noting that the v registers are *not* pseudo-registers when the aarch64-fpu feature is used. If SVE is available though, then that means the v registers are pseudo-registers as well. You can tell them apart by their types. Real register (no SVE support): type = union aarch64v { vnd d; vns s; vnh h; vnb b; vnq q; } Pseudo-register (SVE support): union __gdb_builtin_type_vnv { __gdb_builtin_type_vnd d; __gdb_builtin_type_vns s; __gdb_builtin_type_vnh h; __gdb_builtin_type_vnb b; __gdb_builtin_type_vnq q; } Please let me know if you want me to narrow this down or provide more info.