From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IM+RBfsT62rZhxgAWB0awg (envelope-from ) for ; Wed, 04 Nov 2026 06:16:11 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=Rq4d8UMM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 02A9E1E09A; Wed, 04 Nov 2026 06:16:11 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,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 DF6F81E052 for ; Wed, 04 Nov 2026 06:16:09 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B2D104BA79A6 for ; Wed, 4 Nov 2026 11:16:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2D104BA79A6 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=Rq4d8UMM Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 9735C4BA23D5 for ; Wed, 4 Nov 2026 11:15:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9735C4BA23D5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9735C4BA23D5 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=148.163.156.1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793790944; cv=none; b=j2VjY0oboJBJ08Hu82UtWlyIcY8pbqJVvh40q55w8xZriW6rnoF4NlDpVa7kQ8MmDCsyQC2bNFBNprlJr/bT4NjiNyHJX9CxD1jwUL1CEs9dv63IUA8kS4rxpQe6cfkuZvt0l+ewlQUaXhyIw/vK5nc6U+qilWQaBGGQNjwcgHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793790944; c=relaxed/simple; bh=mknni3q+Y+ABv4OdAjCyEOJWr2xaqfFkhQ8kAKbv3ts=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=M8+n+lFFNOV1bPCv5le5Xy9CTKfyIKeM8w4sNi9Sl3GbS+dSTLlYRH3pIT6INSQKYaGv2kIDYin5ez5/SkS9pNMns4D3m5Jj295b9JdUrUB27XOXVkT1BSNwyJbGQOszkGrWZBUPU8W4ciZVkae94qX4BZoHcSo/scLGJhZLlko= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=Rq4d8UMM DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9735C4BA23D5 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A4BEHal2966661; Wed, 4 Nov 2026 11:15:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=pp1; bh=ypOdncrQOjCQhkI644r6pMI9ElOKW7xVOhovlOa2y hA=; b=Rq4d8UMM4nMh+SDZEboRa0BIYswCvKuAiFQYhH9fnO+9etQ74XwGLVMik gevV6qe6pXbTQ2edsecQ1jnfhahV1jVSIKjMNIg3zUHcFGoRdTOdkaIQrEaYj3ML iWK2qa2rx/Ou4+ZRGXas4GgEyPo9BYYok5cSpMXj0xiSS7EsuKRj6lPUY7vaUV17 dWYiyN93rlZT3vOxtR28uvVQ9JyR1A5KaFMGws88dYnn9/Rv+dAzV921nnkED/D4 cP/K6QYkDgQK7ALBVcgZpGdTK8ebeqkzQB5/6Wx+pY3abArTVbjY4Eowy3dl7TlR kKI66Jfm/IH0BI6ccsUHDWFqASCGQ== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hn80sude3-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 04 Nov 2026 11:15:37 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6A4B5TOf4027001; Wed, 4 Nov 2026 11:15:36 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4hqbqke19n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Nov 2026 11:15:36 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6A4BFTc046989696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Nov 2026 11:15:29 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1FF3D2004E; Wed, 4 Nov 2026 11:15:29 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 270F520040; Wed, 4 Nov 2026 11:15:28 +0000 (GMT) Received: from kubota.pok.stglabs.ibm.com (unknown [9.114.39.181]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 4 Nov 2026 11:15:28 +0000 (GMT) From: Abhay Kandpal To: gdb-patches@sourceware.org Cc: aburgess@redhat.com, Ulrich.Weigand@de.ibm.com, eliz@gnu.org, cel@linux.ibm.com, abhay.k@ibm.com, Abhay Kandpal Subject: [PATCH v5 0/2] Widen the stat fields in the remote protocol Date: Wed, 4 Nov 2026 06:15:19 -0500 Message-ID: <20261104111521.3042934-1-abhay@linux.ibm.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ZxtmdykJTIgcTKq7e9tKF7NhfVY5jBj7 X-Proofpoint-ORIG-GUID: ZxtmdykJTIgcTKq7e9tKF7NhfVY5jBj7 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA0MDA0NCBTYWx0ZWRfX4n52EcnjqvtF 59I87Rau+LYGvx5tjh8+Ze8f7hwYbwMcBEVe6TiwY5L1KG0a8UwjM5P3Bb70AjTv/I+2yp5WCel 5oUHjOnQ1JPJOiwgXl/XfG7e3v3qsmkL2jt6l8CFlXULC42MeEHrg3ODqTXEw1wHtZArK37L7Wl x5WEBhBkEmS4DzT0CbciLe+2NquN4vXvhuNtFcplqpEcQQgE28MCk0hHk6iFv5FGHWBq9uQoCSu sllYxn/mFT4i7vLeeSGKQHOt5KMf8urAADlCouvBoKH9tfJVVXBqvH3/coxoYBjH2/2s0q+il90 qcXKHUj7RUl5R1a5UIgCpUar7GKooi2+e0XdTD8M41n82XIi5YAUJGLlJz0hjQMLrZU3FmcxSSy yg3qevqdqSZypXjnQvTYMwXBVIJEx/FB9aP95DZq8rxPEHu5z4x2n2hiIrKqZbjoJmSjF37LMQJ B6aKG39mYnMr+VMUQ8Q== X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA0MDA0NCBTYWx0ZWRfX6ZcwfJSeHXU4 LgZ5mi2mAxcBGmXekupqR4CnST6KsEYRG8c8OmRKHuH26fVvHyE1I/fLJciJofht87wEr/yxoX6 a5/SAguU/GI+Dhb39l1CUk1/w6swQIg= X-Authority-Analysis: v=2.4 cv=FIqOVOos c=1 sm=1 tr=0 ts=6aeb13d9 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=uAbxVGIbfxUO_5tXvNgY:22 a=-xRHVKimh1AT1qpfucgA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-04_03,2026-11-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610300000 definitions=main-2611040044 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 The struct fio_stat used by the remote protocol declares st_dev, st_ino, st_nlink, st_rdev and the three timestamps as 4 bytes, so those values are truncated on a 64-bit host. On a large xfs filesystem this makes gdb.server/fileio-packets.exp fail. PR 34567. 1/2 vFile packets (GDB asking gdbserver): a new 'stat64' qSupported feature selects a wide struct. 2/2 F-packet file-i/o calls (the target asking GDB): new Fstat64 and Ffstat64 calls write the wide struct. An older GDB replies ENOSYS, so a target can fall back to Fstat. Changes in v5: 1/2: - host_to_fileio_uint takes a ULONGEST, so the value is neither truncated nor sign-extended before the range check (Ulrich, Andrew). The callers' casts are updated to match. - Use the protocol's integral types in the struct stat64 documentation, with the standard size paragraph (Andrew). - Commit message: drop the "cannot use qSupported" wording. 2/2: - Correct the return-value comment on remote_fileio_write_stat. - Commit message: drop the "cannot use qSupported" wording. - Add Andrew's Approved-By. Abhay Kandpal (2): gdbserver: widen the stat fields returned by the vFile packets gdb: add stat64 and fstat64 to the F-packet file-i/o protocol gdb/NEWS | 23 +++++ gdb/doc/gdb.texinfo | 98 ++++++++++++++++++++++ gdb/remote-fileio.c | 97 ++++++++++++++++++--- gdb/remote-fileio.h | 5 ++ gdb/remote.c | 35 ++++++-- gdb/testsuite/gdb.server/fileio-packets.py | 59 ++++++++----- gdbserver/hostio.cc | 77 +++++++++-------- gdbserver/hostio.h | 1 + gdbserver/server.cc | 5 +- gdbserver/server.h | 5 ++ gdbsupport/fileio.cc | 44 ++++++++-- gdbsupport/fileio.h | 50 +++++++++-- 12 files changed, 407 insertions(+), 92 deletions(-) -- 2.51.1