From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oENIJ6P2VWpLgQcAWB0awg (envelope-from ) for ; Tue, 14 Jul 2026 04:43:15 -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=dHYZ4lhU; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=dHYZ4lhU; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8BD441E09E; Tue, 14 Jul 2026 04:43:15 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (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 DADBB1E099 for ; Tue, 14 Jul 2026 04:43:13 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE9DE4BA2E0E for ; Tue, 14 Jul 2026 08:43:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE9DE4BA2E0E Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=dHYZ4lhU; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=dHYZ4lhU Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11013050.outbound.protection.outlook.com [52.101.72.50]) by sourceware.org (Postfix) with ESMTPS id 5E3664BA2E05 for ; Tue, 14 Jul 2026 08:42:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E3664BA2E05 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 5E3664BA2E05 Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.72.50 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1784018530; cv=pass; b=ZVLZ2qN/Ym//M93iGQtewGse7VqNEZ6sgpnazhrcNCQPjDAzAJ+ZWu0wDKWwU53wKIdXeGLo/Ok/awcU/RerHrE/Pk/ycBqWg4qtiNVm5giRf0CZ87b2YbROmmZLYlqHu2haV8b3lW9RwdRN8VH4AdUKw9Ic6m59XlpvWB9zEtM= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1784018530; c=relaxed/simple; bh=SmUat2EovKS2eP9B66WPheVs7+Rdn50N7dWu0d7GdHw=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=tS9/UfgujzuLvsuvuA2LxRsHqsQfX9M/pEE4OgQ9/fVnu5lSfP2kJz4Cv9hHGL3Y78ovozIROaMho7PRwab3XCrZ3l/kB1EjNouPqGcpbsWK09v5SfpYaHNp3HrUF7+lYW3+x36NvErlMVNxlJkAo+vDlC8/z0FdAHQJPJWjkhA= ARC-Authentication-Results: i=3; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=dHYZ4lhU; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=dHYZ4lhU DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E3664BA2E05 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ycn4XWj1voosb9EJYluNRSGM9pXd61rZ97mirL/6PdXvCyiUemSmQwzisz3DJspptYB2acbirEFl+CfImhkP09AS7+tugkr0ycfISmgSY4RtGkCVMsxkOXr7Id35iIcfxqt0NFw3zASoBp2n00oepzPFJClAUg+AobNpAITt+w8Pb9ijZLci23LEryL9bdtq1ZI3qZBBShcnVpSFAMY1TRXwl/nwh8zRBaqQOhmE2DGCYb1JCRGtpw/AUxU6dyAWazCT5M9FfnBWjePo2kyz9EEq0oGnT2VbHt3zRZdFjNnGMQmUhwkn2Yife0cONzzV6BdZVLJfmhuUFZ+2ApUWkg== 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=2bMF6Hc6Uzk4Gyv9mzDw3bkL0OSsU1PgZUBSI4A39fc=; b=KdjJAamrnwPtqKRMc3MXzUN3uC6rWBAEhYWqMYUzIwUCE3on5U9GOVI9D6Gj/CbqzAmE3dXzhFDUllYXiDI3VCL2L+qkBAsJJRyfoVPzjGB50KLEPb5SiCE69V0heiV9f0usZjxkw3grjpmVCH0QFocvQkgDtMoJBwxqcKOXvrJeNvwphjN+ANzUNs6Rq1ZfiW9rkZwqsL47QVzbzxZ1TTNOiLJhrYTeUPo5tLO1FOwHQKRCsVt9AXTYw/dNi4yrtuV9JMo9ib2YbDFXfM9RhmRKEf8V5NtQhO1n9pbhsGonEgp1lJ67MicujwQ5bIAS1wdZaeZLJ70BN/JDch0rhA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=linaro.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=2bMF6Hc6Uzk4Gyv9mzDw3bkL0OSsU1PgZUBSI4A39fc=; b=dHYZ4lhUKOiDBQRjFrLmpiGBYvw8LlD9EgGhGaWy7kltfhuiZJC3gBCvQp/5nj/ZSb0jrOVc9DP1gG8YnrhEBbNGoGB/o9AT8WZspnKQ4VO0pl5hG6DjVcEABOVcDsRN256H8QxeUC1x7QOT9C99gB6mTD2Asesu6iyjorsoG9U= Received: from AS8PR07CA0037.eurprd07.prod.outlook.com (2603:10a6:20b:459::9) by AS8PR08MB8223.eurprd08.prod.outlook.com (2603:10a6:20b:520::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.18; Tue, 14 Jul 2026 08:42:02 +0000 Received: from AMS0EPF0000019C.eurprd05.prod.outlook.com (2603:10a6:20b:459:cafe::3b) by AS8PR07CA0037.outlook.office365.com (2603:10a6:20b:459::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.223.9 via Frontend Transport; Tue, 14 Jul 2026 08:42:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) 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 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by AMS0EPF0000019C.mail.protection.outlook.com (10.167.16.248) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.223.9 via Frontend Transport; Tue, 14 Jul 2026 08:42:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lbIuFT4brb1HQ70VfXDYtMzh2PN9BsIAZp0Ipk8vzaQzB2IXpMEYNcXyBMTvTxO7YetsRoOszEuJHux4Wdj0dOEzDu2EpIgA1h7llU2dRgijZ3A9OJl7OUPWnZAc3sDIA7+KSo30FXvhb9WWJEb6/xFHsvr1oI5Yd6WM6lIOOlPf4I480RoNmhz3IdkJSjNGG+PdK8TFLSbvbg38S++cyeVnCfuSO9mWoRhYQqBoIFxsz+nWeWFnv1+48YZAIxzEY/evlJrWUh6GIIGQmzEG2ZhlF9GQMfxM7JLjFS0gjayZgwd7xlL/pTah87oAJ40vZkzOoYjiCb0ov9NCI2fZMg== 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=2bMF6Hc6Uzk4Gyv9mzDw3bkL0OSsU1PgZUBSI4A39fc=; b=RDs16/+FGY9qJbTfIUO512765Do/ijTBBPEsKLkuaAnhkhvPoiAM4NRTKGlgQ2BCTWWSUZmZW6vD4qO9hgXEg5fgsmVUtksky34xDR5leV/rUaawZg7DW2uGbqxu6xbn23RZRccIBUdSgciQPMuyGleQ3EItJlJy1aQmdgyF5Me8azGr0f8sz6PHbutmnqpxRlY4EOtnTjyIsnRz6OVDiDR4PITkAV4Q61bXKx5heXf8WbKarojFQt5eEwgMgPr1/MFzyJnGZM0FOA13HOsPPVwyoWHvy2cOQPj/rS+u7sDI5cOigf001nm8fLiqFGzsNY92FngqGcA5XT9BKHKbEg== 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=2bMF6Hc6Uzk4Gyv9mzDw3bkL0OSsU1PgZUBSI4A39fc=; b=dHYZ4lhUKOiDBQRjFrLmpiGBYvw8LlD9EgGhGaWy7kltfhuiZJC3gBCvQp/5nj/ZSb0jrOVc9DP1gG8YnrhEBbNGoGB/o9AT8WZspnKQ4VO0pl5hG6DjVcEABOVcDsRN256H8QxeUC1x7QOT9C99gB6mTD2Asesu6iyjorsoG9U= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB8659.eurprd08.prod.outlook.com (2603:10a6:20b:563::10) by AS8PR08MB9241.eurprd08.prod.outlook.com (2603:10a6:20b:5a0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.202.20; Tue, 14 Jul 2026 08:40:57 +0000 Received: from AS8PR08MB8659.eurprd08.prod.outlook.com ([fe80::96bf:2de3:5eab:70ae]) by AS8PR08MB8659.eurprd08.prod.outlook.com ([fe80::96bf:2de3:5eab:70ae%5]) with mapi id 15.21.0202.014; Tue, 14 Jul 2026 08:40:57 +0000 Message-ID: <6fc7a8ab-4644-4ac2-960e-49f6d7dfbbe2@arm.com> Date: Tue, 14 Jul 2026 09:40:55 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 07/10] gdb/linux-tdep: migrate linux_find_memory_regions_full to file_reader_t To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org, Luis Machado , Luis Machado , Andrew Burgess , Yury Khrustalev , Pedro Alves , Tom Tromey References: <20260707154900.94542-1-matthieu.longo@arm.com> <20260707154900.94542-8-matthieu.longo@arm.com> <87zf00zn2t.fsf@linaro.org> Content-Language: en-US From: Matthieu Longo In-Reply-To: <87zf00zn2t.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0140.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:193::19) To AS8PR08MB8659.eurprd08.prod.outlook.com (2603:10a6:20b:563::10) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB8659:EE_|AS8PR08MB9241:EE_|AMS0EPF0000019C:EE_|AS8PR08MB8223:EE_ X-MS-Office365-Filtering-Correlation-Id: 8f07814b-74f5-45b3-9c36-08dee183c653 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|366016|23010399003|1800799024|6133799003|4143699003|56012099006|11063799006|22082099003|18002099003; X-Microsoft-Antispam-Message-Info-Original: 3KtEsOgGmfueW7GAz04sFvrehG6oKuKrSsoVQWIZqJBDYl/Uase/yrqHr0i2FtuuQsGBCMMVNDilIZYdNqetXMmy+zO+v5iN85Vcw13tUzygFbVZJg/muA8Iigz1s1Em4rurdZGeTOARKFoGFfoNat9qyCaiZU+OP+3unVub9YljD8RzrdEca1PZbh7dNql0HFSbrcTcHD9julDWQUomVCqESiHT4utFuSZY2lwNPPn2lqBbtUwtn+SLFV4NTlBU1zusBGOsgsw4EnXxpzpmlyqzy/mv+b/zSkTYgVJ68oR5XWKdZKaL/MKnaqGapkEw2Q8TniqqOC9CbEpMKteDSWPZJxdKqtbORu295t2GYRbK21J3a+5WdnVhcGfI9NPrp9zH08ahK/qYD7CKPD8zAqjgJV75l5/oEPLQcEoWvJ4QLi5nr3kxzv+9Ro3dvc4q2baoVAnTQ+hI90klkQK6hd32+9PCeB+knC0wLzD9zzoADI1+BrEf6rVWc0KZLwWo6VvQVBXBvAekIPQ8n2lZxoZTD8aVzBG5IAfYY/TMizv/qrS0Pw6Yq7MF3JgjaqjYooNaFrZ10u94lpZYoitCLC1wfd3NPSoh1zhlTuWUYQJDkCO6MI+hievu5IJe65FfD3gFYjO108wLyW42hEFS6+mQeXOgpi60TAlHFIWqCt0= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB8659.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(23010399003)(1800799024)(6133799003)(4143699003)(56012099006)(11063799006)(22082099003)(18002099003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: Tc/62rnIAxZR3bpBps6pgq5ndiYCLU21JQUDWpWJ6NJbhzDQ5aKR9DcHHQzXYS4Z6b1Q/N3I2Xb4YiMueb1VuuDBAntvudcEu+iY/phnx1lB58cP96NopYCyI7MSVz+B2h5LrfSMESdyn6EpIWfPQgqWAVu4yPka12PgRXKszZca79s82gKsK7goSOYIBGcacIDO4AlBsBk/zkiD8FleSJ45gCClbPDb5nAndu3/rVBdAKx8O2WgAF0uexc9IbVvXHIAvg/vreE6Jmd+c6qJltOkc0hhKVO7Jq4xw06HVvtYPer2GFkRHpEi5Sp8Zwm1zWBRfoBK/RVtPRLCE5Nb+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9241 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF0000019C.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f236b2ab-2935-4d6f-6be3-08dee1839fb4 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|23010399003|1800799024|376014|14060799003|36860700016|35042699022|6133799003|4143699003|11063799006|56012099006|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: /9s7ZGJsuTDz36Ok1VLTPh2+VGJInID1OAttT60IfhA8tZKkC6bQ+/oqy7brgKGkgbcw88LfvILALPNiuMCkaeylDNOLhcPmVRPm8tNAyUfTssOXlkixmUfvTMGj725qabWqk3iH2PSQdADhICR/4UZrsnAXRFLc/Ia8cRWd8rLoVzEOaEiUo1GOUgpr4Ap3ve7cZu9QY7usRNtIepWeODY3OFPRH4qH16kdzceggVjcFgKzE33Q95w2g7S+PdAr7aLNPMIXUBF5TH6kNcgy5fJfYHKFJAserckMG4KiElMDiMEdcCTmQLQmAF3fd7gTWT3lqbVWkTHQm8qMqs8fAEdjnE0OLAeCfRHZ+f+Pt3exH7r4ctJpWk90T6bKShGJJxh/xmVNn4AM/mdPz2G8RPVeChrlUOSPlk1DnJTcYwz/+8utTYZ6n+ujYbdgqrIwuLOUYA015C4BEXradttu+UaDYtcwgbiuaTccUJJ/XGGToHHylyAf3oRBzR5XmcoFp2YCecoGwvI/xoUzi9am/MXHR0XxXuJ5yr1Jg0neEwqYQAiyq7+ehImGSQMEbClzDPoSI5mlxkMSj2rthJGaA9GjMpuFLL2RPYOcG5X9fvwL20HGdfAQ3oqFt8WAVlbaV6tZlYcHkSpN30chA+LbERU+jw/tyZ/SbXsA2cDUSqxh2ncJxg9Nk//VFcegQzaXEAqJkv9bNlwkpM+ajE3vbg== X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(23010399003)(1800799024)(376014)(14060799003)(36860700016)(35042699022)(6133799003)(4143699003)(11063799006)(56012099006)(22082099003)(18002099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bLakcImbHkHRhsCBhmpvf6TI6vwOk4v2HtDXeaJ420044fUfHGwOn90tK1tSb9S7JGezJtp/o3oDEsgaXZq/vssxYcQCeif5PLVflWQ8gBhvvS8sfP+ZZnBv8a96+h8b7J6lrBvDfXdHZonfb0yaPzls9cZBu1MOlkENAtdQjUmhRSI0op3m4+iqQ+du8aZMGhyFI+KsT1n1iA6IJu0LNuQO3FKbofl/BXikQBEXvvKXeiMUN/53L3J/NmR1lglPOSvajtnQiQ/J8jOXlO4vT+q4sceLnVhjqV6dY0biM6kNsyYZL5/CFhnEOhNQWVs05zos9VORkNzCXSmOu2UTY0HU+QXjJ3QVDhoB1F1fjm2Frdw8Es/qSlAP8uc/R/zXRIAeH8DbfIpw3L4U0ElSc0xgTlTbapYX24IqzevB1uSYZv8CNfzWECOERWndcat2 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2026 08:42:01.6616 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8f07814b-74f5-45b3-9c36-08dee183c653 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF0000019C.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8223 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 09/07/2026 07:36, Thiago Jung Bauermann wrote: > Matthieu Longo writes: > >> The previous implementation of linux_find_memory_regions_full could >> still return success even when none of the /proc/PID/[s]maps files >> existed, or all reads returned 0 bytes (this last case can happen on >> Linux when the thread-group leader has exited). >> As a result, the function could incorrectly succeed, allowing core >> dump generation via the gcore command. >> This logical defect was allowing, by chance, the function to return >> success and hence, allowing fortuitously the codedump generation via >> gcore command (see gcore-stale-thread test for more details). > > Did you run into this problem, or just noticed it by inspecting the > code? If the former, do you think it's worth adding a testcase to make > sure this problem doesn't appear again? > The command stopped working after I migrated the function to file_reader_t. As Christina Schimpe mentioned it, bool operator () now returns false if the buffer is null, or if the size returned is 0. This last is a change with the previous behavior. When the thread-group leader exits, the /proc/pid/[s]maps files still exist, but become empty. In such a case, the function should return false instead of trying to parse an empty string, which results in no smaps data entry being processed, and so no callback called. This behavior is erroneous in my opinion. I don't think that it is worth adding a testcase for this, because the root cause was the wrong pid being used. >> A previous patch in this patch series fixed this issue by using the >> first LWP ID of the current inferior instead of relying on the PID. >> This patch adapts the code to use file_reader_t and makes the function >> return an error is reading any of the procfs files fails. > > Typo: is → if > Fixed. >> --- >> gdb/linux-tdep.c | 23 ++++++++++------------- >> 1 file changed, 10 insertions(+), 13 deletions(-) > > Reviewed-by: Thiago Jung Bauermann > Matthieu