From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 5vqSNGEFimhH/z8AWB0awg (envelope-from ) for ; Wed, 30 Jul 2025 07:43:29 -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=FZ0uTRSw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C59201E102; Wed, 30 Jul 2025 07:43:29 -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 1141E1E091 for ; Wed, 30 Jul 2025 07:43:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5256E3858D32 for ; Wed, 30 Jul 2025 11:43:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5256E3858D32 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=FZ0uTRSw Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by sourceware.org (Postfix) with ESMTPS id 13E603858D1E for ; Wed, 30 Jul 2025 11:42:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 13E603858D1E 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 13E603858D1E Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=198.175.65.21 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1753875758; cv=fail; b=UrT5N4cZqoMY8f7Y9ZzoM8NPqIO0qzb1LN0afVcaGB79UHs/+jNQ8B/Lr1UxdceQ6+gBh3m16DPI4oNO6ujuGRQUKUcp+367mHypxX08qrvzOCKCbS2/yEN7TPWGtVEpEjSplal6oUbp5H1vYP0I4fAC/njL30h3w0ymQqDap+0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1753875758; c=relaxed/simple; bh=b4Wv899Rt7R64xfLe7U18RA1DjmCuZQYrmKsHYzjjmo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EflfBLzCiLFVcUYVPSnhkO1jj2GQFMNYv0GMNGtu+xRDs7I87oEzsHd3UQ+lEGkecru8yq3M1FBZOzaDTMkdPy4crOXdQZQr08CQ+WYPRZ7lU8c/IKBeJTTzN5JOVMCnyI6mllDZ0LuJv8Jh3cwTUjhTbppN3DsROiD8vhPYqV4= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13E603858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1753875759; x=1785411759; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=b4Wv899Rt7R64xfLe7U18RA1DjmCuZQYrmKsHYzjjmo=; b=FZ0uTRSwegrYZE3wMr5ChH3Ng9WJocLfFQ9H1WQDTdkd7PQFJrfz9f2N k6F/lWG9pfpNbArfMtdc21G7Ak3Ur4mgEsfp4sTKFfe/rYUUO8rXlwpce 9jM8KznOifgqstyV2F61RrzU97CzogtBpyycnrvtFQG6bUWxZow2ywIiE +ac7JiuADMhDDMuBjwt8+i9amQLE1CzzgDaho7MWELoa/E58d8iWG5tWB 1O1cgFj5BDMgVk+klarWDxj0iD672G9Q2XBt1TY8w+TrVaGVzUBndtUgc z6HrTMH6ed6kusn+yH3clmGjWDgPwvluMNzK2HeyoVJ8H1yHWNyPE5xrq g==; X-CSE-ConnectionGUID: SkOsMfUcSZa1jFk+p1le3w== X-CSE-MsgGUID: iv2JXNurRoCog0ukPMNfww== X-IronPort-AV: E=McAfee;i="6800,10657,11507"; a="56059183" X-IronPort-AV: E=Sophos;i="6.16,350,1744095600"; d="scan'208";a="56059183" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2025 04:42:37 -0700 X-CSE-ConnectionGUID: Ju4Asbi0QIu6mjiQ3QD6Fg== X-CSE-MsgGUID: xzOxRzhSQLSdqBxOPqA6cA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,350,1744095600"; d="scan'208";a="193954893" Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23]) by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2025 04:42:37 -0700 Received: from ORSMSX903.amr.corp.intel.com (10.22.229.25) 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; Wed, 30 Jul 2025 04:42:36 -0700 Received: from ORSEDG903.ED.cps.intel.com (10.7.248.13) by ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.26 via Frontend Transport; Wed, 30 Jul 2025 04:42:36 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (40.107.212.89) by edgegateway.intel.com (134.134.137.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.26; Wed, 30 Jul 2025 04:42:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uzBE1eYdqoN9/Ig5Q6gwkpNnksPVmlHBj65Pbw9Qmo8CyjpADUhtC8P4/d79HuX2jzyhuEFRHvaj42hZugcR3PUy9toodx8KuCqkcybAdcaqaDHcUQmwgQJqnp/GIwsyugf0fs+yp9ez3jm9zJrftB1GMkovh5SP3fMs7nA86+ScIVqtJTiNH1tjm1FB+Q3CsR35w+oOQ/5N8PqbNaEyAU4wwGnV2FhFCADrGIoQe55Y6Ca6JsBwbUXdpDusYmP1XbF9s2HAkuYobnEKjedqrPa1cZ4lt7Yc5kTOcmXZrfpBcijcTrujmaW49jfOJPCmOUMsjmVoe5v0RXpW6AOyMQ== 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=XUcLyygM/sL00ZhPlSpMWZrlH2VPaYLNndKYB+jfmVA=; b=JaHeWwL7RI/gN23NbITH8ABfbAL82plNfSr9medtY9ppDGD5XexF0AyMDxm0W9/6VAj9RxyD36Om1zY4IWYxkf2PlQO1AdKRNdMkunVespnhGwUQAoqxCy2HsVPomYpPEAkSFtqkbQPo1xe7kFULLP99afNa2A02UA5VZbLvjLlDHwUQq7YNV94QdUC6TtSWgmkjaiq6CHfy2AmqigVyvDQTMi+sZR7PcLcdoMXmfGlLb6Y6oBwKErr4iKYHLprcwGE65CAlQxXILSeKBGEj6RR6UEi6RKngX/oi1Knq/1JuUMCgSj0QAXaWW4zG8kpdYno4Afs/tRFKXZus6rBezQ== 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 CH3PR11MB8343.namprd11.prod.outlook.com (2603:10b6:610:180::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8964.21; Wed, 30 Jul 2025 11:42:33 +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.8964.023; Wed, 30 Jul 2025 11:42:32 +0000 From: "Schimpe, Christina" To: Thiago Jung Bauermann , Andrew Burgess CC: "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: AQHb6AdfopZEH8KoZUSF1KMGj5X1tLRJXyMAgAC62TKAAIloEA== Date: Wed, 30 Jul 2025 11:42:32 +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> In-Reply-To: <87tt2u788x.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_|CH3PR11MB8343:EE_ x-ms-office365-filtering-correlation-id: 6cce9db6-6ef8-4ae5-de5d-08ddcf5e2c10 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?c4ilbvwTB5DPgoguM9Udd54RbeTERYMztw6GQNZClklrUn+saFxNnehC+7Ya?= =?us-ascii?Q?xK3V1//nPBgW3hTtX4BjP5X7KFQb0Dq34+cT1FWJlFUkrLIX8Wu9y7bYNZbo?= =?us-ascii?Q?nqiKbnH5j3s7vi4C2Agn+B4bC3R61VBdS/TpEgtdaQKKKA3yrvnWunHuIDkC?= =?us-ascii?Q?wVGeNAUYTLjtMAQ5vKv7gBGw2cIXtGVnYYMe3yMRj0X2Qr6yWuPTRLIDBhjd?= =?us-ascii?Q?cpGKHYjs6mdBUMQUN4ZyjuECgmoWwXdUBcIwqGzsfY4A+2328izDYxk667mu?= =?us-ascii?Q?SfMbhuJ5I67QHvfvkDBn22l8cMrXTKv2Q51bjCm7MwNbIsJyrQWvaGiyCLzc?= =?us-ascii?Q?jvTX49VEcIydsDXcy8bs4cnEo11tg1a3sU8RmwCaMWEW82CAFuqinwJCHRMi?= =?us-ascii?Q?V0PlXnEJuzSKnlA+JiyL8DE9jkToFGubjFQ3+DtQ96IW+K+xMBSpbL7RS6wO?= =?us-ascii?Q?02FYEL/alK4+Nuf7Ggo511xdkkfvhdB3bNGT4OGOUxm3oTZCcgxS7oRoeX8V?= =?us-ascii?Q?uE185kBuQl6v+jAOEaK4Yc6ErGFhRZsWUqJdpZ0ivVwdSj5FzsP5dfVgfUrj?= =?us-ascii?Q?WMvdRCbW9Vs1ASuqb3kHcNllVF19v/ECtO9YJO08R61rl5Vxedt1N7juiAln?= =?us-ascii?Q?1kCfrpswAhsvglOz3+nuTD4OCociqrpJcEvShDpEVetusQeBE5jdkZtwdTVq?= =?us-ascii?Q?OZYomfRKWGOFG/FMZ8Fm0pR3KMkHnhWwNJOI0hjAPcAbSsweJgUUtK43QsQA?= =?us-ascii?Q?tjwZUW5bGM2KIs7pUL6oU7G6BT4tT3hJFi6DJ6BhH98Sf3cq/f7y6V9IyAk/?= =?us-ascii?Q?MXBE0uqdhzSigM5puu8G1fqyehp4khPAPlLKquspSiXd4Eypy/U0INr4wOUS?= =?us-ascii?Q?cNhRDf8Cw8rypx+L9ozZMLZ48gKJh1Glp4t8qojzpJiKhFTrtisMWW3na4W7?= =?us-ascii?Q?2lywmIPYvyZbQ84WEY6frStC7goblbRgpCMNUQ1lW4BXL3fFiUbIU51Rtvdz?= =?us-ascii?Q?HPq/kEB5iBj2hSF2cYw9zmb4ivjxR00x63oIIEztqSmVDIJSzUKoNaMTbheX?= =?us-ascii?Q?iG9lz+mtVUGNhTogxPVuaspHL6cdcPriKodHXgDnRz7BW9A8wFXmTB92pq1f?= =?us-ascii?Q?D1NuF0zkgmPw+UyEr17ZS4C5r1Ti1fPnXUkj7Z9cZt446NpQ3K/P6TKdAYZr?= =?us-ascii?Q?NbBqdKtXab6C3i6CY9j9h8gu4pZFd7/gYUtnARMvSG1qgBxJGToGYXoC8Enh?= =?us-ascii?Q?ZTqOSVxg7U2yNKtz0daWbVpBI48qeCAZuvdY7rL5aqfeMpFUsI/ZG6gNKzfh?= =?us-ascii?Q?V/GiISGYoCKO+QjiD8moXupynk4JodI/e28wKvNnDx4QXE6wu8skXTuOFz4/?= =?us-ascii?Q?pCFrEUkNX0kUeZF2Kahc0zXK4Cf5mcEsJmvq4yCo4ndcTmlvXWUUNmQTHr/0?= =?us-ascii?Q?rVasgSWaSQX59bY0RcKy28JoBJmDUL5I?= 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)(1800799024)(366016)(376014)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1xvOdk0PeaDDvVEPpVweSUSi+u1oNVtntoIBTq8K9kdeSD/DYDK87PvgDz5d?= =?us-ascii?Q?tqyKGTic456sfthKYFgPOWu61ajMG0mHudcfy4pPuBvQZMVcQPkCWrSYVPDQ?= =?us-ascii?Q?/ZSPjADFzPgYnsmVXKQVvM7OpsBa8tU7yeHT1yGUa8bHek7ACpFirh1dii/A?= =?us-ascii?Q?WJVen9MHtYkPkME5KlXFF++4SfxyDz3N3s64P9TrHc8bgo90Af3xAhVzSOoJ?= =?us-ascii?Q?nKiQBLNbSs+mLzIHCc5x0/1W17QAjDL18T3ANkNuFwYh4CPYmMZT+5Qz3/Zq?= =?us-ascii?Q?7PmzvDVw7dwyFdVrXC8w4WYOCrXwltrqjivuhQ4cUKw1wVv+q7wJ+rUbACk0?= =?us-ascii?Q?yXp/Gm7+Q8PrNvq8AgtiVoZzfVRXNQjQ2eNnrZI03mhoqpI75GD1MrEn3aDU?= =?us-ascii?Q?mk+uH7DgwKj+zd6r3tcPP2TcHT9+XPUFWoCOs3vFzR8phMpDApEMFkEhiNBj?= =?us-ascii?Q?pcMpjZUaHfzF32TVitMDGqoyshv7/ONojNTrzlssmGXj+N3GaQIjew6vfQ7h?= =?us-ascii?Q?Ey+t77zeVgmuEeCZ3sSQEX+cepOs4LhGKpqovn9rei/XwelVAqYErbrDBg8+?= =?us-ascii?Q?xLFz+f88ujr9l5E7k0NpsOZI+RtzjnGL88Srfo1Yo7Lnt+UcL0K65T3/csVq?= =?us-ascii?Q?SB3LsCfOcCzHRxponm8nA5eJxk3fhVKPsRTcRQBAIxqIYuJKl08tukZiGYdQ?= =?us-ascii?Q?hCkJ52BG+dPLY0Ybqoe9kreFLXjAOCGRMfDYZIoiNWPjAZg3emTLhp/fP0bf?= =?us-ascii?Q?xBqJXYihIYQcku+E6F47vuoxeUdReu9/WC8fufgG780hlPx+s5SgbO/EPgg6?= =?us-ascii?Q?NuA6Gm6c/ZJMrtTiwglrgVoan68ASmlHoTyKEYW8LvxyMIT+xPNENtmHTgHS?= =?us-ascii?Q?zcaneyzc2UKxLT3eIbjS1fyyc1kGo+UhAXGYIkMVit17WJ0Qy23Hhzuf0KjR?= =?us-ascii?Q?W39SSB1ZttLW5AbUPyZZLpwO/Z4o3eWVxrOJjBuOjBPtZfgLzVYvTkOZ0YAV?= =?us-ascii?Q?q0ZQ4GxV6IuwnQCTY2lYgCqNJYZFH3e9FXRb788yo6eqCI/Gr1voKGkhDuk2?= =?us-ascii?Q?YYDCBfONjZBE0yJjfDAHJI88FPKWuSrJMo1YEFX9cmJB+qAheQ1HYj0+cVYE?= =?us-ascii?Q?Uv2O3zubUwZpjR0uNfNRH3LYdVtFukSbmXTcPkRW4WlqhlLHIVaPWbsFz6C5?= =?us-ascii?Q?B0MgCKa1oyPmsVKokguTabTYdnIYPyNAWZ6mKZ5rhaZLOyZHN6PL7FCzOlNu?= =?us-ascii?Q?qmr1DVTOUBhM97pgrhBECvpjbKZtC54kusHEqs/2xvLupwCGhqTcFt+ngfE+?= =?us-ascii?Q?gGYRI46eSPtfJXsbixD7ReAThI55ozL/scsricbBOsA4aT/tQ9Y2++3+FD/q?= =?us-ascii?Q?H8XDJNmNEy+T7skEMOijSoU1a3PDr/IrrA3tthec/D8nP0Oqm5naUeUihE0d?= =?us-ascii?Q?DgqfuFjRCP80OFHTkyiH4NoOpdLhqSrr9kf7HGIgW9M9XqVSONvDQmZWZwOC?= =?us-ascii?Q?Qr1jO5abg7O7LXtIBFVjwB2PaLsKgUUbRgZL4T8JasAD+txk07ECZg756nan?= =?us-ascii?Q?gxI1IeSborWdRRO5jQp7KnvLxRH0MBH8DBnAJOjScn5YLzQFqQ4/B2csKSip?= =?us-ascii?Q?rA=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: 6cce9db6-6ef8-4ae5-de5d-08ddcf5e2c10 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2025 11:42:32.9489 (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: VEBrzRX6z9krgDgQHIK6Y7k5prhPl2cKAbY1TYRXiu8xGVXR9XqSE5K2alLVTuHKeXCVmI+7khkI2bE4le2ktH2tkjoDtunE7b92uPTfeRg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8343 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 and Andrew, = Thanks a lot for your feedback. = I should have mentioned that I created this test based on the test code fro= m Thiago's series GCS core dump tests. I only mentioned it in the cover letter so far. I'll do it similar to Thiago when he based his return command testing (aarc= h64-gcs-return.exp ) on CET shadow stack tests: https://sourceware.org/pipermail/gdb-patches/2025-June/218895.html So I'll add a comment in the test description # Test the shadow stack pointer note in core dumps. # Based on the corefile tests in gdb.arch/aarch64-gcs-core.exp. and also a comment in the commit message --- The code and testcase are lightly adapted from: = [PATCH v3 5/9] GDB, gdbserver: aarch64-linux: Initial Guarded Control S= tack support = https://sourceware.org/pipermail/gdb-patches/2025-June/218892.html in the next version. Also I'll fix my test based on Andrew's feedback as described by Thiago bel= ow. > -----Original Message----- > From: Thiago Jung Bauermann > Sent: Wednesday, July 30, 2025 3:55 AM > To: Andrew Burgess > Cc: Schimpe, Christina ; gdb- > patches@sourceware.org; luis.machado@arm.com > Subject: Re: [PATCH v5 07/12] gdb: amd64 linux coredump support with > shadow stack. > = > Hello Andrew, > = > Christina based the testcase in this patch on aarch64-gcs-core.exp from my > GCS patch series and your comments on it also apply to my patch, so I'm > replying on account of that. > = > Andrew Burgess writes: > = > > Christina Schimpe writes: > > > >> + # Generate the gcore core file. > >> + set gcore_filename [standard_output_file "${testfile}.gcore"] > >> + set gcore_generated [gdb_gcore_cmd "$gcore_filename" "generate > >> + gcore file"] > >> + > >> + # Obtain an OS-generated core file. Save test program output to > >> + # ${binfile}.out. > >> + set core_filename [core_find $binfile {} {} "${binfile}.out"] > >> + set core_generated [expr {$core_filename !=3D ""}] > >> + set os_core_name "${binfile}.core" > >> + remote_exec build "mv $core_filename $os_core_name" > >> + set core_filename $os_core_name > > > > I'm wondering what the point of this core_filename / os_core_name > > stuff is? My reading of `core_find` is that the returned > > core_filename will be '${binfile}.core', so this whole thing feels > > redundant, but maybe I'm missing something here? > = > I wrote this part. The answer to your question is very simple: I don't kn= ow > what I was thinking. I just deleted the last 3 lines from the GCS testcas= e. > = > >> + > >> + # At this point we have a couple of core files, the gcore one gen= erated > 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. > = > > 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 o= nes, > 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 > } > = > But I agree it does make it more resilient/correct. Thanks for the sugges= tion. > = > >> + } > >> + > >> + if {$core_generated} { > >> + clean_restart $binfile > >> + > >> + with_test_prefix "OS corefile" { > >> + # Read ssp value from saved output of the test program. > >> + set out_id [open ${binfile}.out "r"] > >> + set ssp_in_gcore [gets $out_id] > >> + > >> + close $out_id > >> + check_core_file $core_filename $ssp_in_gcore > > > > I'd move the blank line after the 'close' personally. > = > I also had that layout. Changed. > = > -- > Thiago 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