From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2049.outbound.protection.outlook.com [40.107.22.49]) by sourceware.org (Postfix) with ESMTPS id E67493857034 for ; Tue, 17 May 2022 06:42:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E67493857034 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=aB784k47IU3HTnpvG/Y2xEqz/9ddvln8E9yddB9huywzuWPQCF9DTfDioAw4pcuEhozVifKKJc1zu9dIeZjwmGQh2huet9Wuf9u8WGitn5TjlxoQj4VtpLTOhT8deDOxv6JIw7L1PEvWYvVyQsKI5b8Pi2mH/EoAXbHRPn99G0RoqPSfgoW85AHF/Gj+JAkaz2IlqXQOaAc7GfrhWQz/zMlZED5+wl4pRWBSRMayL8gWlwniEZzdQ1PdntTsWINqEhNr3rsG7pHo/Yt0tK4Lxj0gvnlT84m/wVgule2vF34WadQf/pkaQZUIjRXBWYDH1oZt+ISPmDN6yfLWsS3zKw== 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=zSj/uNOO6hLj9QSzbN9CMEdFZlLoLOMaGkXe7fbd/JQ=; b=T49rr0u39C6a+zET3tc1LR/zhRN3QiJ67QSmjxdQvKqLi6TAQzei/ELIy6lHKvQ5iR0OGWxLoH8arRSXiavF3k8hyVCgvnu5PHSr+GLVaQcZRE/7lidMdSKOtbn4Wmu7mjyjE8KPutJgXmCr9BviMC7G5WBWUjscVxW6qzL7mks5X2rnLYA86py/PoTlLRZjWEBBMT8q9d6hJDQCMR2106+LfsEG3GUGR9JixPxuLJKZmQUto1ZDdzhRQq6GKibS0HCBEKZNDOC090akSm8N/MIhUfnL9vwrT23bvRajMxSp9mZZeKPtVXJZsPBXj/l5X+t6a15rZzV5JHlqxwnwdg== 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 AM7PR03CA0018.eurprd03.prod.outlook.com (2603:10a6:20b:130::28) by AM0PR08MB3522.eurprd08.prod.outlook.com (2603:10a6:208:da::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Tue, 17 May 2022 06:42:13 +0000 Received: from VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:130:cafe::2a) by AM7PR03CA0018.outlook.office365.com (2603:10a6:20b:130::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18 via Frontend Transport; Tue, 17 May 2022 06:42:13 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT020.mail.protection.outlook.com (10.152.18.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13 via Frontend Transport; Tue, 17 May 2022 06:42:13 +0000 Received: ("Tessian outbound 6580ae46f51e:v119"); Tue, 17 May 2022 06:42:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1385ecd06447434a X-CR-MTA-TID: 64aa7808 Received: from e457f25d6f5e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9FAAFEF3-D476-4DEE-A81D-52D8A28453EC.1; Tue, 17 May 2022 06:42:05 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e457f25d6f5e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 17 May 2022 06:42:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T0oxwgXgp9lFBm6MOpmr3QMq0+uls2EMjRC2japKFpudvARv0MdYAXwMfvlH2GznjnYhDTqaOG45vtqobUYGogUtuZPG8c7txXRSwtBpH5VIdxisGq+OZLo8/qwuybXn6Dm5wR63d+rnkp9BIOdy0tcPZuNQFGVyYGalee1fa/MmM8d/AWbLIFbbKiUrH3wQQoSlxHpAtH8Mte5kj1fmZxjabbjxIqoMsA51H9Bw9IvU5AFGblVBGkj97Plg62YrF1YDx9rEJ7Cgpp9HZXTw3+uLvwfVThw8Uu5IYV3M79erhNCKPrZo0XH1uzA2UXWyNpNbxXGQUwGBlTw+Unh+aA== 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=zSj/uNOO6hLj9QSzbN9CMEdFZlLoLOMaGkXe7fbd/JQ=; b=gQuUOsxcl8OeqK7DTM2TWnY0C8uXt0g7VOTxOYX6QWjpZ5izvrYRM35KRrWK/AUnBhgRWDKhnxUQ1ju/M7oHWI+ryEiCAoWVtpmSSfgGxWoxHK6a0+Ye6vu2/OW/EX9gI4eV57B3oEX+OwmYqOyw+5qqoferwCei5hXMeBndzD3bqqaDSjHHRMT7YxpTkDlD2SA91nkk5yGJRcW//cQNlsn3J77b9YwGrPnpTfndGYZJZT9iQwDwYxcJ8yJN2fkcQVPa6ckxrlckTnNLzIeO2BFetFw4ig6o+5Lbix/1Un/3A2HeYuV/L+x92Cpj+Bd99RWOzRIwyf3NRceP4S+VOQ== 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 DB8PR08MB5369.eurprd08.prod.outlook.com (2603:10a6:10:11c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.18; Tue, 17 May 2022 06:42:03 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7080:6233:cf8f:a8a6]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7080:6233:cf8f:a8a6%7]) with mapi id 15.20.5250.018; Tue, 17 May 2022 06:42:03 +0000 Message-ID: <058f6593-89ed-e13e-d082-def468995317@arm.com> Date: Tue, 17 May 2022 07:42:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-US In-Reply-To: <20220516132534.3264515-1-yyc1992@gmail.com> To: gdb-patches@sourceware.org, Yichao Yu From: Luis Machado Subject: re: [PATCH v2] Return the regnum for PC (32) on aarch64 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0089.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::29) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: cae4b00b-f187-4d14-99bb-08da37d0601c X-MS-TrafficTypeDiagnostic: DB8PR08MB5369:EE_|VE1EUR03FT020:EE_|AM0PR08MB3522:EE_ X-Microsoft-Antispam-PRVS: 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: OPvgmMa9FM1dslx35ovP8u1qJ171Lx866ZlpiEPPuAWKtxiYa/F2fwNiHAEslVq9pg2kjUoGkQVyhZ22d4C4iGUY0a38ihIvDKRCMnM6yqSR6Pm6H7j3du3NyekzEcrMZkaRtK5st4iYxGuFiz/8z8fhjuZu4zdIGQk+eoprn6wR07CfUxa1N1o/BMRCbgPq4GX27W863rY2c42/z2aKzJUSDG3EAtnj9IzCgOjWi7umOAEju1lh2HyzAXN9iFXSHVufHueMlkNiZpy3rIsmAJp4Et64g03M275uuU/d6TjGhGf+0QXmBspndx6EiHPL7waVzb45PDuMz+z14F+cLKktg4IJnRS7GjEW7x6n10ktJce2ScZwY+252OYljPk824hNSQFK50r2ppTqK/WFu8bzM6bZUs7KElQ17vzNHJ8sB9KvMhoQDIr0alEAp33IhHbOVBIC1VOijAMT8Z06qVpEAgY+8dq4jqG48VwCp4NUfaViOOA/uBqxtMOTyk+o+J4FCT8dBUHXFLdSdxmF7PNioHfnZxeaK2Ayun6VkKCmmLsiO0xllNn5iBQmEpZBk/mngF5F1mSOtpuF3wzhDdWYXXxZDV0Kjo2bkAIHw/1phzyCMD1Wt2Mh26YYyUNxyi+T/MjczYXjf4M5aJboUR6hDScrcUWuwwOD/tNjODoG7TrzrHt5THlBwfyeg22ZaJCLGROwCz2QMxYMpUwJteCMyPNZnSwnm8nagDLTntSuq9ADDDF7yqNkRW8iApBn2O3U7VoW1Q73DXW7qIT3EqNyZwvRayzfyjbMllOPIwG8g6P6yQ6gw+nMsao+43yM/k7ZFVf41Gf52KndKvK4gsYUEgaLcO1aOTWNmiFt55gRZ+UbFthtgZXWpTmifpm+ 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:(13230001)(4636009)(366004)(5660300002)(66946007)(31696002)(66476007)(86362001)(44832011)(26005)(8676002)(66556008)(38100700002)(6916009)(316002)(2616005)(31686004)(6506007)(508600001)(36756003)(83380400001)(8936002)(2906002)(186003)(6486002)(966005)(6512007)(2004002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5369 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: VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: fcc1a990-6a5a-4a24-8f7c-08da37d05a0e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ipyl3TfPYRc6INUzoacV2CquN0F+MXH50xMxAX/NyUuUnHND1m6sUYGkGkWi4cTbGW3TaGaruWcO0B09E4a228FZjUXoWoTf5GlYpz8aSwf9vw84e94tAV2bDL6ugj0VkNi1ct8swtsQRgCUBM1b1obOz/ue1biMDGYApfrhTIBgpy3DPEi8iZnf3KEkOVkD58ob+Su7WSjUYintR7aZLlSjBiygMzFN4kwCi3mz/MxwL22TVbhDclPQyTr/CCwWuR9NI1gCdgxf9u0Idn/M3aLXBXqpnwNBeqRwcfshFFjul/Wo/GYpstMMe6VzoTVlrz8F63/RNfhIYSHAccbxemHnVXAvyTLIymf8KRWp9t16QCmvej1wqlKYfa53xLxe3hjvr45uK4q3dw2wm2rAiBzboTbhmPjT2O2YV0qRwoK8U2ZyoaHzAjmejVYRYrJHvmx4LA3A+SJ7tkZgH2aEMm68yJ70tov36iDomZZ4vY0qiGKLRhMDRKpq2dhP7p3jUqsS4ayQRQAYZiIuL0oyLHZY4TBq1ulqzSFRvrtve8bnw+VBocDfW6oZ0R4IDLKgiP+I6lQbxem9WU4acHG6it5r5VQSh4Xk76BGTikRSRLYE1O9vwPxvs/5w226Nu4mJTwzDxSIUSRbEaO1BWIEssySC2ECKCeAorm9rFOczETbTi0bbCq+JwWjC8ynmKF6TZ8sX6upM2Qstji60bZlU8BN4aR3pFRKE2NteB6QVd7dWHmZ/hHQ3irdTwHEwNSfASNhtaY11gxQZ44Gr/N51LknS99ibZUZF/JfcQkHcBrHGdlNA24cWlDjxaab6+zbGqnGbixGZGJjsDVhhxfs/V45iUBgGYvbxY7eVozyQ6k= 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:(13230001)(4636009)(40470700004)(46966006)(36840700001)(356005)(966005)(8936002)(6486002)(40460700003)(36860700001)(31696002)(36756003)(70586007)(86362001)(70206006)(6862004)(8676002)(6512007)(186003)(5660300002)(336012)(47076005)(82310400005)(44832011)(83380400001)(2906002)(26005)(6506007)(508600001)(2616005)(81166007)(316002)(31686004)(2004002)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2022 06:42:13.0106 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cae4b00b-f187-4d14-99bb-08da37d0601c 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: VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3522 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, 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: Tue, 17 May 2022 06:42:18 -0000 Hi, > This will allow the unwind info to explicitly specify a different value > for the return address than the link register. Such usage, e.g. for signal frames, > is mentioned in aadwarf64 from ARM. I'd complement the description saying that although this is uncommon, it is a valid case. > > Ref https://sourceware.org/pipermail/gdb/2022-May/050091.html > --- > gdb/aarch64-tdep.c | 3 + > gdb/aarch64-tdep.h | 1 + > gdb/testsuite/gdb.arch/aarch64-unwind-pc.S | 48 +++++++++++++ > gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp | 72 ++++++++++++++++++++ > 4 files changed, 124 insertions(+) > create mode 100644 gdb/testsuite/gdb.arch/aarch64-unwind-pc.S > create mode 100644 gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp > > diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c > index 9d06ebfe27c..f9eb455232f 100644 > --- a/gdb/aarch64-tdep.c > +++ b/gdb/aarch64-tdep.c > @@ -2219,6 +2219,9 @@ aarch64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) > if (reg == AARCH64_DWARF_SP) > return AARCH64_SP_REGNUM; > > + if (reg == AARCH64_DWARF_PC) > + return AARCH64_PC_REGNUM; > + > if (reg >= AARCH64_DWARF_V0 && reg <= AARCH64_DWARF_V0 + 31) > return AARCH64_V0_REGNUM + reg - AARCH64_DWARF_V0; > > diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h > index e4cdebb6311..aa1bedbdac6 100644 > --- a/gdb/aarch64-tdep.h > +++ b/gdb/aarch64-tdep.h > @@ -34,6 +34,7 @@ struct regset; > /* AArch64 Dwarf register numbering. */ > #define AARCH64_DWARF_X0 0 > #define AARCH64_DWARF_SP 31 > +#define AARCH64_DWARF_PC 32 > #define AARCH64_DWARF_PAUTH_RA_STATE 34 > #define AARCH64_DWARF_PAUTH_DMASK 35 > #define AARCH64_DWARF_PAUTH_CMASK 36 > diff --git a/gdb/testsuite/gdb.arch/aarch64-unwind-pc.S b/gdb/testsuite/gdb.arch/aarch64-unwind-pc.S > new file mode 100644 > index 00000000000..6cc4f80e349 > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/aarch64-unwind-pc.S > @@ -0,0 +1,48 @@ > +/* Copyright 2022 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > + .text > + .globl main > + .type main,#function > +main: > + .cfi_startproc > + stp x29, x30, [sp, -16]! > + .cfi_def_cfa sp, 16 > + .cfi_offset x29, 0 > + .cfi_offset x30, 8 > + bl test_func > + ldp x29, x30, [sp], 16 > + .cfi_restore x29 > + .cfi_restore x30 > + .cfi_def_cfa sp, 0 > + mov x0, 0 > + ret > + .cfi_endproc > + > + .globl test_func > +test_func: > + .cfi_startproc > + // Unwind x30 to a different value > + // CFA_val_expression x30 const2u 0x1234 > + .cfi_escape 0x16, 30, 0x03, 0x0a, 0x34, 0x12 > + // CFA_val_expression pc breg30 0 > + .cfi_escape 0x16, 32, 0x02, 0x8e, 0x00 > + mov x0, x30 > + .cfi_register 32, x0 > + mov x30, 0x1234 > + ret x0 > + .cfi_endproc > diff --git a/gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp b/gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp > new file mode 100644 > index 00000000000..745c286fef5 > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/aarch64-unwind-pc.exp > @@ -0,0 +1,72 @@ > +# Copyright 2022 Free Software Foundation, Inc. > + > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +# This file is part of the gdb testsuite. > + > +# Test explicitly unwinding the PC DWARF register on aarch64 > + > +if {![is_aarch64_target]} then { > + verbose "Skipping ${gdb_test_file_name}." > + return > +} > + > +standard_testfile .S > + > +if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { > + return -1 > +} > + > +if ![runto_main] { > + return -1 > +} > + > +proc test_reg_vals {} { > + gdb_test "p \$pc - &main" "= 8" "p \$pc" > + gdb_test "p \$x30" "= 4660" "p \$x30" A suggestion is to use p/x to print x30, that way you don't have to deal with the integer value. It would print 0x1234. > +} > + > +proc test_unwind_pc { inst } { > + gdb_test "si" "$inst" "single step" > + gdb_test "backtrace" \ > + ".*#1.*in main ().*" \ > + "backtrace" > + gdb_test "up" "" "parent frame" I noticed the above test also PASSes regardless of the output as well. Could you please address that? > + test_reg_vals > +} > + > +# Ready to enter the function > +gdb_test "si" "bl test_func" "call site" > +# Step through the 3 instructions in the function to make sure that > +# we have the same unwind info throughout. > +with_test_prefix "1st stepi" { > + test_unwind_pc "mov x0, x30" > +} > +with_test_prefix "2nd stepi" { > + test_unwind_pc "mov x30, 0x1234" > +} > +with_test_prefix "3rd stepi" { > + test_unwind_pc "ret x0" > +} > +# Check again after we returned > +with_test_prefix "final" { > + # Check that we've stepped out (si prints out the new function name) > + gdb_test "si" ".*main *().*" "single step out" > + gdb_test "backtrace" \ > + "#0\[\t \]+main ().*" \ > + "backtrace" > + test_reg_vals > +} > + > +gdb_continue_to_end "aarch64-unwind-pc I think v3 will be good to go. Thanks! Luis