From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CSoBL7ZA/mbckD8AWB0awg (envelope-from ) for ; Thu, 03 Oct 2024 02:59:02 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=KbALZBxK; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id AB4FE1E353; Thu, 3 Oct 2024 02:59:02 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,URIBL_BLOCKED,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D9E7C1E08F for ; Thu, 3 Oct 2024 02:59:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 05E1F3865451 for ; Thu, 3 Oct 2024 06:59:00 +0000 (GMT) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by sourceware.org (Postfix) with ESMTPS id F18D83858C48 for ; Thu, 3 Oct 2024 06:58:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F18D83858C48 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F18D83858C48 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=192.198.163.17 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1727938720; cv=fail; b=qnKmkCyLn7OrlVn+YxRY7YDTdEA7xCQQH6hLizMteCS1KBCIV80S7da0A7Y2cdSVp0lTrXbi7+xOI4A3fmDAaPlsDS/zHf2+y5lkIU9CWN3G3U0SBllzi5fFxxlwj/UOC4mtkJwvGhTM9LVD75URWNQ3/zaNLFAnAwbOWKuqo6Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1727938720; c=relaxed/simple; bh=bTKmmmV9E/RL67X4Z42d0W7BQGqOyoImV4T7PB6jZeA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wJ+V6R145wwVtA5svl90h1RDFLNtkACzCXmE0adcEsQBSm+3c/KKTl7HfI6AD0aTw1HuQ6H7aVnL+6qj7WvEdreuTaGGLn3MUGyxg70LDamuXt/G0RfL5dT7zcpXvmjPmzrevLu8aT7uGM/PS8pfoTfgxDMM5kHJSrLRM15Dbew= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727938718; x=1759474718; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=bTKmmmV9E/RL67X4Z42d0W7BQGqOyoImV4T7PB6jZeA=; b=KbALZBxKG31i/ltGUZHumjzsYASvrWCNsrxJXSZjbW2gx7RQqVD4oFQ/ CjBJuXL2OYWLoEH2oPnrzClqX+Gb2sSSxYg1v1Cv0FQbuYBxNnuwCZTWA XDMtiGXqS2G9vDdk6lOMODU2ZU/0u/yTpPh/7JCn1y2xX+4Bvvfsg/YNj ThstY+nuJT73XAr/MKkkQmoPXbx+aX8r2wm8IRAGi+Z6POE73KvxUJ8gm VmEU0LTWQHkbrtYCj02qXFl7ELaMqeI55w8JHL5rqsxLupxzisGTLe3Ob StYOqAf3KWz2/zL7vVjsI1yBZ5/VOQ9HMg4LRAdtiPKsoVl0yBWMW8gS6 g==; X-CSE-ConnectionGUID: d7/PhJniTf2GedrBdEMUqg== X-CSE-MsgGUID: n7K+d3H0SJeipSmKJAEwFQ== X-IronPort-AV: E=McAfee;i="6700,10204,11213"; a="27007991" X-IronPort-AV: E=Sophos;i="6.11,173,1725346800"; d="scan'208";a="27007991" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2024 23:58:37 -0700 X-CSE-ConnectionGUID: tD1GVDRaQ/ypmIImSacvzA== X-CSE-MsgGUID: a3ChTFN7QPGnDbuVAAm94g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,173,1725346800"; d="scan'208";a="78804320" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Oct 2024 23:58:36 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 2 Oct 2024 23:58:36 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 2 Oct 2024 23:58:35 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 2 Oct 2024 23:58:35 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 2 Oct 2024 23:58:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XydGS2S2s8Bcz2dluQs5woRHl5lw12Wo/5z+UhhN38wJVffZIcvUgmYwCvn2HpBxeGV91pLpRP70+HzAF05vxqwdumip/kRO3US1bjCMtvreLsivXYrc257t9D0cCiR2UYqVRdbIsNNoC4mYZEBdSuGTxgMEYiYmAx1xq0eDwBYthgIkeWOXkFPbl3YzWs3xqBQs3J87KnvzEcwqX5gNQ6OTorjazowfZ0H3lsqRr+6ePo9svhql01tleNdTypGw0T3evnV418ZL1Fx5OFAPOTgTDIx53OVQPOV724Bt6ZrPi4a24Zw7yIecr0FRVN1KeDRgBFN0B9+zdOSX7mfUOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=luj/Nw7v2E+gGFbHgyS1EF2YZBhQjJmRtzRngYmdm9A=; b=ZApX+prOWqcC60qghfjSX++URhM7vhAQX555FGpJFfbr6yGO31sZdFxkNxEjKC2gPERFbx4WcTnrhn1DCPVfBfDLKQh3gjtmlJ1TvNnbcYQeWXKqgJpJ93UiVkArbAqrpsOuHexew0uXBKZvBssKMWG+hvskY1ThFrMxorBKjbWmn+NK+LtQHhUlmYh/1QoGOa0leE7US2iMxo+n6W1HL7nCyH1QnowdT/PJkjHqStoVmhCMC0CENtNNNFLeChR9a7jCpxdIGGPNeBwHyHSFAKdIxjda2qWWwA64q/syMUjXauNcgYGI7N+qiYnGs5y/d5aS28s3CVCGknUXVkddNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN7PR11MB7091.namprd11.prod.outlook.com (2603:10b6:806:29a::18) by SJ2PR11MB7475.namprd11.prod.outlook.com (2603:10b6:a03:4c9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16; Thu, 3 Oct 2024 06:58:32 +0000 Received: from SN7PR11MB7091.namprd11.prod.outlook.com ([fe80::949:8fc3:9cef:8c06]) by SN7PR11MB7091.namprd11.prod.outlook.com ([fe80::949:8fc3:9cef:8c06%5]) with mapi id 15.20.8005.026; Thu, 3 Oct 2024 06:58:31 +0000 From: "Gerlicher, Klaus" To: Guinevere Larsen , "gdb-patches@sourceware.org" CC: Guinevere Larsen , Jan Kratochvil Subject: RE: [PATCH v5 5/5] gdb/testsuite: Test for a backtrace through object without debuginfo Thread-Topic: [PATCH v5 5/5] gdb/testsuite: Test for a backtrace through object without debuginfo Thread-Index: AQHbFDXxdeIjYOug602k9qG80qZ3Z7J0mKKw Date: Thu, 3 Oct 2024 06:58:31 +0000 Message-ID: References: <20241001184235.3710608-1-guinevere@redhat.com> <20241001184235.3710608-6-guinevere@redhat.com> In-Reply-To: <20241001184235.3710608-6-guinevere@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR11MB7091:EE_|SJ2PR11MB7475:EE_ x-ms-office365-filtering-correlation-id: 03020efb-5e8c-4ffc-4a54-08dce378ca96 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018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w6SblSogPg/EOUQ/vgFGWTfVb2ZS9y7dJ2IvxR2CfWyiMs/tBT4?= =?us-ascii?Q?wfSDGzJwHJ9zkcwXrL7c352yMYEaSgM0H/i6SrwbOREYr4JOTfhAszHQw+ey?= =?us-ascii?Q?wdiRFzFhziI8C2XhNgO0nGR7ifu20p7NPu+WFLEnztFz/nHcclUjIk6TRGA/?= =?us-ascii?Q?sYZxgA/CP8zNr5wPOlgoBYw6DPodOaqjc+AlZB4AXdnOhGkP7nbqbjrYjTtn?= =?us-ascii?Q?gfdE3FHQPUk0wjOWRl0z+lAC1f58DSBsIOOAy8oDcFm6q9kQzbWlpkn5T47w?= =?us-ascii?Q?RyC9AlKwlFaIjHJ5HANR/iwbkNajevsR0V67ptB24YetQxVuNyPdPFioGnt8?= =?us-ascii?Q?MDArjw7BxhNHYoYXda7BeCagyHdyASNSV8WdFYyKWos3qvx+AXIijWvmV2gd?= =?us-ascii?Q?pXPlewOxagovnqgz083Qq+cAivBm5NcLKXu7jdBsvX0af3yL15aQqz6VY4fi?= =?us-ascii?Q?Cp187YzmIHh3s9ks4lvHYuzI0/ead7VLkvs5Rodk1SFPFg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7091.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?UIPMEhs5kmzn9L5h6vFUQYrGu5/ae2BjX19ZM7BRe3kg4h7sZrFx2THrdN5n?= =?us-ascii?Q?pQ1JYTsCb1MaOspLMDdZkUq73X3sqqNmx1CZrXtnfZgDbaKgexjkTayAP1IP?= =?us-ascii?Q?nDX+5lvF1OIg9wseHvQTE/IJ4b+KkDy8ZmilHCJCfA1QBKebxOABbYO2nohf?= =?us-ascii?Q?F9pBMLi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/e6extjL?= =?us-ascii?Q?53gmqY8DENNp3RwZ29kQr37ee3DNDnnyQ2a3iKzOdviy3pErcpMUZlqynWxe?= =?us-ascii?Q?u6Wivp+5WX6velKgwkrmQajZhFwgODW/l6KzTNeaJATuNLPnaGAD5kvEMegH?= =?us-ascii?Q?hZWbg8HvrczxM0Xjiag7HONMeh1KGcVd6X+J/A8mXBaqcW2qsmxnJhIJkdXR?= =?us-ascii?Q?x2aU0VHLY5tC0mdJpixhvjEBzaBAyTu9z/JVluEBZHHZZORwyq7a8hTa1ZoN?= =?us-ascii?Q?HfqJR662byA+mTjDNFBGtknzIjHkhZdNOJfSq0/8sI3ESjuhilBrw8YQPbkn?= =?us-ascii?Q?rNhTjZIlsAJaCtbPX1cyIB5VFL8Ut72PshHWX6rgjZHy2/cgYEBPHmeH85A7?= =?us-ascii?Q?ogjbySLPmzAfRbFUR5F6jC+BnbfVraPxzoJGLqHimjW/Elv0DJFdGecxNHmy?= =?us-ascii?Q?stpPQB/NgQNsrXKXzO2pjeOyL5idqTItbyMKjX0qVLsxvrXPHu0F0ELfza+d?= =?us-ascii?Q?sLG+kdGA0kbx3OiPERVpSjCBlzBdrHSbK7UyT28c?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7091.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03020efb-5e8c-4ffc-4a54-08dce378ca96 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2024 06:58:31.3899 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cLOnu+BiZjMMinAr9T2xyojctqeQRBWtsS14eEC1B0/UcTItWKk7IK81Nktmk8lOlBYO4Wjz9E1tjeTVwgnshelD04EzdAz3rLb+OT4Gxzs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7475 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Hi Guienvere, Just one suggestion inline. Thanks Klaus > -----Original Message----- > From: Guinevere Larsen > Sent: Tuesday, October 1, 2024 8:43 PM > To: gdb-patches@sourceware.org > Cc: Guinevere Larsen ; Jan Kratochvil > > Subject: [PATCH v5 5/5] gdb/testsuite: Test for a backtrace through object > without debuginfo > = > From: Guinevere Larsen > = > Fedora has been carrying this test since back in the Project Archer > days. A change back then caused GDB to stop being able to backtrace when > only some of the object files had debug information. Even though the > changed code never seems to have made its way into the main GDB project, > I think it makes sense to bring the test along to ensure something like > this doesn't pass unnoticed. > = > Co-Authored-By: Jan Kratochvil > --- > .../backtrace-through-cu-nodebug-caller.c | 28 ++++++ > .../backtrace-through-cu-nodebug-main.c | 32 +++++++ > .../gdb.base/backtrace-through-cu-nodebug.exp | 90 > +++++++++++++++++++ > 3 files changed, 150 insertions(+) > create mode 100644 gdb/testsuite/gdb.base/backtrace-through-cu- > nodebug-caller.c > create mode 100644 gdb/testsuite/gdb.base/backtrace-through-cu- > nodebug-main.c > create mode 100644 gdb/testsuite/gdb.base/backtrace-through-cu- > nodebug.exp > = > diff --git a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-caller.c > b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-caller.c > new file mode 100644 > index 00000000000..3a63d72a468 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-caller.c > @@ -0,0 +1,28 @@ > +/* This testcase is part of GDB, the GNU debugger. > + > + Copyright 2005-2024 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 .= */ > + > +typedef int (*callback_t) (void); > + > +int > +caller (callback_t callback) > +{ > + /* Ensure some frame content to push away the return address. */ > + volatile const long one =3D 1; > + > + /* Modify the return value to prevent any tail-call optimization. */ > + return (*callback) () - one; > +} > diff --git a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-main.c > b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-main.c > new file mode 100644 > index 00000000000..3e7ac57a166 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug-main.c > @@ -0,0 +1,32 @@ > +/* This testcase is part of GDB, the GNU debugger. > + > + Copyright 2005-2024 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 .= */ > + > +typedef int (*callback_t) (void); > + > +extern int caller (callback_t callback); > + > +int > +callback (void) > +{ > + return 1; > +} > + > +int > +main (void) > +{ > + return caller (callback); > +} > diff --git a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp > b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp > new file mode 100644 > index 00000000000..7951ab41141 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp > @@ -0,0 +1,90 @@ > +# Copyright 2010-2024 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 . > + > +# Test that GDB can generate accurate backtraces even if some of the sta= ck > +# trace goes through a function with no debug information. > + > +standard_testfile -caller.c -main.c > +set objmainfile ${testfile}-main.o > +set objcallerfile ${testfile}-caller.o > + > +# recompile the inferior with or without CFI information, then run the > +# inferior until the point where the important test starts > +# returns TRUE on an ERROR. > +proc prepare_test {has_cfi} { > + global srcdir subdir srcfile srcfile2 objmainfile objcallerfile binf= ile > + if {$has_cfi} { > + set extension "cfi" > + if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" ${objcallerfile} \ > + object [list {additional_flags=3D-fomit-frame-pointer \ > + -funwind-tables -fasynchronous-unwind-tables}]] !=3D "" } { > + untested "couldn't compile with cfi" > + return true > + } > + } else { > + set extension "no-cfi" > + if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" ${objcallerfile} \ > + object [list {additional_flags=3D-fomit-frame-pointer \ > + -fno-unwind-tables \ > + -fno-asynchronous-unwind-tables}]] !=3D "" } { > + untested "couldn't compile without cfi" > + return true > + } > + } > + if {[gdb_compile "${objmainfile} ${objcallerfile}" \ > + "${binfile}-${extension}" binfile {}] !=3D ""} { > + untested "couldn't link object files" > + return true > + } > + > + clean_restart "$binfile-${extension}" > + > + with_test_prefix "${extension}" { > + > + if ![runto callback] then { > + fail "has_cfi=3D$has_cfi: Can't run to callback" > + return true > + } > + gdb_test_no_output "maint frame-unwinder disable ARCH" > + return false > + } > +} > + > +if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" ${objmainfile} \ > + object {debug}] !=3D "" } { > + untested "couldn't compile main file" > + return > +} > + > +if { [prepare_test false] } { > + untested ${testfile}.exp > +} else { > + gdb_test "bt" "frame_unwind_find_by_frame failed.*" \ > + "verify unwind fail without CFI" > +} > + > +if { [prepare_test true] } { > + untested ${testfile}.exp > +} else { > + if { [istarget "arm*-*-*"] } { > + setup_kfail backtrace/31950 *-*-* > + } > + # #0 callback () at ... > + # #1 0x00000000004004e9 in caller () > + # #2 0x00000000004004cd in main () at ... > + gdb_test "bt" \ > + "#0 +callback \[^\r\n\]+\r\n#1 \[^\r\n\]+ in caller \[^\r\n\]+\r\n#2 > \[^\r\n\]+ in main \[^\r\n\]+" \ > + "verify unwinding works for CFI without DIEs" > +} You could do below to reduce the line to under 80 cols, I wonder why we don= 't have this defined somewhere globally like "hex" or "decimal", though it's not really used that often. set r {[^\r\n]+} gdb_test "bt" "#0 +callback $r+\r\n#1 $r+ in caller $r+\r\n#2> $r+ in main = $r+" > -- > 2.46.2 > = Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928