From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KNu/Nnlgkmg9qgQAWB0awg (envelope-from ) for ; Tue, 05 Aug 2025 15:50:17 -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=FbmJ1lew; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B9FFA1E100; Tue, 5 Aug 2025 15:50:17 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 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_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 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 051991E091 for ; Tue, 5 Aug 2025 15:50:16 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8D3073858430 for ; Tue, 5 Aug 2025 19:50:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D3073858430 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FbmJ1lew Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by sourceware.org (Postfix) with ESMTPS id CD6473858435 for ; Tue, 5 Aug 2025 15:29:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD6473858435 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 CD6473858435 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=198.175.65.17 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1754407747; cv=fail; b=jo8yugYvSz6Kub9MArLW7NImlZavGRyfSydYFqiz0Q3jR83y5ALdMAWwe85kkGjpcUG4ShbvShy3YfkwRq9sDGP6XihiYz3SEF2Jm2lJmrQVHTX/Pskco3N7d6YxQjq6dXfrY7hq2523YSSvI164TOJXXjQ9/lJta0Pf9FIMbdU= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1754407747; c=relaxed/simple; bh=JXWV6PZ4pklAHedlxBlr1K6QLZg+8coJHfFAyz1nlSQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=aMHUPmRffobchv3MqXwF4P9qwIBfGmszXx0E3IPpLlJ0zLTa8p8csHNYRZb6QcnzrK9zX+Sp/ae4adSIYkjuU3HKKkU8dswa+mf6R1HaPiPDvxqw+wjHgcP4O0X4a6AbUyQgBP1NQCxxCWYx/SwZuWs1VVakNXUVITUI6zpZn2Q= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD6473858435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1754407747; x=1785943747; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=JXWV6PZ4pklAHedlxBlr1K6QLZg+8coJHfFAyz1nlSQ=; b=FbmJ1lewAZUugEiLAN8fmhTmP9PD6ORGnE/xsUWjzdVlle2/l5IlSdYB xLjkksIFptFuxjlPHPBNnltvjZ+G06ry6DaZIjvMwDm80Jo4Huv2klyjR ja5MXMJIPIqwcpbZ6T79vZ2RsrvMHX4LjWveSuylNiFemEh8jDmAsXpCF zA/AZ9PNsJAzng2Mou+OO5Ib6MwHhwOFOyiKbwUc85NL1LUF9Q9TRZzbV /wb60JHyvbRJQzOazHhtUH4DNtQYXgeiLgcu/OMiPdTN48S5zZ2LXC/dB 4/Nf2HkqpG+p/+WeTl3eCWGNPNrz4DM32A1P8qccjdncM3LimRnnigwJU g==; X-CSE-ConnectionGUID: WsA/xwwiRD2bMWoOXV7isA== X-CSE-MsgGUID: Jtc+gWLHShyPuWJSk6PprQ== X-IronPort-AV: E=McAfee;i="6800,10657,11513"; a="56669165" X-IronPort-AV: E=Sophos;i="6.17,268,1747724400"; d="scan'208";a="56669165" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2025 08:29:05 -0700 X-CSE-ConnectionGUID: mTqbiFfISpStdAanp9MEHQ== X-CSE-MsgGUID: vU4iGeEvSSSQTb60Hq5a/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,268,1747724400"; d="scan'208";a="164884115" Received: from orsmsx902.amr.corp.intel.com ([10.22.229.24]) by fmviesa009.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2025 08:29:04 -0700 Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.26; Tue, 5 Aug 2025 08:29:04 -0700 Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.26 via Frontend Transport; Tue, 5 Aug 2025 08:29:04 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (40.107.92.50) by edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.26; Tue, 5 Aug 2025 08:29:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dmO3wJQYupPBJAgvQhjaETGkeoWI6q7oIOOWYaxoAfPZ3uRiz+qIw9foEtPRvQxvPsD4TKtyKMQhOtlDjJLcaoMUJVEya6E+mQcU+9KYv8ms5MX62oBtcuUADUYB4E9vizDYj+JQJviYaoFT13MGNj3g5lqW+JIRhOL3z2BoOdKbM2udQWevEMactg36SAz6CeXJUMsmUZdE/gHRvPdpMrrQ6peYuerMt7iu10FUElnFrsTZ/axSZcPH2uxjiZ3gJfxcqHsn4nxQEQLX1JudvMTCvR3ST14hw0smwzCIcxfQiQDtk6klI5VT4P/BSVj8/mNyx2n8xAhto1u/UUWQ1w== 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=vT9IKYIrgniCprfCvrAwsdovMwqS7uL33CqoSVRpKDo=; b=DpzZTdVcPq2oVu4AN/ARVM8OPSS03tlg0pv8foXKc2VB14OiR1Ly8Nz5gf2yR8n8zA9SfRTKUagpJZiRz1cNSFjM812twtkJOhY2Nh1krGKKMdmB+wZ1N7z8ECNT1BOglHWQh/u/UGPYbR0kLrPjCqOWRYrjRlCMTfzTWFWghceY/UfhQGwuxAqYFBEW3Oqk6uALHVx2MXftkJEI2wLMqky1+eZOQUEynHCAEYxwrrXrFGZUW9OQWcUcLNtFKWBUu9ZqYgJYvVhlshPqM32GiBvXuVOtZX+PaqOnR2971S8oylWjqpWYVWM4EP+Y8oLPO27L5qaxO8+6x0OZSvgg9w== 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 SN7PR11MB7638.namprd11.prod.outlook.com (2603:10b6:806:34b::22) by PH3PPF5A636EDE4.namprd11.prod.outlook.com (2603:10b6:518:1::d21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8989.11; Tue, 5 Aug 2025 15:29:00 +0000 Received: from SN7PR11MB7638.namprd11.prod.outlook.com ([fe80::25b8:16dc:755e:34d1]) by SN7PR11MB7638.namprd11.prod.outlook.com ([fe80::25b8:16dc:755e:34d1%5]) with mapi id 15.20.9009.013; Tue, 5 Aug 2025 15:29:00 +0000 From: "Schimpe, Christina" To: Thiago Jung Bauermann CC: Andrew Burgess , "gdb-patches@sourceware.org" , "luis.machado@arm.com" Subject: RE: [PATCH v5 07/12] gdb: amd64 linux coredump support with shadow stack. Thread-Topic: [PATCH v5 07/12] gdb: amd64 linux coredump support with shadow stack. Thread-Index: AQHb6AdfopZEH8KoZUSF1KMGj5X1tLRJXyMAgAC62TKAAIloEIAIE9sggAD73tSAAHZm0A== Date: Tue, 5 Aug 2025 15:29:00 +0000 Message-ID: References: <20250628082810.332526-1-christina.schimpe@intel.com> <20250628082810.332526-8-christina.schimpe@intel.com> <87o6t3cawd.fsf@redhat.com> <87tt2u788x.fsf@linaro.org> <87cy9ajsr5.fsf@linaro.org> In-Reply-To: <87cy9ajsr5.fsf@linaro.org> 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: SN7PR11MB7638:EE_|PH3PPF5A636EDE4:EE_ x-ms-office365-filtering-correlation-id: 839dc33f-73ac-47de-b384-08ddd434cd65 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?7ZzcZWMnOJ9931MmPSLPaWh/QHgC3yiitnrM9ELcjIplcdgRe2FPKrk8hoP9?= =?us-ascii?Q?9wniNAbBRvHN7cSOWUOL0a8AKsjRd40AH1O4rvP94xTOu2lx/o9e+RO2McL6?= =?us-ascii?Q?IWujmkOsuE+dYZ81x5EWnKQgkGMumdths3mjHvn+lTffGkBfCvj0wGBuD7H8?= =?us-ascii?Q?T/wTAph+IDZEAuH6RrwYI8jkxqMXpLvtSr3ScFhVOvLywxkq79eUZhldT2l9?= =?us-ascii?Q?Jh6XAWqkHrP3HL5Q6PLTQ17DnUhREVrVj127pWs+T7VQApko0oLYG5Qd8FTD?= =?us-ascii?Q?YLK6/h4/pVR6hEUaDoqv3Cz1T9BOoEneo46N5iejxUreGjg0B8dHXvihtUVe?= =?us-ascii?Q?Av+ArC8t4AlJKx1P1YoqewjPK52wXzmefdLJuD095FUtCjN/EPgSKUT+3rHn?= =?us-ascii?Q?vCUei0Xq78qo37IbIITl8uBIJRNjMlk6g54MA7YKIFgt7E2dYpOTuTu+WVcG?= =?us-ascii?Q?+IK5tn4PiP/+JipIjokhiVQ9706icoHTe2hGpT29xT5486Cw4oBm0mHfShR2?= =?us-ascii?Q?Qtv5IghB1NzLDSuIk/7apvISv3Q6TdmUAXlaanJ/Fx51vfwu67yOsomItJze?= =?us-ascii?Q?37gXpk0ov7m38J1gm3g9/3Tc7mMRvLDs6wRzdHcpnx3f5F30lsGSPox0jILt?= =?us-ascii?Q?hSuvALBImPRvOnEUOCUms/nD9fIJdsg0yLhCZ1rLoN6MkAEHTNqI2sl610jf?= =?us-ascii?Q?vNyPtpkjzadUIz9oDZzGUYhAYCz0QFUfl/wxc/KRHljWs2JT9rKO2ESRrg8o?= =?us-ascii?Q?jvqs+sBXvrACRoGB3iifQeNdsnN0JU8ACpB3ooCmad8nzpWYsW8+gGfSOKw4?= =?us-ascii?Q?T33D/Z+KgvB5fKrLGoDvfMzWZntXQwkhSDhE15cq1/2+PWhZj+2eoNrSTeGv?= =?us-ascii?Q?lVQPA4kdlDjVYfpcGUldgwaPitNoc3NdNTZkPTBZAXCsZknmsiOQWVfbUcVb?= =?us-ascii?Q?yIi5JDe4ZNrlMdPgGvpdWMeV7vUd0bkjoKHp0NQx1r33f5rNJtvh+WBYGXan?= =?us-ascii?Q?GAIwfQAGY0FIvaJnSvtOgpLpqgI8lIIZHSPTs1CRRnqy9WoVJzywkh3w9/Gu?= =?us-ascii?Q?4EqCQ4Q8YRxG6vvQy3H4FAjHxuBAtgYPOlA9wZagpDDX2yYUVSjxT5XhEyHg?= =?us-ascii?Q?MXkgs7nVE9vmRGD+sbeB1QwolkOdfDCpU6r/+go5O2if5TdoPgaMmZ/vL+7g?= =?us-ascii?Q?ht9S8PpRMBWXUfsK+i4aGjnsyMQsoaaW1VxGfnflb258O12DgmH3JXhly9p7?= =?us-ascii?Q?KAqI9OjXxxF3z3VmzL+xvGlk/pb6gJM5NiS7YjW2iCZwstYTbFv4XAixOOZu?= =?us-ascii?Q?zcyi2F0GExsXAYLF9pfm3L+UJO/fHqSogBDFmxQBKpTDO2C4vY4YQMu7mka0?= =?us-ascii?Q?vugW1JC7wOLQ2EXvlzn2dnUj5n8nvL/3/e9nZHFW40FtifK2tWB1/51vdOfg?= =?us-ascii?Q?EDFHfrdklTj+RTFl2nFnT7PWXxSiZzu6?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN7PR11MB7638.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Oph3tWdG4+cJCO8HDRbUxLDrK0Y016UhEZDN2/SX6OvVAGzzH27h2CVF2Fko?= =?us-ascii?Q?uHiJp1p3bZRito5mhLe2wetlbSkwAOwumbIhIgaQr/pC/ngBFwxXLEqgLDnm?= =?us-ascii?Q?aiSjnMdBe961VVyXMUyevIZW6zl/5RrKrAM/IBMo7FJxHte9NwXs9tPUbJKX?= =?us-ascii?Q?wnt8euy04NXXzh+85Y8ykTNstN08swdT6HkvIXUhhGlgcbXxUP8c0GC/jyYs?= =?us-ascii?Q?Joy4SqCDqRb/y9CitOwLa7R0XQhD/wG5jcr8hclf8munAfqDbsXoCUtPXo5k?= =?us-ascii?Q?Yg11fq9YKQzIhiTWylaPsU7ZCpQGv/GHZapldcm7NiGuTVeDHJSHxk7cW0fp?= =?us-ascii?Q?d3taiTDEGliJNqFY1euRf+ZfnYwR5ah8bXHD2WI9B0Q2UsabB2HF3BaDtxh9?= =?us-ascii?Q?4qH4y6or1Lo6GdYAkFt7M+YuJc/B5VgvNQ27DDa4vwaToMDoS9zkogSJTFcX?= =?us-ascii?Q?k1JZD2HbUcdcMpED+HKiVlRCzndTJB9mSdvwQog469ztAWVz8+RnuSd7ggtw?= =?us-ascii?Q?CkRKxBUvfQJz/i9Y+fiBiyGtlP2nVm1YX7HbuEWM7nh2gdQ+k2qSLBYwMssH?= =?us-ascii?Q?8SiA5gJir53MQD3AF+QB4slfA8KncIq6YBbVb/PcD34TOYpZDlyzrB7UXoFv?= =?us-ascii?Q?eJ+sfvd+yMQNuqc9XdYf2HmWbqLICcloNc8cRjAvSYxLixh3K6Iklt7ZZn+Z?= =?us-ascii?Q?vapyD8PKY8txCmLbfGn0noEiu3UrzNR1xFxfFQmHdvPGeo79xw086MFEWAru?= =?us-ascii?Q?6GC0krtI4kHPy8FUX5yb6XO5DV4WSLOqhdugzx0NIdjf+dFTFcBMKmwAzDXE?= =?us-ascii?Q?c5cuniyBAGOQBoi+wwVzUJWuGNYtE8yDjWRHTKAdvEqBQRGQPHh1FO4ah3On?= =?us-ascii?Q?Il00XYVPgjctzUhnpXwEOEJMY2RR6pDWLKMhZK5AHHgSA1lAb6XGq6UNaH2d?= =?us-ascii?Q?mBwEfDQcQoNxlszM1D2P6DMXMLILO8VMIrIj4EglIziNOWc4ZgG4Ih9YNDpa?= =?us-ascii?Q?9ntoV/DV6wpMnPf7dRMAWGFz4+Hp15saTgUdiv+jAg2QL+IEosbJPwWF1qNg?= =?us-ascii?Q?NoZFD5XWpkbRakIHxQ7rqaD9o0GubuB8lSgPRF/E7RR6EoZb4K4O2FFibMbL?= =?us-ascii?Q?JLbaFw1/mjF3xTPJleMQObQVuzqGC3/VnlMXbTWIZPfU5c6bcZbdtWAgj+YB?= =?us-ascii?Q?JsnD+T+Qfqt+nyY0cJRyi7MjOGlifnyYAT1DAO1gQQhHkBA0m3je6k/+63uf?= =?us-ascii?Q?OA/S0p+3jUjRIu+X1rKDunS+pyjubE63PkMMF63EecnlWbl0fJl4Xghme+kM?= =?us-ascii?Q?UL7FnfYfvV/4BYwmRXGhfLuzx7k4HJWO8g7NOzLHquCJgwxncM18ISaYW6wS?= =?us-ascii?Q?kYi8R0tfoG4hL+0vteyTQLHut2aNBlT3TCxFcK51l/3AaGi9o0AO1uKEiC2I?= =?us-ascii?Q?xO3MzZSaMkgf87JOGNd5J1oesUWgHwRwPZGGGITf8FRFh6lKJmaSQ5Wpc6Yg?= =?us-ascii?Q?XK/DMlaSXlYGKJzIa/fUeSYkvHf3dprUAwJ6NmzHqpTmKKxdmamn/44JMiCU?= =?us-ascii?Q?hQs71X1UVEmIiGJlVhNbj+tjQikIuvK+jGLUTYAL7A5pDWOQHy9X97yyU+lo?= =?us-ascii?Q?bQ=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7638.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 839dc33f-73ac-47de-b384-08ddd434cd65 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2025 15:29:00.5504 (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: v+ApH/C5VIHlPFPcUfjX8iXy3XJs4+mlSqUDFSZgzUGVrZDuzyhRI0lUt+YiCeVC1DpDX2qI6+kQg8gs6Rk8B0f5aoUx47Ur6nwgVa38uHI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH3PPF5A636EDE4 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 Thiago, > -----Original Message----- > From: Thiago Jung Bauermann > Sent: Tuesday, August 5, 2025 6:30 AM > To: Schimpe, Christina > Cc: Andrew Burgess ; gdb-patches@sourceware.org; > luis.machado@arm.com > Subject: Re: [PATCH v5 07/12] gdb: amd64 linux coredump support with > shadow stack. > = > Hello, > = > "Schimpe, Christina" writes: > = > >> > >> + > >> > >> + # At this point we have a couple of core files, the gcore > >> > >> + one generated by > >> > >> + # GDB and the one generated by the operating system. Make > >> > >> + sure GDB can > >> > >> + # read both correctly. > >> > >> + > >> > >> + if {$gcore_generated} { > >> > >> + clean_restart $binfile > >> > >> + > >> > >> + with_test_prefix "gcore corefile" { > >> > >> + check_core_file $gcore_filename $ssp_in_gcore > >> > >> + } > >> > >> + } else { > >> > >> + fail "gcore corefile not generated" > >> > > > >> > > It's better, where possible, to avoid having pass/fail results > >> > > that only show up down some code paths. > >> > > > >> > > In this case it's easy to avoid having a stray 'fail' by > >> > > restructuring the code too: > >> > > > >> > > gdb_assert { $gcore_generated } "gcore corefile created" > >> > > if { $gcore_generated } { > >> > > ... etc ... > >> > > } > >> > > > >> > > Now you'll always have either a pass or fail based on the gcore > >> > > being generated. > >> > > >> > Good idea. I did that for aarch64-gcs-core.exp. > > > > If no OS corefile is found we will see a FAIL here. > > The usual coredump testing doesn't fail in case the coredump file is no= t found. > > So all gdb.base/corefile*.exp tests have sth. like: > > > > set corefile [core_find $binfile {}] > > if {$corefile =3D=3D ""} { > > return > > } > > > > This can happen in case corefiles are managed, for instance, by apport = on > ubuntu. > > Do we want a different behaviour ? > = > Interesting point. Perhaps a FAIL Isn't the best result to report in this= case, but > IMHO it would be worth reporting an UNTESTED or perhaps UNSUPPORTED > result rather than silently returning. > = > I don't have a strong opinion on this matter though. I think UNTESTED should be good. But in GDB we're are actually not consistent with UNTESTED or UNSUPPORTED I= think. In my opinion UNTESTED means that there is something not fine with the setu= p and one should investigate, but UNSUPPORTED means it's fine that the test is skippe= d. In any case, once we decided for one option it would be good if we'd update= the other corefile tests, too. > = > >> > > There is also the helper proc `gcore_cmd_available`. I'd guess > >> > > for any > >> > > x86 target that supports SSP, gcore will be available, but in > >> > > theory you could consider using this to avoid a fail when gcore > >> > > is not available maybe? > >> > > >> > In the GCS core testcase, I moved the gcore tests after the OS > >> > corefile ones, with an > >> > > >> > if ![gcore_cmd_available] { > >> > return > >> > } > >> > > >> > in the middle, and after that I had to redo some GDB setup: > >> > > >> > clean_restart $binfile > >> > > >> > if ![runto $linespec] { > >> > return > >> > } > > > > Do you also do the "continue until crash part" again? > = > No, at least in my version of the test the "continue until crash" part is= only > needed once, for the gcore test. The OS corefile test doesn't need it. > = > > It would make sense to move it into a proc then: > > ~~~ > > # Continue until the expected crash at the return instruction. > > > > proc continue_until_crash {} { > > global hex decimal > > > > # The line with the hex number is optional because it's printed by = the > > # test program, and doesn't appear in the expect buffer when testin= g a > > # remote target. > > gdb_test "continue" \ > > [...] > > ~~~ > > > > And my gcore testing now looks as follows: > > > > ~~~ > > if ![gcore_cmd_available] { > > return > = > Come to think of it, I think an untested/unsupported would be good here as > well, if I'm going to be consistent in my opinion. UNSUPPORTED here then I think, if my above understanding of UNTESTED/UNSUPP= ORTED is correct. > > } > > > > clean_restart $binfile > > > > if ![runto $linespec] { > > return > > } > > > > with_test_prefix "gcore corefile" { > > continue_until_crash > > > > set ssp_in_gcore [get_valueof "/x" "\$pl3_ssp" "*unknown*"] > > > > # Generate the gcore core file. > > set gcore_filename [standard_output_file "${testfile}.gcore"] > > set gcore_generated [gdb_gcore_cmd "$gcore_filename" "generate gcore > > file"] > > > > gdb_assert { $gcore_generated } "gcore corefile created" > > if { $gcore_generated } { > > clean_restart $binfile > > check_core_file $gcore_filename $ssp_in_gcore > > } > > } > > ~~~ > = > For reference, my test is here: > = > https://gitlab.com/bauermann/binutils-gdb/-/blob/guarded-control-stack- > patches/gdb/testsuite/gdb.arch/aarch64-gcs-core.exp > = > -- > Thiago Will check thanks! Christina 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