From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2040.outbound.protection.outlook.com [40.107.22.40]) by sourceware.org (Postfix) with ESMTPS id B5F1F3858024 for ; Thu, 4 Jan 2024 12:38:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5F1F3858024 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 B5F1F3858024 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.22.40 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1704371884; cv=pass; b=saVqEouD1YWLelYGRmLi6SY4HEex/zNI9XYfzz5HJbUu0F96oLEaH2eB/MFvKYteA3o6K9gVcvyOpwFeJYJ9stChARAAteZTCYiZre0G18Y8G8f8Eo/LZDtIRF/pnNg9iNQgGudGejiCpXvQODMvxhX5wFIZ0hKuQ5PQYPclKTk= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1704371884; c=relaxed/simple; bh=N6ZjcIjChLb3IEGpHLZSCuNOEYJnsZbQWoFpNDiYmRc=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=adsWlguOOemD/ab7xblvYclj54r9rAMfKmZSePkzuuFLiY1rJhOXPc3VgKotcm64sKVW4NrcOTU9jVOIlEl/HFpWviKgUKgdRnJoY/tKmZz+uFyvCLM1jANfYWyls5i514Cac20kES7fA3Fa5oDpG8B1gLPzAk1BqGlv0N7RwHo= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=QBJXof3zvm4BzNxyRxsBENI23eo4JPB+iHJuJlhDOoW3uxuHupG23mCpJIRpKec2vF6TpcTgwdUIHBI8kuF772bdxAUSLqS+h/ndYHsNZg5/K2CTiasLAsM6dONYq2qT+P/Pn+d6XJrBD37Ix3uGnfW2DcVqLiONNrD4VkaK0uXWD0NHWFUk4rPgS29D3/mEfQd1C7nhWZnJgtq0ho4IcP9LOigdaQ0t+Jc5Rg9wTMnmB3QQG5566FkB+q1Hu//NFMt9XSJ1CMfqYeyRwuWDiUu0siFUgbStTPA1sPmPaxO0EogT+6yvIfuwnceoSeGXSOHkbsEm15vo56AefAIyEw== 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=aJ0pd8Za13AFg6EWCXgXnTgRTrxCcBgwvyMz7haoxKQ=; b=L7flQgGWrI0iwifRAUbt1rOznzZ7ff7Qmf490fuEfpo39+rkAhn1APGQMZm4jCOPaAMAlK1PgnSCzJLN+qe7poGgKniFk+oUxRqbkRMDA5wgCR9OLKNjAqx2xHSofVl+bDxvRTvEX/t0iXQAh+rirqJFewD+Zg2I8FriD366X29MGIxjKE6Whjjcka7saNpSpUk7ZDmxVK88nNGmqWNPPeLXhg/bbUy7gW/mPP1ePG9Daq8Xf93UiP9lQtvcbHgJV/o0n4tUX8hS8rUTt+pzwgya8bx83WI7Ms6uPkR2xDtqGpDmtqwhJTAWnTmBMQRRQRtFu/tXs4C57/ybhJh09Q== 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=aJ0pd8Za13AFg6EWCXgXnTgRTrxCcBgwvyMz7haoxKQ=; b=zKGvUmyfAU/GyXEjYfeYhENqaf1js6P8H5kABKrhmxd9noXdvOme9U4qYcrXKRuRWJghxkzgpIh7l9A+k8jZ/4ZIkfE1IB7feeCKvM6dj/RkA5tBtFCUdU2um4fjsPZ+CTd1JKJ4sfIpbokqMVb0U+Upe2qX9XYxDqGgJ7NJJC4= Received: from AS4P195CA0019.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:5d6::6) by PA4PR08MB6207.eurprd08.prod.outlook.com (2603:10a6:102:f2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.15; Thu, 4 Jan 2024 12:37:58 +0000 Received: from AM4PEPF00027A64.eurprd04.prod.outlook.com (2603:10a6:20b:5d6:cafe::87) by AS4P195CA0019.outlook.office365.com (2603:10a6:20b:5d6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13 via Frontend Transport; Thu, 4 Jan 2024 12:37:58 +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 AM4PEPF00027A64.mail.protection.outlook.com (10.167.16.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Thu, 4 Jan 2024 12:37:57 +0000 Received: ("Tessian outbound 9bee66383d2d:v239"); Thu, 04 Jan 2024 12:37:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4274e7f2306a4ce8 X-CR-MTA-TID: 64aa7808 Received: from 180af0e96024.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 87EBBC97-C7C8-4DC3-A4B4-48216ADE02DF.1; Thu, 04 Jan 2024 12:37:51 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 180af0e96024.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 04 Jan 2024 12:37:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I91OK0SBPltuVHZKsWW93TzSEwyzBostdw1qA1io07P06J5jPTJRHR8UJSL3oduCIyVbN2tEChIn3HnFvsVavBmHz5w/iaqMvEnT2326XjmF1p2wjamhWC8S6QC1IvF5zpqYrBXz1tOcJvuQjMfuWGY1OXpNqy9X7cPKWe0wZqWy6YIX59zYDyQ2WSI6fC+yB+FS2Fsv7YihbmTWez2nkYAVrRSHW2JGFuBjk6q/rbXroI8vQPgPkiw/FbWzp34Cl8VkE8K3up4JCEo9BVjrIiit1GdYCsVYUfvVKyl4/VknP18dmY3eVANbD1e+ORGoEbuqK2hFaM99CDrF8TEv3g== 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=aJ0pd8Za13AFg6EWCXgXnTgRTrxCcBgwvyMz7haoxKQ=; b=IzHEutljtL/+QmK4luT8AALA3Xw16BglOJZYJR1sBnvavqscmb4f8nKlgp2KFweNBSm6rgmwOYjRxmv2U+GKSkOpSlYQmfRU9MjwlBjryLcvQsmrJI3fnuG2jFsIz89I5OGGf0pFrKi1iBoeYiSXYgRU0WUPadxM6YW8D9CDO9rbq5XCgjDtimjxgATQ7cOn6UY/1sjzPCvbwNJ5Yawt4BmJlPDriMvNGmjV+21opJ2XGEKKC9+q2k4TRz2FQKpjdGxwcXneyulOIFcnprwiA2zAdVjqiKSg14N3FksjmaKDRNOx7YVJWbBLICGfNxv+xSM3WuUZbFEFSwuOlKRV1A== 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=aJ0pd8Za13AFg6EWCXgXnTgRTrxCcBgwvyMz7haoxKQ=; b=zKGvUmyfAU/GyXEjYfeYhENqaf1js6P8H5kABKrhmxd9noXdvOme9U4qYcrXKRuRWJghxkzgpIh7l9A+k8jZ/4ZIkfE1IB7feeCKvM6dj/RkA5tBtFCUdU2um4fjsPZ+CTd1JKJ4sfIpbokqMVb0U+Upe2qX9XYxDqGgJ7NJJC4= 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 DU2PR08MB7376.eurprd08.prod.outlook.com (2603:10a6:10:2f4::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Thu, 4 Jan 2024 12:37:49 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e05e:c012:f1f9:eb51]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e05e:c012:f1f9:eb51%4]) with mapi id 15.20.7159.013; Thu, 4 Jan 2024 12:37:48 +0000 Message-ID: <34aeb7a0-7d85-4197-9779-d07161aaae3c@arm.com> Date: Thu, 4 Jan 2024 12:37:46 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/testsuite] Handle PAC marker To: Tom de Vries , gdb-patches@sourceware.org References: <20240104112823.25265-1-tdevries@suse.de> Content-Language: en-US From: Luis Machado In-Reply-To: <20240104112823.25265-1-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0655.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:316::9) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DU2PR08MB7376:EE_|AM4PEPF00027A64:EE_|PA4PR08MB6207:EE_ X-MS-Office365-Filtering-Correlation-Id: 979d7fbe-286c-48db-f6e1-08dc0d21fb36 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: ZHK4+MUlDbun/7GgJ61OCO08CNTS2QrMaEBR8WmuspJXA7uuR2Fk+yix0eISDrgX0BSYvkyuN375uTN+XolvyMhrXBGewpJ2cDMHmmrliC8gbieyw18DPMfXKZXKTDXe0AjoCL1pc89vcMz3OVykKJCrdqpnuQXHdL90QZcDdHMnNj/kbfyizz3oZhB6DUpcVOHB2jqPyDZ6lSmxSphsZssQW2L/KbFEKtjI21qkzXknVgC9aNf+4juNsdPS1ZI1o+whOyZ7rFtLPN7befk5wMEK+K7rgfTYussfak9jpLROt7PZRf6nVzxhlusA8ntuUdPlZ9mfjdNPPtoW3GJkphcyUOjbA0vQ46AZG3lfEgoAFSEBU1ZBNQV00elqoM/T0maWDaAH1oMfF35NCzWjL90qYcI0tOg1lP2bxpAnfI98PPPyQiiE/zvx8Peg0h60s5iG4eWQN25lSprEm76qPEpofQxTh1dhj5VonSJ0hxAHSfRweIXS+6VpCxZyJA7Oums4yyJjH5A+hLXsu2dVYv9aPj+MWZvdyhLQNPF97ZU0bC3DjhEcAKsUHMHXOr4t+OO6RXN7TJU/l6VDmjRWn8uuqq7iB9Oc4q53q++0orTfv2CoaTVqmgyXi6VjaJ0QEIeP9uVpt9u0zV6sB+LKc7kzecVjJ3KNS5GBazF+T8w= 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)(39850400004)(376002)(136003)(346002)(366004)(396003)(230922051799003)(186009)(1800799012)(451199024)(64100799003)(31686004)(84970400001)(36756003)(66946007)(6506007)(6512007)(6486002)(53546011)(86362001)(66556008)(31696002)(66476007)(41300700001)(2906002)(2616005)(83380400001)(38100700002)(26005)(5660300002)(966005)(478600001)(44832011)(8936002)(8676002)(30864003)(316002)(403724002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB7376 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: AM4PEPF00027A64.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 27474939-961c-4fdd-e50f-08dc0d21f587 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1r58wk0moBQlHDg+vFjZBTfCbXPAEerC4PfQjfSzcyrcrZDkhZYEok4nKqoYs4Oz77vCrtEX5pkc+p1pRgz+4IEwlZcyXUe0itKl2VyRUlXwhhaTgO4eCqrhSGrK63OPWhOIbVlnr5ftHuNbqyQDAPg+TbGMi6XKMSrfKDTQCsPY1Wsxnv2RJJGiqcs7+P7x1/Fvdz8PY+WsBMc7dPxY05FrghmFJs2bCbRSwhEeO+dmMYePTR9ywkR0a2pCmp0l6t0ilQnd1fU6vofnLjKHq2YBQMKyE2esHyF2PirWv0cY4ZAQk6hbjhm8IkER5N/rp8yzwiA2gbwWNO2Lb6FPMR+XmVFSUuqvM776G6/tbkKKwphklfX/H4qadriB/w/LKltab3FtFOBOSCU40gZecR9KTP5YIQ++x1H4UDiKtAhEJ/iMySt4AUsulicFZDNmMeFnXsXtlspEqtEZ9dv9T3nMS3A1QG7Cq7Ga3JK9mGS5L/7OY7OrVEVO2R6buCX4hE0qM32E6C9nxxU1toNaLoOnrC4z4HVrutSYjvmcjw6SEIytNUdj+pAKVxmsgze3RP5tu1+mbfyFPhKqK/n3OaJ9asFi2J8ajA/yRLMv5FKPIKePT5ufyCqUxP8nfiaJM4J287zmyzzGI/EcUDaaI2CfaoN7iFLUJPIwEK1emCpFezNdPKJH0ep1F6SYWX9dG+Z8wL0sqoj3ERR5v+IjQyrTUXEcp1xcFfQI28QBWfZW9b6Gn84ST7XJbOscNrKanK4gx/SLWH4qsYdyMmCtxTeKVmMD5ghGHku/cqmVBeE= 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)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(82310400011)(451199024)(186009)(1800799012)(64100799003)(40470700004)(46966006)(36840700001)(40480700001)(40460700003)(84970400001)(31686004)(53546011)(336012)(6506007)(2616005)(6486002)(6512007)(478600001)(966005)(26005)(82740400003)(36860700001)(86362001)(356005)(31696002)(36756003)(81166007)(2906002)(30864003)(41300700001)(47076005)(83380400001)(70586007)(5660300002)(316002)(70206006)(8676002)(44832011)(8936002)(403724002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2024 12:37:57.8751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 979d7fbe-286c-48db-f6e1-08dc0d21fb36 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: AM4PEPF00027A64.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6207 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,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=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: Hi Tom, On 1/4/24 11:28, Tom de Vries wrote: > On aarch64-linux, I run into: > ... > FAIL: gdb.base/annota1.exp: backtrace from shlibrary (timeout) > ... > due to the PAC marker showing up: > ... > ^Z^Zframe-address^M > 0x000000000041025c [PAC]^M > ^Z^Zframe-address-end^M > ... > > In the docs the marker is documented as follows: > ... > When GDB is debugging the AArch64 architecture, and the program is using the > v8.3-A feature Pointer Authentication (PAC), then whenever the link register > $lr is pointing to an PAC function its value will be masked. When GDB prints > a backtrace, any addresses that required unmasking will be postfixed with the > marker [PAC]. When using the MI, this is printed as part of the addr_flags > field. > ... > > Update the test-case to allow the PAC marker. > > Likewise in a few other test-cases. Thanks for addressing this. I haven't seen these failures yet, as I don't have a PAC-enabled-by-default system. This is OK. Approved-By: Luis Machado > > While we're at it, rewrite the affected pattern pat_begin in annota1.exp into > a more readable form. Likewise for the corresponding pat_end. > > Tested on aarch64-linux. > > PR testsuite/31202 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31202 > --- > gdb/testsuite/gdb.base/annota1.exp | 47 ++++++++++++++++++- > gdb/testsuite/gdb.cp/exception.exp | 8 ++-- > .../gdb.dwarf2/entry-value-typedef.exp | 2 +- > .../gdb.mi/mi-catch-cpp-exceptions.exp | 2 +- > gdb/testsuite/gdb.mi/mi-syn-frame.exp | 2 +- > .../gdb.threads/pthread_cond_wait.exp | 2 +- > gdb/testsuite/gdb.threads/tls.exp | 2 +- > 7 files changed, 54 insertions(+), 11 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp > index 90c03d0d385..c38c3556e95 100644 > --- a/gdb/testsuite/gdb.base/annota1.exp > +++ b/gdb/testsuite/gdb.base/annota1.exp > @@ -284,9 +284,52 @@ gdb_test_multiple "continue" "continue to printf" { > # annotate-frame-address > # annotate-frame-address-end > # > -set pat_begin "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\n.*printf(@.*)?\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n" > +set pat_begin \ > + [list \ > + "\r\n\032\032post-prompt\r\n" \ > + "\r\n\032\032frame-begin 0 $hex\r\n" \ > + ".0 \r\n" \ > + "(" \ > + "\032\032frame-address\r\n" \ > + "${hex}( \\\[PAC\\\])?" \ > + "\r\n\032\032frame-address-end\r\n" \ > + " in \r\n" \ > + ")*" \ > + "\032\032frame-function-name\r\n" \ > + ".*printf(@.*)?" \ > + "\r\n\032\032frame-args\r\n" \ > + " \\(.*frame-end\r\n" \ > + "\r\n\032\032frame-begin 1 $hex\r\n" \ > + ".1 " \ > + "\r\n\032\032frame-address\r\n" \ > + "${hex}( \\\[PAC\\\])?" \ > + "\r\n\032\032frame-address-end\r\n" \ > + " in " \ > + "\r\n\032\032frame-function-name\r\n" \ > + "main" \ > + "\r\n\032\032frame-args\r\n" \ > + " \\(\\)" \ > + "\r\n\032\032frame-source-begin\r\n" \ > + " at " \ > + "\r\n\032\032frame-source-file\r\n"] > + > +set pat_begin [join $pat_begin ""] > + > +set pat_end \ > + [list \ > + "\r\n\032\032frame-source-file-end\r\n" \ > + ":" \ > + "\r\n\032\032frame-source-line\r\n" \ > + ".*" \ > + "\r\n\032\032frame-source-end\r\n\r\n" \ > + "\r\n\032\032frame-end\r\n" \ > + "(" \ > + "\r\n\032\032frame-begin .*\r\n" \ > + "\r\n\032\032frame-end\r\n" \ > + ")*" \ > + "$gdb_prompt$"] > > -set pat_end "\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" > +set pat_end [join $pat_end ""] > > gdb_test_multiple "backtrace" "backtrace from shlibrary" { > -re "$pat_begin$escapedsrcfile$pat_end" { > diff --git a/gdb/testsuite/gdb.cp/exception.exp b/gdb/testsuite/gdb.cp/exception.exp > index 2c7ef7793ee..03dd0cb3aeb 100644 > --- a/gdb/testsuite/gdb.cp/exception.exp > +++ b/gdb/testsuite/gdb.cp/exception.exp > @@ -111,7 +111,7 @@ gdb_test "continue" \ > > set name "backtrace after first throw" > gdb_test_multiple "backtrace" $name { > - -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].*#\[0-9\]+${ws}$hex in foo \\(i=20\\) at .*${srcfile}:\[0-9\]+\r\n#\[0-9\]+${ws}$hex in main \\(.*\\) at .*${srcfile}:\[0-9\]+\r\n$gdb_prompt $" { > + -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].*#\[0-9\]+${ws}$hex (\\\[PAC\\\] )?in foo \\(i=20\\) at .*${srcfile}:\[0-9\]+\r\n#\[0-9\]+${ws}$hex in main \\(.*\\) at .*${srcfile}:\[0-9\]+\r\n$gdb_prompt $" { > # Either __cxxabiv1::__cxa_throw or __cxa_throw can be printed > # depending on debug info presence. > pass $name > @@ -129,7 +129,7 @@ gdb_test "continue" \ > > set name "backtrace after first catch" > gdb_test_multiple "backtrace" $name { > - -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].*#\[0-9\]+${ws}$hex in main \\(.*\\) at .*$srcfile:\[0-9\]+\r\n$gdb_prompt $" { > + -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].*#\[0-9\]+${ws}$hex (\\\[PAC\\\] )?in main \\(.*\\) at .*$srcfile:\[0-9\]+\r\n$gdb_prompt $" { > pass $name > } > } > @@ -148,7 +148,7 @@ gdb_test "continue" \ > > set name "backtrace after second throw" > gdb_test_multiple "backtrace" $name { > - -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].*#\[0-9\]+${ws}$hex in foo \\(i=20\\) at .*${srcfile}:\[0-9\]+\r\n#\[0-9\]+${ws}$hex in main \\(.*\\) at .*${srcfile}:\[0-9\]+\r\n$gdb_prompt $" { > + -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_throw\[\[:>:\]\].*#\[0-9\]+${ws}$hex (\\\[PAC\\\] )?in foo \\(i=20\\) at .*${srcfile}:\[0-9\]+\r\n#\[0-9\]+${ws}$hex in main \\(.*\\) at .*${srcfile}:\[0-9\]+\r\n$gdb_prompt $" { > pass $name > } > } > @@ -164,7 +164,7 @@ gdb_test "continue" \ > > set name "backtrace after second catch" > gdb_test_multiple "backtrace" $name { > - -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].*#\[0-9\]+${ws}$hex in main \\(.*\\) at .*$srcfile:\[0-9\]+\r\n$gdb_prompt $" { > + -re ".*#\[0-9\]+.*\[\[:<:\]\]__cxa_begin_catch\[\[:>:\]\].*#\[0-9\]+${ws}$hex (\\\[PAC\\\] )?in main \\(.*\\) at .*$srcfile:\[0-9\]+\r\n$gdb_prompt $" { > pass $name > } > } > diff --git a/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp > index b56c9ceab6a..3d25e2a50b9 100644 > --- a/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp > +++ b/gdb/testsuite/gdb.dwarf2/entry-value-typedef.exp > @@ -42,4 +42,4 @@ gdb_test "continue" "Catchpoint $::decimal \\(exception thrown\\).*" > > # Without the corresponding fix, GDB would hit an internal error before > # printing the frame for main. > -gdb_test "backtrace" " $::hex in func \\(t=t@entry=@$::hex: 1234\\).* $::hex in main .*" > +gdb_test "backtrace" " $::hex (\\\[PAC\\\] )?in func \\(t=t@entry=@$::hex: 1234\\).* $::hex in main .*" > diff --git a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp > index 595ae929e9a..1f119ec3a87 100644 > --- a/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp > +++ b/gdb/testsuite/gdb.mi/mi-catch-cpp-exceptions.exp > @@ -68,7 +68,7 @@ proc continue_to_next_exception { func line testname } { > mi_expect_stop "exception-caught" ".*" ".*" ".*" ".*" \ > {} "run until an exception is caught: $testname" > mi_gdb_test "-stack-list-frames 1 1" \ > - "\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"${func}\",.*,line=\"${line}\".*\}\\\]" \ > + "\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",(addr_flags=\"PAC\",)?func=\"${func}\",.*,line=\"${line}\".*\}\\\]" \ > "check previous frame: $testname" > } > > diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp > index 40df312a1cc..dd484cd80fa 100644 > --- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp > +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp > @@ -76,7 +76,7 @@ mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \ > # in this next output. > > mi_gdb_test "407-stack-list-frames" \ > - "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \ > + "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",(addr_flags=\"PAC\",)?func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\",arch=\"$any\"\}.*\\\]" \ > "list stack frames, with signal handler and dummy frame" > > > diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp > index ff3097cb519..b29be9e4191 100644 > --- a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp > +++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp > @@ -51,7 +51,7 @@ global decimal > # > # This is a "backtrace break" ("btb"): > # > -set btb "\[^\r\n\]+\[\r\n\]+\#${decimal}\[ \t\]+${hex} in " > +set btb "\[^\r\n\]+\[\r\n\]+\#${decimal}\[ \t\]+${hex} (\\\[PAC\\\] )?in " > > # One of the threads is blocked on a call to pthread_cond_wait, and > # we want to verify that we are able to get a sensible backtrace for > diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp > index 89f6fb89bac..91a7f80b438 100644 > --- a/gdb/testsuite/gdb.threads/tls.exp > +++ b/gdb/testsuite/gdb.threads/tls.exp > @@ -132,7 +132,7 @@ proc check_thread_stack {number spin_threads spin_threads_level} { > } > send_gdb "where\n" > gdb_expect { > - -re ".*(\[0-9\]+)\[ \t\]+$hex in spin \\(vp=(0x\[0-9a-f\]+).*\r\n$gdb_prompt $" { > + -re ".*(\[0-9\]+)\[ \t\]+$hex (\\\[PAC\\\] )?in spin \\(vp=(0x\[0-9a-f\]+).*\r\n$gdb_prompt $" { > if {[info exists tarr($number)]} { > fail "backtrace of thread number $number in spin" > } else { > > base-commit: e493ba6255aec08885affbb68ddc0a025583d528