From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EKOOCQxxZ2rURDAAWB0awg (envelope-from ) for ; Mon, 27 Jul 2026 10:54:04 -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=ZSRUuDOk; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=ZSRUuDOk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 13C261E099; Mon, 27 Jul 2026 10:54:04 -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 [38.145.34.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 7564C1E099 for ; Mon, 27 Jul 2026 10:54:03 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7C93B4BB1C1C for ; Mon, 27 Jul 2026 14:54:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C93B4BB1C1C 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=ZSRUuDOk; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=ZSRUuDOk Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11012061.outbound.protection.outlook.com [52.101.66.61]) by sourceware.org (Postfix) with ESMTPS id 13CF24BA798D for ; Mon, 27 Jul 2026 14:53:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 13CF24BA798D 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 13CF24BA798D Authentication-Results: sourceware.org; arc=pass smtp.remote-ip=52.101.66.61 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1785164016; cv=pass; b=k5ZpGg53u3YlcbA6EOyys61LQrPcKMGHVX9j3PRnc60wCfS9hX5wK/B8DxlQG8BL3ga3xWnZkE0tCNFRVkRAARykbiS+DVz43oWtc93w8TG6sfhvOK0GqYykKkc//Hu1mqRPHXZOBRS8XybCD/zCkV2SQ6u6pn7ckeJmR0UxSlY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1785164016; c=relaxed/simple; bh=MDEg92aGrqliH+yg/O98ZDNzJuH41ZrhR9+3598pZLQ=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=FObRrapLLwJGwaNygh0k+Szl6ur8jbW7VVQyOuHCbawsY/y5Drfe5hJtYHljnDhEf/O2c4JnY2uN12lyp5aNITnCk81zW1OxDcj0JWQn8Na0MGUyDZT1dE0Lw6Ru9pKeBj5Q+nnYSzo5BrmmvWM0V5BUE8tMvccJrFur57/Cw3A= 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=ZSRUuDOk; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=ZSRUuDOk DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13CF24BA798D ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=jreQbX7aYlFuoidccXfihGwRWZE0v6KHYWPMiMZIwZ8yUxkO8/R234gcISCa3C5/UurKE3HT3IdrF0jdkKRHu8E+AMMwrSPOjq08+K7xjOEKZuMc5uw61V3Cwi+S0JhRss3WGUzGl8VRI6culsCkhw+/CFtTLpU257K53KtKpg+oBzAFQ9eALOEwoPku/hC07nzZEQ9QHYT+UC8qQGHvt2av9ZXNaXHc584nEM3m3KVQj3dqn/iOgd3NI9Ss72QjB+xP9uj/h4XHkl+b78epqUB7ILd7dALR6qLHVR4dqFXWx9ttpIAsz6nTqakcGDvN38sZmQ50/ZpYDPVoAOTTEg== 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=Qma6pUMxW5snfFYzZQcmcDHRd5zPUU6u7D8ElORuPTk=; b=aRN5mzFjvaQe5aQ0F4unj69zORgBu5YnV/DoARmATfMa8lwKCTupjIiQbdGHW/InDgc0oAJUuUgREs+X+JZzs8jjwI8DhqOywdmKAdbZkl1iZ7xl4vdqRxS20XkP/iYvYOcMK/FjP/qkHPHsmfiUep6o0w6KgOL8fx/TYuDStXbBhmsDwj/pAOwI+qD8lBVDF+5hPVGPRRezRsbDa/JVvIpL02rlTD28UWQZUDI1lZgOH2NIys2J47GtmZw8asKxUlJQlDlHm0NoDezx7WKG232aC4Rhfr60lOX1oGRMD1XYsj8iF4gsEXryPWcGekGL6TLK4Ed/rjyfL8PErMDUsA== 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=Qma6pUMxW5snfFYzZQcmcDHRd5zPUU6u7D8ElORuPTk=; b=ZSRUuDOk3ySxqR1m4xYyEHt4KALNo/c9xMU7G/AmhDsK1mGKohyJlnPQJvRl70+3R8HpxvxMbNnglpX17UhlE5R/ZXtcoYj6GHTxp0exgVEil+7AlYBewphDnPjGONVcEOvQItPwlY2if2gGm8NOQNU99OKn+JOWwa7g8F4nqmw= Received: from AS4P189CA0016.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5db::8) by DU4PR08MB11291.eurprd08.prod.outlook.com (2603:10a6:10:61d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.13; Mon, 27 Jul 2026 14:53:32 +0000 Received: from AM4PEPF00027A6C.eurprd04.prod.outlook.com (2603:10a6:20b:5db:cafe::69) by AS4P189CA0016.outlook.office365.com (2603:10a6:20b:5db::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.245.13 via Frontend Transport; Mon, 27 Jul 2026 14:53:32 +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 AM4PEPF00027A6C.mail.protection.outlook.com (10.167.16.90) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Mon, 27 Jul 2026 14:53:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NtnXkZ/CCksXNhMwOJAwm8pKG3ZX72KoMSB1CdONKpNkLrC+Py9ZYsL88uQ9zXCaukKqC8AUrzClNpzGxDrHqGY+xGUMxer9Rmw6NbiQ3oV3G7Bp1qk/fBw5zWdogxsAc9YrynDf+lK8m/IuL6UFIXy9Udu588EKjenaymSLzvytH012E/gWWdy6lEtlvH6+Jx0p/Pqs8X3SFfkdJaZ06zTntBKYI2+4h5o39bgRK3JCACmLJpdN9Ml8j2AdO0lnGnIEX7FA8jlZhll6C1bQWZ5/OhaLpuywmlE+rLCtH/Cz3g2mZJjC1wYphV2+IijlGoXwAZg5UhTOg3VrvR8wCQ== 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=Qma6pUMxW5snfFYzZQcmcDHRd5zPUU6u7D8ElORuPTk=; b=QBFXAbQPgdxDqfM1Kretxu+HwHAf/nZJeUqbr6iUc9ZMTEBlBFPkbBl2g0CaJaUToJbRQxopL1rNrHWM+mLqMmZ4+ngzGE8BnOJO2N0jyy0Xs3rlDVX/eULEIjQBZrIkzg7Nu7soByPTSVovlOXNnKSntHIdBSdcZ/eTbax1heW+nmIL4hXg/I2+05vvuw5IT4Zeaax7CCZVGNEA6cltCz/atYx9/XwZA24unEnX4jJNrT4FxR7sNGle4BJLuAWPZFLg6InrE7ksf+liBf1YQN8KzUxfEw0QozadaXhRMujoCz1qsi+F16IlOh+NHtdiOBe4PEz9flJKrrZcCiUVqQ== 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=Qma6pUMxW5snfFYzZQcmcDHRd5zPUU6u7D8ElORuPTk=; b=ZSRUuDOk3ySxqR1m4xYyEHt4KALNo/c9xMU7G/AmhDsK1mGKohyJlnPQJvRl70+3R8HpxvxMbNnglpX17UhlE5R/ZXtcoYj6GHTxp0exgVEil+7AlYBewphDnPjGONVcEOvQItPwlY2if2gGm8NOQNU99OKn+JOWwa7g8F4nqmw= 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 AM0PR08MB5411.eurprd08.prod.outlook.com (2603:10a6:208:181::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.245.13; Mon, 27 Jul 2026 14:52:30 +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.0245.012; Mon, 27 Jul 2026 14:52:29 +0000 Message-ID: <98d3b55e-4632-414c-8014-c4962c02984a@arm.com> Date: Mon, 27 Jul 2026 15:52:28 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 03/10] target_fileio_read_stralloc: add an optional length parameter 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-4-matthieu.longo@arm.com> <87jyr41xqc.fsf@linaro.org> <87cxwdf6de.fsf@linaro.org> Content-Language: en-US From: Matthieu Longo In-Reply-To: <87cxwdf6de.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO0P123CA0014.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:354::18) To AS8PR08MB8659.eurprd08.prod.outlook.com (2603:10a6:20b:563::10) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB8659:EE_|AM0PR08MB5411:EE_|AM4PEPF00027A6C:EE_|DU4PR08MB11291:EE_ X-MS-Office365-Filtering-Correlation-Id: eb57de5d-d0bc-4813-8117-08deebeed3c4 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|366016|1800799024|23010399003|376014|10067099003|11063799006|56012099006|4143699003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info-Original: ezNClurSa12TIu+nKw+Q2nm10v7v59TkPJIEcDR22/ziARUBVR5EErCNJb1Im8C9kqYXBbB5gzWPhOYWUjKolARp2MRN6idY6+GHrQHjb9GEhTwBG+7Q6DpVUnUV+vAG0+OzNHfxRaNYBOszH3jQdjGiCyiY9P2RagiPRArK9L4LEoLVGpp9mrkyt/Q0rYWSrkjPf2y8RFec0j+sUG611GNDwgxmxfic+fnwXx5CYD/VpLw9aRpXDPKLO7gKvqAteuqHEiwrip5joI1k6YxUhdQdCoKiN695uFa0QJo9D3b1EWTUF2jsA3r/VgEwpH+gzKpBvNzuEdri5Qc6mxK8S5V/QtQBYZJKOYp037S75HWROST7HOb6sAIJvoQ12k+DMVAXFQNtdmIdfNQcmXg6aWcHk8rOtMDQZs8xou9LctQ6g5SXB5QKEFUPw+++Lydf4vwUVx00yd3dSOCM/L+Yu3OmyvcwrjRKmQrGPCL9uPQuDQ69YxusqmSEVVPsE+Cf5UXQVIxUashu/BwSEzGEb/dkVvCNNBfsFYlxphq7CAMYUcrOAGVblMzPBNM8sngRrgKwiJojiIglDZWg3nHJi7APBYR4bAINwEbv/XKqyY5DRGaxnJMEMx/C5eSWlxrX8wEWnJY4laACa1OYj0SngcvPPN99ds5ZPQdFhiuMLP8= 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)(366016)(1800799024)(23010399003)(376014)(10067099003)(11063799006)(56012099006)(4143699003)(18002099003)(22082099003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: Rj8+UpXD1xCfOFujLf1Ga7SNGSF9AmnpdL1Mih4IK34UDFzT6jE4AAKM8pPZUxxZQkq5AWzmuZSJuoiEX+vtor7N33+di8uyU2dpOtfFrgBw3tw3ON0d5kooK3b6OJsGNZI1mzPPHB8kLfoRXzimyPHMml7+HsJemd9NMIzq2uaGf1ZrBDGdhZlSdu+mXetmdN+Ih6N0y5VhNBWbN+WOCd+BPoGTpoGG/UbOkQHRalig962FpYjDxIA6oDO0wWUtvEWPX3DhxXttrQz6KkpQg561Cpp3Jj827Zn9igM3BVDTpSXWnj9C6Q1impTPTwrvkPtTJKN1XfcicPBA42nVfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5411 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00027A6C.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e6523a9a-e16b-471a-eeb8-08deebeeae86 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|35042699022|82310400026|1800799024|23010399003|36860700016|14060799003|18002099003|22082099003|4143699003|10067099003|56012099006|11063799006; X-Microsoft-Antispam-Message-Info: gk6L2NPAMZLEXtrAoya4mVu+UKM9HyEhT1eaweo0XB5xMCoo1SQwSXjBYSn7w1P2d+0KUCa4IoRyIZC5o2Eal1vadTj3h1FlS59zQhWgX2YO9IT/AIwXfkQ3aVx6EYvNYDNLLlGq80QEGAf0NcZ0CL/rAFvv74Ifdr3Ytv0/RRYeOJw1bHT1MZedPYzT0Oki29L1Rvx0Iz+Lg+UCBypF/uckhgthaK/TCD1A9YETFg8nQw/iySutrGWgALt//szQhsPfNON2zjOJU4eprPhNQGC8YmMbtQ//3WIe3Dz7fTL5BlntJytX5Wmmt+VXy94eVYkGfTDgcCzRCEOVGuWDayyQwy8tDDh97hboTc2H51dsgbiq/+eG6WZ/4+SSWqCxf7grfQxcna1ABA2BHioVQkmN4vP1RvW08AaF3gzHiblZjl+pLl4KnxQuWP0g8a8G0N1iG8xdPDVqqfTkDMzAQXHZKPkgqPddIl/iIhFQP5Gy4YEh/r61YHEI+xud1ca/3ZbqZWhPcVoUJILoyPOlfZFtxD+lxuw03BOpX4t9wlog6xcylP7snsq/d0melifS9k5LXIeCtiMZfnsy9PJCTbjgfC7LBeN62us+C3ZtX2uCgXv+JNm98MUO+jtYzLq36nE92DwzuOOXdMKvp7P0UCz2nrHcnQ9w/k1mk+RdyZGRuOuw3YAkxFLpEzXioBI0ThbJ/V8+FEpHwKz28gJS6w== 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)(376014)(35042699022)(82310400026)(1800799024)(23010399003)(36860700016)(14060799003)(18002099003)(22082099003)(4143699003)(10067099003)(56012099006)(11063799006); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SSPOFFSldkKS1b2oGKzVyc+e5gCEJfqX4PwXcGXJ9ssULeq6+2HC80YBeEAeOtXgcRI2OB4XjNw5+1LDHHxjDj3tfJzwni0vYhOx9IsVoSGaN//XvyDnBw2z2n77GWsVqzBIEosK71M4xj0a1zTx4iBM5HrWrGlKYXsHB141Sj34e9+XvsuXQY+ThT0Lynn3dMDNnT/QfhpDgw7AdSHug18DQnRLcrPAZC3/Qi00Fok6biVpgJudeo0/DLyUlhWSdjwjYYHk73VtE4bWnke2XhwZjwHMdJ6uALywCK/UUw53KbCjRKAz8j3bXQvfjaE1ZHLC0g0bfpsxJ0At1TdhOzCGGJyBE+Yn6jv53/5zmprEHZyFZMPc1M3FwezWfhNBFH1owhY961L8piOr9pj4Qh6vLs/9CQ/likrPtEz2+IBzsRW5v8Ce3t5ys7Swzn/G X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2026 14:53:31.9858 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb57de5d-d0bc-4813-8117-08deebeed3c4 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: AM4PEPF00027A6C.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR08MB11291 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 24/07/2026 03:50, Thiago Jung Bauermann wrote: > Matthieu Longo writes: > >> On 09/07/2026 07:30, Thiago Jung Bauermann wrote: >>> Matthieu Longo writes: >>> >>>> diff --git a/gdb/target.h b/gdb/target.h >>>> index 22653138491..4215553033c 100644 >>>> --- a/gdb/target.h >>>> +++ b/gdb/target.h >>>> @@ -2336,7 +2336,7 @@ extern LONGEST target_fileio_read_alloc (struct inferior *inf, >>>> are returned as allocated but empty strings. A warning is issued >>>> if the result contains any embedded NUL bytes. */ >>>> extern gdb::unique_xmalloc_ptr target_fileio_read_stralloc >>>> - (struct inferior *inf, const char *filename); >>>> + (struct inferior *inf, const char *filename, size_t *len = nullptr); >>> >>> It's worth updating the documentation comment to mention the new parameter. >> >> See the updated diff in gdb/target.h >> >> diff --git a/gdb/target.h b/gdb/target.h >> index 22653138491..0df5a654f75 100644 >> --- a/gdb/target.h >> +++ b/gdb/target.h >> @@ -2328,15 +2328,19 @@ extern LONGEST target_fileio_read_alloc (struct inferior *inf, >> const char *filename, >> gdb_byte **buf_p); >> >> -/* Read target file FILENAME, in the filesystem as seen by INF. If >> - INF is NULL, use the filesystem seen by the debugger (GDB or, for >> - remote targets, the remote stub). The result is NUL-terminated and >> - returned as a string, allocated using xmalloc. If an error occurs >> - or the transfer is unsupported, NULL is returned. Empty objects >> - are returned as allocated but empty strings. A warning is issued >> - if the result contains any embedded NUL bytes. */ >> +/* Read the content of the target file FILENAME from the filesystem as >> + seen by INF. If INF is NULL, use the filesystem seen by the debugger >> + (GDB or, for remote targets, the remote stub). >> + >> + If LEN is not NULL, store the number of bytes read, excluding the >> + terminating NUL byte. >> + >> + The returned buffer is NUL-terminated and allocated using xmalloc. >> + On error, or if the transfer is unsupported, return NULL. Empty >> + files are returned as allocated but empty strings. A warning is >> + issued if the file content contains embedded NUL bytes. */ >> extern gdb::unique_xmalloc_ptr target_fileio_read_stralloc >> - (struct inferior *inf, const char *filename); >> + (struct inferior *inf, const char *filename, size_t *len = nullptr); >> >> /* Invalidate the target associated with open handles that were open >> on target TARG, since we're about to close (and maybe destroy) the > > Looks great, thanks! > > My only suggestion is to take the opportunity to do s/NULL/nullptr/ in > the comment. > I don't remember having seen usages of nullptr inside the documentation comments. Have you a previous example for this ? Matthieu