From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1UAPFRajtGamGAAAWB0awg (envelope-from ) for ; Thu, 08 Aug 2024 06:51:02 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=k1qYzEed; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=k1qYzEed; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 3F7EC1E0D0; Thu, 8 Aug 2024 06:51:02 -0400 (EDT) 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 2589D1E08C for ; Thu, 8 Aug 2024 06:51:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9572E3858C33 for ; Thu, 8 Aug 2024 10:50:59 +0000 (GMT) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2045.outbound.protection.outlook.com [40.107.22.45]) by sourceware.org (Postfix) with ESMTPS id 831233858D28 for ; Thu, 8 Aug 2024 10:50:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 831233858D28 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 831233858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.22.45 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723114237; cv=pass; b=Tbn4jXALw9bukKtd0K7Bgm9A5bJIHq2QvQDhIEJmiKP9C3ILl4EEoGOXhGBF8o511/vNeJZOgUrQfgb98hPa7RoyKXnP2bZ/QymOthmY96RIq1f8Fr0zCxMKpsWeh/YzwTxV+py5fxPkw/Ip653cdO2ya9i6jQSlXLk8yw9fWbs= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1723114237; c=relaxed/simple; bh=U/WOB2NtL34DncqYLdmMN7+QMGByQnTN4yIPp7TQTSs=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:From:To: MIME-Version; b=PR7tL8Ssw9G/g4DTUV9ndGia2SqcRsWGkmiyC45UQY2bHjSgI6vE490GA9kELO5E9Ld+cAFphPA3UeoYRq0FVvsqxq9EA54uI1QjqB4pqdqW5z3tT2rSON+tUJYbN3MvlD6iIOcu+76cnGBUScQ6JUqPrB2prckBnV/w/4lQok0= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=OSoQyHfZYYDW3lRWxd9F0DdF4GcLrqBRfJyfSbO8oruS9Wp7Rm47wYXnXcdo15zFkI1YtpM5c9cDx2LGxEjrEliT440XkdJqpHb99K5xRW5FQKjOdhYocYkTILJMV6gQ4CltkdlFXrSlKIpnwOOi3IvWJyYErlqxTN3gtHorHTldv93wt8z6fu+5uVc3bR+sUNSOeo+bjDBoGgOulvlG5g3g/qN0mBuKQZntTpL/gTYTMf6V95R6pWOTzfBsMEpyiAGWWaxScv8+TDVOPD0MvxkrFF3bLdygZRhDk1xBMBuL/PkgVau5DIFb60RWCiLlchBKcz8BtROxyHeycwh6Pw== ARC-Message-Signature: i=2; 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=Mqb+/DRImqGk72MBhLvY88kO5MrHArdAMOPo/5Vk46A=; b=H8O5oNZnWbH9fBkyn9fmfi+rmyAV/Hl6i+YjLJ1IDpHOqfXaQ3LUvGwtT1mbHb76H+UuQ44x7r4WxmwtSV9VIOMwXyo2/kVner0cvXMK3CvjQjgFosXlk8or8M4djvxW2Ri8dPQpEgBiRHiY6QB6yg1sSQdsNkp4YIZmrHOw5QxOL5XLkm33JERkH7VQ5HOT/P3QVdOaE+RNZzGsMiZGmQCQeZrtAwNhVcumAXHFWBySy6p3cby0p5v5WuyRgrM7byn7zcOeAk8WFf8fMnZXlFW1Ru6054dECpi6GBMt66VgJeHmqQGuQIbj9ubE7HsNqUB4FUG4PxyY7j1JIRMdLQ== 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=arm.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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mqb+/DRImqGk72MBhLvY88kO5MrHArdAMOPo/5Vk46A=; b=k1qYzEed1+hWDnmMui6MsbCp/2KAnXdwzBtFmediMhHUwQucznIYHerA7PBfNVHt1hEMslRtlxRXNvmMLkEK3yp/byCQyhlC89cGiF9PxolM81g9RqgWRB0yWQhGtHcgoyloEVuSKU4hzRkxdpW6aPIdxQYFk3Emrp9bVV8LPL0= Received: from DB8PR06CA0021.eurprd06.prod.outlook.com (2603:10a6:10:100::34) by VI0PR08MB11199.eurprd08.prod.outlook.com (2603:10a6:800:255::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Thu, 8 Aug 2024 10:50:30 +0000 Received: from DU2PEPF0001E9C0.eurprd03.prod.outlook.com (2603:10a6:10:100:cafe::c5) by DB8PR06CA0021.outlook.office365.com (2603:10a6:10:100::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.14 via Frontend Transport; Thu, 8 Aug 2024 10:50:30 +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=arm.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 DU2PEPF0001E9C0.mail.protection.outlook.com (10.167.8.69) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Thu, 8 Aug 2024 10:50:30 +0000 Received: ("Tessian outbound 03e86f0582e5:v365"); Thu, 08 Aug 2024 10:50:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4e55f1db1217091e X-CR-MTA-TID: 64aa7808 Received: from Lcfdc7f280203.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F11C5CC8-9F7B-46BC-981B-D69B0B8CC4E3.1; Thu, 08 Aug 2024 10:50:23 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lcfdc7f280203.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 08 Aug 2024 10:50:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e0bMJqoirkptGQVeFpgHjUBNYXBijGRJD8FHU6fmo+GBJz4GpndjMW2gAE3XfrBIRaKnL5bXwIgzvyvhkLzKokVe+WiK70ADsM/z0phXDuiax39PjRmysSmkTovHUE6nxntrwFAqKlU0YQHQ2DQGOzyrbSye6Jd0qkhl6bY/hHsICn7gLGSxZkvgPazIGUS2i+V+8biltgXCM05RdxshE7bmAeDlloIjouEccLJqGahcDPv54Vv7MnHyWjYV9EH+AJd9+tXW9loGq+mwn01hp8uxqRReRJ+bufjuxK1KDOR8AJhiKPsjhujUicDtHSvDsY4jj+YWvK919KHGY/kJLg== 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=Mqb+/DRImqGk72MBhLvY88kO5MrHArdAMOPo/5Vk46A=; b=GvMIbuKtQc02rMaN3tm93GQEfBtdpqg4nrdG2LJF6qIe2dTnlilF2bl1tb1Ss7BGGp6Ribemey5vsVb6iUdA28rK2II08L8Jnsh6z6azrY5BTeimb9UQgmUHRDXogo3ugI7oabb/SYmrhKHimaQr7OqfQEgH/G1WVwXfERS/xtQpebpqjdhEq0kF6u+rF5pMn86uxioFIgDPugX9bURZjATqQoCNOUZGGna1bjU+fSZoyHIof9igerv18KSiEbyfzT5pMM9XXL5mQ1B6MC+t7Zq6+4wecrWXep/Lq92vZBEBDm0U4S4XViFTlEvahGfQ4Qtr41cRfvm+fpYzCpNZTg== 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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mqb+/DRImqGk72MBhLvY88kO5MrHArdAMOPo/5Vk46A=; b=k1qYzEed1+hWDnmMui6MsbCp/2KAnXdwzBtFmediMhHUwQucznIYHerA7PBfNVHt1hEMslRtlxRXNvmMLkEK3yp/byCQyhlC89cGiF9PxolM81g9RqgWRB0yWQhGtHcgoyloEVuSKU4hzRkxdpW6aPIdxQYFk3Emrp9bVV8LPL0= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PR3PR08MB5852.eurprd08.prod.outlook.com (2603:10a6:102:8e::21) by AS2PR08MB9973.eurprd08.prod.outlook.com (2603:10a6:20b:641::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.13; Thu, 8 Aug 2024 10:50:21 +0000 Received: from PR3PR08MB5852.eurprd08.prod.outlook.com ([fe80::f44:d113:1c29:825d]) by PR3PR08MB5852.eurprd08.prod.outlook.com ([fe80::f44:d113:1c29:825d%3]) with mapi id 15.20.7828.023; Thu, 8 Aug 2024 10:50:21 +0000 Message-ID: <8f70328b-8a35-463f-b153-25c0b63956d7@arm.com> Date: Thu, 8 Aug 2024 11:50:19 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] gdb/testsuite: track if a caching proc calls gdb_exit or not Content-Language: en-US From: Luis Machado To: Andrew Burgess , gdb-patches@sourceware.org References: <5dc846ffb6cd8f76ba2769ee7679f5d1b01fae0a.1717438458.git.aburgess@redhat.com> <97973506-79f4-4216-9c0b-57401b3933f5@arm.com> <878qx8z9nt.fsf@redhat.com> <9fbc6f52-bc2f-43c8-80b0-3f4c495df76e@arm.com> In-Reply-To: <9fbc6f52-bc2f-43c8-80b0-3f4c495df76e@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0373.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::18) To PR3PR08MB5852.eurprd08.prod.outlook.com (2603:10a6:102:8e::21) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PR3PR08MB5852:EE_|AS2PR08MB9973:EE_|DU2PEPF0001E9C0:EE_|VI0PR08MB11199:EE_ X-MS-Office365-Filtering-Correlation-Id: d98050bc-865f-474e-6cb6-08dcb797ebb5 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?cnh0cThiYVpaaXlvWHhjdG41NG8wcGxReUtoa01uZTUrc3FRNHB6bS9YY2d1?= =?utf-8?B?bSsyZDI3ZThhbjdpeFY1M291OEtLQ3NvaVFjamQ5OW4zeE0yb0hiN29NR3VE?= =?utf-8?B?SENxcERteFZpUnFxOGVxNnQvSWxibTRld0Z0RTRhaDNsbThhSDVmNHdId1Zn?= =?utf-8?B?WnBhTTdLcG1hTlBmV1ZyUkVYVUoxdGJwR1hFbUJMTHptcksySlpjZTI4TlMv?= =?utf-8?B?LzlNWFF0b0RiTkJBbDZrSnh5c1hBRGFEZkhQYllUME40SE9ZMHphNjE0VDIr?= =?utf-8?B?WGo0cUNUS29mWFppVE5sWjcvK1pLZHFTZEtUeXJXSDhaUm9zWW4ra2VZU0tT?= =?utf-8?B?U2QxSERiaE1laDhCcStnMDk5ZkhWUXh3d2Q3bndUZnlqdlZpS0FCTVpjaDdU?= =?utf-8?B?ZnpjSnNHVURnaStPano4Snd0dWpweVpzZU4yMTJ3aCtiZ0wvcFF5S2ZkMitk?= =?utf-8?B?T08xK1hsek0wNnZjUUVVYUZJOE9rbHptNVQ1U1F1bE1meTBsdmlKK0l0K0tr?= =?utf-8?B?R1cyY3RrWkd6U2d2U3NMclNZWUpqZ0doZENlNkRMTVNRbzNHN25VLzJ4MXll?= =?utf-8?B?UFoydGx5TVliWWVDUnJhVXJ6VVBwT3pGQ0JITjNicjhtRlphcmVobzZGbEVs?= =?utf-8?B?UEFmdXBBRTdWeG1IRnBuYjFqcGpjUG12b2xzMjZNdkE0NE9ZdGpFRGN3RWd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-8?B?Yk5aRUZmNGl0aE5rL1JLZUVkWWRaYnVhMjd1VTJCbzB0UFRhZzM5bGdPaGpn?= =?utf-8?B?NmFqakREcm5HeFRyQyt3WG04clZnbUc2MUQzV3BlTXZtbHdHdzhyV1RsMFVW?= =?utf-8?Q?d9zdC3eU0M7yZORSmk=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5852.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9973 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-SkipListedInternetSender: ip=[2603:10a6:102:8e::21]; domain=PR3PR08MB5852.eurprd08.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF0001E9C0.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 84fd6669-ec39-4057-aa9a-08dcb797e63f X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|82310400026|35042699022|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Zkl4eE1CNEp6VDBxc0ZPK0Q2S2pNZXdwdEV6UkNEa0REaVhnazlqcnNvTDB3?= =?utf-8?B?UllQbSt3UENsSjY1MkRNT1U0SmJDTS8wRGFVejl0KzZrbHFwTjRpYUxWN1BK?= =?utf-8?B?cmthKzU4MmJqcjltbjZBQXpWb1NaTGxKNVV5cTdxallDWkJLb3ArcHhZdEZ5?= =?utf-8?B?dzF4aXplemNuYmRNRmhqVlUraWlud0FVZWpkRnBhaU11NEg4eHdNNk80Q2lQ?= =?utf-8?B?V1VpVElrYkxzL1MwK202bVZ5ODRpYXppalpKVU1ZZkFTYlR0aXZjajFlbTg2?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NHdt?= =?utf-8?B?N3ZhYlU3Z0hIMEgwTlhYUTRzSnFMVkVBWjlEQkxjVlBtMm9ScTBMajAzZ0JE?= =?utf-8?B?bFkyTVBnK0hYMUw1SEVmV3JIcWpkVURhZmZlNlhwclFJUnRSQ1NOL1gxa3V4?= =?utf-8?B?T3lBTEZ2OE5UUnhDQ1lTUWpETDB1VkozUk9LS2hOMlpvRkFia3VlSzBHRERr?= =?utf-8?B?czk2NFg1MkJWV1ovcXpoNklSNzlncWtmQ1FFZVNMVFhIU1BOalA2NFNXTzQv?= =?utf-8?B?WVJqNjFOMUh3b053aGd6UG9vcTNpSTBEdFVlZVp0Y3ZGeG82MUpWV2dZa01n?= =?utf-8?B?K0kyUEprL05icnhxRnF4ejQwbElRdW5rWGV4YmE4TzkyRGF6ck1BL2h2UldR?= =?utf-8?B?MUZnMktDdmFUMEdVY3J0YTNaYzlxbFMxS3hNeVNqdWhST0tmQjg2WFh6eGQ1?= =?utf-8?B?eHpoR3o2d01mRlBpMmVCbFNuNE5HV3g0L2szbE9TTzdFTnRmaDdiWGhGMk1E?= =?utf-8?B?cW9ENHArODd1U2RHUXNXQkp2WGxlQ0pkTzVESFpEdGlScEtwaXZUa2h0NUlj?= =?utf-8?B?bmY4VmF2TTRHN1QxZGpGZjRKTkpIcFBxUnVLdlNBNDRsRUtFTTRDSUU5WWc5?= =?utf-8?B?NmZ2c0t2R1htZXYzL1BNMUljNmFnTnFFMUxEa1p2L2hKUHFBRkE0cm9VYVhy?= =?utf-8?B?SFo0ck1aTGc5aVE5M0FGeHprQXBEeng2L1pJQTcvYlpzTmc9PQ==?= 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:(13230040)(376014)(1800799024)(82310400026)(35042699022)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2024 10:50:30.2248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d98050bc-865f-474e-6cb6-08dcb797ebb5 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: DU2PEPF0001E9C0.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB11199 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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.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 On 8/8/24 11:20, Luis Machado wrote: > On 8/7/24 15:31, Andrew Burgess wrote: >> Luis Machado writes: >> >>> Hi Andrew, >>> >>> On 6/3/24 19:16, Andrew Burgess wrote: >>>> After a recent patch review I asked myself why can_spawn_for_attach >>>> exists. This proc currently does some checks, and then calls >>>> can_spawn_for_attach_1 which is an actual caching proc. >>>> >>>> The answer is that can_spawn_for_attach exists in order to call >>>> gdb_exit the first time can_spawn_for_attach is called within any test >>>> script. >>>> >>>> The reason this is useful is that can_spawn_for_attach_1 calls >>>> gdb_exit. If imagine the user calling can_spawn_for_attach_1 directly >>>> then a problem might exist. Imagine a test written like this: >>>> >>>> gdb_start >>>> >>>> if { [can_spawn_for_attach_1] } { >>>> ... do stuff that assumes GDB is running ... >>>> } >>>> >>>> If this test is NOT the first test run, and if an earlier test calls >>>> can_spawn_for_attach_1, then when the above test is run the >>>> can_spawn_for_attach_1 call will return the cached value and gdb_exit >>>> will not be called. >>>> >>>> But, if the above test IS the first test run then >>>> can_spawn_for_attach_1 will not returned the cached value, but will >>>> instead compute the cached value, a process that ends up calling >>>> gdb_exit. When the body of the if is executed GDB would no longer be >>>> running and the test would fail! >>>> >>>> So can_spawn_for_attach was added which ensures that we _always_ call >>>> gdb_exit the first time can_spawn_for_attach is called within a single >>>> test script, this ensures that in the above case, even if the above is >>>> not the first test run, gdb_exit will still be called. This avoids >>>> some hidden bugs in the testsuite. >>>> >>>> However, what I observe is that can_spawn_for_attach is not the only >>>> caching proc that calls gdb_exit. Why does can_spawn_for_attach get >>>> special treatment when surely the same issue exists for any other >>>> caching proc that calls gdb_exit? >>>> >>>> I think a better solution is to move the logic from >>>> can_spawn_for_attach into cache.exp and generalise it so that it >>>> applies to all caching procs. >>>> >>>> This commit does this by: >>>> >>>> 1. When the underlying caching proc is executed we wrap gdb_exit. >>>> This wrapper sets a global to true if gdb_exit is called. The >>>> value of this global is stored in gdb_data_cache (using a ',exit' >>>> suffix), and also written to the cache file if appropriate. >>>> >>>> 2. When a cached value is returned from gdb_do_cache, if the >>>> underlying proc would have called gdb_exit, and if this is the >>>> first use of the caching proc in this test script, then we call >>>> gdb_exit. >>>> >>>> When storing the ',exit' value into the on-disk cache file, the flag >>>> value is stored on a second line. Currently every cached value only >>>> occupies a single line, and a check is added to ensure this remains >>>> true in the future. >>>> >>>> One issue did come up in testing, a FAIL in gdb.base/break-interp.exp, >>>> this was caused by can_spawn_for_attach_1 calling gdb_start without >>>> first calling gdb_exit. Under the old way of doing things >>>> can_spawn_for_attach would call gdb_exit _before_ possibly calling the >>>> actual caching proc. Under the new scheme gdb_exit is called _after_ >>>> calling the actual caching proc. What was happening was that >>>> break-interp.exp would leave GDB running then call >>>> can_spawn_for_attach, when the test in can_spawn_for_attach_1 tried to >>>> attach to the inferior, state left in the running GDB would cause some >>>> unexpected behaviour. Fixed by having can_spawn_for_attach_1 call >>>> gdb_exit before calling gdb_start, this ensures we have a fresh GDB. >>>> >>>> With this done can_spawn_for_attach_1 can be renamed to >>>> can_spawn_for_attach, and the existing can_spawn_for_attach can be >>>> deleted. >>>> --- >>>> gdb/testsuite/lib/cache.exp | 86 +++++++++++++++++++++++++++++++------ >>>> gdb/testsuite/lib/gdb.exp | 83 +++++++++-------------------------- >>>> 2 files changed, 93 insertions(+), 76 deletions(-) >>>> >>>> diff --git a/gdb/testsuite/lib/cache.exp b/gdb/testsuite/lib/cache.exp >>>> index e7b9114058b..fef065ec8b0 100644 >>>> --- a/gdb/testsuite/lib/cache.exp >>>> +++ b/gdb/testsuite/lib/cache.exp >>>> @@ -46,6 +46,40 @@ proc gdb_do_cache_wrap {real_name args} { >>>> return $result >>>> } >>>> >>>> +# Global written to by wrap_gdb_exit. Set to true if wrap_gdb_exit is >>>> +# called. >>>> + >>>> +set gdb_exit_called false >>>> + >>>> +# Wrapper around gdb_exit. Use with_override to replace gdb_exit with >>>> +# wrap_gdb_exit, the original gdb_exit is renamed to orig_gdb_exit. >>>> + >>>> +proc wrap_gdb_exit {} { >>>> + set ::gdb_exit_called true >>>> + orig_gdb_exit >>>> +} >>>> + >>>> +# If DO_EXIT is false then this proc does nothing. If DO_EXIT is true >>>> +# then call gdb_exit the first time this proc is called for each >>>> +# unique value of NAME within a single test. Every subsequent time >>>> +# this proc is called within a single test (for a given value of >>>> +# NAME), don't call gdb_exit. >>>> + >>>> +proc gdb_cache_maybe_gdb_exit { name do_exit } { >>>> + if { !$do_exit } { >>>> + return >>>> + } >>>> + >>>> + # To track if this proc has been called for NAME we create a >>>> + # global variable. In gdb_cleanup_globals (see gdb.exp) this >>>> + # global will be deleted when the test has finished. >>>> + set global_name __${name}__cached_gdb_exit_called >>>> + if { ![info exists ::${global_name}] } { >>>> + gdb_exit >>>> + set ::${global_name} true >>>> + } >>>> +} >>>> + >>>> # A helper for gdb_caching_proc that handles the caching. >>>> >>>> proc gdb_do_cache {name args} { >>>> @@ -71,10 +105,12 @@ proc gdb_do_cache {name args} { >>>> >>>> set is_cached 0 >>>> if {[info exists gdb_data_cache(${cache_name},value)]} { >>>> - set cached $gdb_data_cache(${cache_name},value) >>>> - verbose "$name: returning '$cached' from cache" 2 >>>> + set cached_value $gdb_data_cache(${cache_name},value) >>>> + set cached_exit $gdb_data_cache(${cache_name},exit) >>>> + verbose "$name: returning '$cached_value' from cache" 2 >>>> if { $cache_verify == 0 } { >>>> - return $cached >>>> + gdb_cache_maybe_gdb_exit $name $cached_exit >>>> + return $cached_value >>>> } >>>> set is_cached 1 >>>> } >>>> @@ -83,24 +119,46 @@ proc gdb_do_cache {name args} { >>>> set cache_filename [make_gdb_parallel_path cache $cache_name] >>>> if {[file exists $cache_filename]} { >>>> set fd [open $cache_filename] >>>> - set gdb_data_cache(${cache_name},value) [read -nonewline $fd] >>>> + set content [split [read -nonewline $fd] \n] >>>> close $fd >>>> - set cached $gdb_data_cache(${cache_name},value) >>>> - verbose "$name: returning '$cached' from file cache" 2 >>>> + set gdb_data_cache(${cache_name},value) [lindex $content 0] >>>> + set gdb_data_cache(${cache_name},exit) [lindex $content 1] >>>> + set cached_value $gdb_data_cache(${cache_name},value) >>>> + set cached_exit $gdb_data_cache(${cache_name},exit) >>>> + verbose "$name: returning '$cached_value' from file cache" 2 >>>> if { $cache_verify == 0 } { >>>> - return $cached >>>> + gdb_cache_maybe_gdb_exit $name $cached_exit >>>> + return $cached_value >>>> } >>>> set is_cached 1 >>>> } >>>> } >>>> >>>> - set real_name gdb_real__$name >>>> - set gdb_data_cache(${cache_name},value) [gdb_do_cache_wrap $real_name {*}$args] >>>> + set ::gdb_exit_called false >>>> + with_override gdb_exit wrap_gdb_exit orig_gdb_exit { >>>> + set real_name gdb_real__$name >>>> + set gdb_data_cache(${cache_name},value) [gdb_do_cache_wrap $real_name {*}$args] >>>> + } >>>> + set gdb_data_cache(${cache_name},exit) $::gdb_exit_called >>>> + >>>> + # If a value being stored in the cache contains a newline then >>>> + # when we try to read the value back from an on-disk cache file >>>> + # we'll interpret the second line of the value as the ',exit' value. >>>> + if { [regexp "\[\r\n\]" $gdb_data_cache(${cache_name},value)] } { >>>> + set computed_value $gdb_data_cache(${cache_name},value) >>>> + error "Newline found in value for $cache_name: $computed_value" >>>> + } >>>> + >>>> if { $cache_verify == 1 && $is_cached == 1 } { >>>> - set computed $gdb_data_cache(${cache_name},value) >>>> - if { $cached != $computed } { >>>> - error [join [list "Inconsistent results for $cache_name:" >>>> - "cached: $cached vs. computed: $computed"]] >>>> + set computed_value $gdb_data_cache(${cache_name},value) >>>> + set computed_exit $gdb_data_cache(${cache_name},exit) >>>> + if { $cached_value != $computed_value } { >>>> + error [join [list "Inconsistent value results for $cache_name:" >>>> + "cached: $cached_value vs. computed: $computed_value"]] >>>> + } >>>> + if { $cached_exit != $computed_exit } { >>>> + error [join [list "Inconsistent exit results for $cache_name:" >>>> + "cached: $cached_exit vs. computed: $computed_exit"]] >>>> } >>>> } >>>> >>>> @@ -110,9 +168,11 @@ proc gdb_do_cache {name args} { >>>> # Make sure to write the results file atomically. >>>> set fd [open $cache_filename.[pid] w] >>>> puts $fd $gdb_data_cache(${cache_name},value) >>>> + puts $fd $gdb_data_cache(${cache_name},exit) >>>> close $fd >>>> file rename -force -- $cache_filename.[pid] $cache_filename >>>> } >>>> + gdb_cache_maybe_gdb_exit $name $gdb_data_cache(${cache_name},exit) >>>> return $gdb_data_cache(${cache_name},value) >>>> } >>>> >>>> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp >>>> index 8235d4f28eb..d29fd740f91 100644 >>>> --- a/gdb/testsuite/lib/gdb.exp >>>> +++ b/gdb/testsuite/lib/gdb.exp >>>> @@ -6186,14 +6186,23 @@ proc gdb_exit { } { >>>> catch default_gdb_exit >>>> } >>>> >>>> -# Helper function for can_spawn_for_attach. Try to spawn and attach, and >>>> -# return 0 only if we cannot attach because it's unsupported. >>>> - >>>> -gdb_caching_proc can_spawn_for_attach_1 {} { >>>> - # For the benefit of gdb-caching-proc-consistency.exp, which >>>> - # calls can_spawn_for_attach_1 directly. Keep in sync with >>>> - # can_spawn_for_attach. >>>> - if { [is_remote target] || [target_info exists use_gdb_stub] } { >>>> +# Return true if we can spawn a program on the target and attach to >>>> +# it. >>>> + >>>> +gdb_caching_proc can_spawn_for_attach {} { >>>> + # We use exp_pid to get the inferior's pid, assuming that gives >>>> + # back the pid of the program. On remote boards, that would give >>>> + # us instead the PID of e.g., the ssh client, etc. >>>> + if {[is_remote target]} { >>>> + verbose -log "can't spawn for attach (target is remote)" >>>> + return 0 >>>> + } >>>> + >>>> + # The "attach" command doesn't make sense when the target is >>>> + # stub-like, where GDB finds the program already started on >>>> + # initial connection. >>>> + if {[target_info exists use_gdb_stub]} { >>>> + verbose -log "can't spawn for attach (target is stub)" >>>> return 0 >>>> } >>>> >>>> @@ -6218,6 +6227,9 @@ gdb_caching_proc can_spawn_for_attach_1 {} { >>>> set test_spawn_id [spawn_wait_for_attach_1 $obj] >>>> remote_file build delete $obj >>>> >>>> + # In case GDB is already running. >>>> + gdb_exit >>>> + >>>> gdb_start >>>> >>>> set test_pid [spawn_id_get_pid $test_spawn_id] >>>> @@ -6239,61 +6251,6 @@ gdb_caching_proc can_spawn_for_attach_1 {} { >>>> return $res >>>> } >>>> >>>> -# Return true if we can spawn a program on the target and attach to >>>> -# it. Calls gdb_exit for the first call in a test-case. >>>> - >>>> -proc can_spawn_for_attach { } { >>>> - # We use exp_pid to get the inferior's pid, assuming that gives >>>> - # back the pid of the program. On remote boards, that would give >>>> - # us instead the PID of e.g., the ssh client, etc. >>>> - if {[is_remote target]} { >>>> - verbose -log "can't spawn for attach (target is remote)" >>>> - return 0 >>>> - } >>>> - >>>> - # The "attach" command doesn't make sense when the target is >>>> - # stub-like, where GDB finds the program already started on >>>> - # initial connection. >>>> - if {[target_info exists use_gdb_stub]} { >>>> - verbose -log "can't spawn for attach (target is stub)" >>>> - return 0 >>>> - } >>>> - >>>> - # The normal sequence to use for a runtime test like >>>> - # can_spawn_for_attach_1 is: >>>> - # - gdb_exit (don't use a running gdb, we don't know what state it is in), >>>> - # - gdb_start (start a new gdb), and >>>> - # - gdb_exit (cleanup). >>>> - # >>>> - # By making can_spawn_for_attach_1 a gdb_caching_proc, we make it >>>> - # unpredictable which test-case will call it first, and consequently a >>>> - # test-case may pass in say a full test run, but fail when run >>>> - # individually, due to a can_spawn_for_attach call in a location where a >>>> - # gdb_exit (as can_spawn_for_attach_1 does) breaks things. >>>> - # To avoid this, we move the initial gdb_exit out of >>>> - # can_spawn_for_attach_1, guaranteeing that we end up in the same state >>>> - # regardless of whether can_spawn_for_attach_1 is called. However, that >>>> - # is only necessary for the first call in a test-case, so cache the result >>>> - # in a global (which should be reset after each test-case) to keep track >>>> - # of that. >>>> - # >>>> - # In summary, we distinguish between three cases: >>>> - # - first call in first test-case. Executes can_spawn_for_attach_1. >>>> - # Calls gdb_exit, gdb_start, gdb_exit. >>>> - # - first call in following test-cases. Uses cached result of >>>> - # can_spawn_for_attach_1. Calls gdb_exit. >>>> - # - rest. Use cached result in cache_can_spawn_for_attach_1. Calls no >>>> - # gdb_start or gdb_exit. >>>> - global cache_can_spawn_for_attach_1 >>>> - if { [info exists cache_can_spawn_for_attach_1] } { >>>> - return $cache_can_spawn_for_attach_1 >>>> - } >>>> - gdb_exit >>>> - >>>> - set cache_can_spawn_for_attach_1 [can_spawn_for_attach_1] >>>> - return $cache_can_spawn_for_attach_1 >>>> -} >>>> - >>>> # Centralize the failure checking of "attach" command. >>>> # Return 0 if attach failed, otherwise return 1. >>>> >>> >>> This is a bit after the fact, but I tracked down some aarch64 sme test regressions >>> to this particular patch. I'm still investigating exactly why it stopped working, but I >>> can tell it only happens if we run 2 or more tests in the same run. It is not >>> clear if making things parallel has an impact, or if it is just the fact we >>> run 2+ tests in the same run. >>> >>> I suspect we may be calling gdb_exit when we shouldn't, and then things just >>> stop working. >>> >>> --- >>> >>> Running target unix >>> Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. >>> Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. >>> Using repos/binutils-gdb/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file. >>> Running repos/binutils-gdb/gdb/testsuite/gdb.arch/aarch64-sme-core-0.exp ... >>> Running repos/binutils-gdb/gdb/testsuite/gdb.arch/aarch64-sme-regs-unavailable-3.exp ... >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> FAIL: gdb.arch/aarch64-sme-regs-unavailable-3.exp: prctl, vl=32 svl=256: check_regs: incorrect ZA state >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> ERROR: no fileid for ubuntu >>> FAIL: gdb.arch/aarch64-sme-regs-unavailable-3.exp: gdb, vl=32 svl=256: check_regs: incorrect ZA state >> >> Luis, >> >> Could you please test the patch below to see if this fixes the issues >> you are seeing. This is also running through local testing at my side, >> but I thought I'd get your feedback early. >> >> Thanks, >> Andrew >> > > Well, it's one of those things I guess. I saw some errors the first time I tried the patch, but then > I couldn't reproduce it anymore. So far it's been running pretty smoothly for both parallel and > serialized runs. So I'd say this patch does the job and we should push it. > Thanks for putting it together. > > I'll do a complete run overnight just to make sure, but it will take a little bit before I can report > it. Of course, a short while after sending this, I managed to reproduce the error. I'm running the following: make check-gdb TESTS=gdb.arch/*.exp -j$(nproc). Let me fetch some more information.