From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +Db9HUgQ42qLlwYAWB0awg (envelope-from ) for ; Thu, 29 Oct 2026 05:22:16 -0400 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=BvyHFT4X; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5E792378002; Thu, 29 Oct 2026 05:22:16 -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.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 5D8871E023 for ; Thu, 29 Oct 2026 05:22:15 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83EAE4BA2E39 for ; Thu, 29 Oct 2026 09:22:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83EAE4BA2E39 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=BvyHFT4X Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 8E1594BA540B for ; Thu, 29 Oct 2026 09:21:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8E1594BA540B 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 8E1594BA540B 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=1793265707; cv=none; b=WbnZbIYHTSZtOmhu1oEtMrlxT6BDuw+O0Qk9WBm4ASn9lA+RLihitrbxQ7tXaHBrcs5leeX+tw3MRHf+mMaPTlDnsLK20pSOKV8fpm6jzgW6SY+DqeOgUvBPA7Ta5yBSeO7jAIrQzovvfu+m+IDEViRkPmUIV40VZ9eeABgMZDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793265707; c=relaxed/simple; bh=z3P9i9udWHU3KFalzNBgsgv1BwhO/yO8SmfK7yUuznA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rXQlLSzAC8UinwdSq7jyDmLCqXLixJZ0yr6u5nGAM40CRUTe+6yp4J+0zZ7mLsHC9hOik0GhgxQWnmG5erGGcA50EAiYiaLqnNa+dQX7J6r9nH+THEnQuuZrYp+rZKA4k+bS9A6C30SR92NvQhhtEbvATDIkLTPKjJPvgBjp0a4= 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=BvyHFT4X DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E1594BA540B 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 69T9E87D2136607; Thu, 29 Oct 2026 09:21:40 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=5V6U0pHhRmtoOCkR6QYIWDbDgCOySaZpJKkVMSXQL wE=; b=BvyHFT4XK0NowxobtYBW5o+IyOJfgT4KDFUDn386T8xHCJRFtdxtU4rQu crbFg5fcRrfPtuQr4hCLGjEja9JXFU/OhChBWY5dvK/ZVdXfhgDGo5NO0FOmckld 2wupDIBc1B1Epfb8iigvEkyzfF84s4GtHwPpL1aoXZMJc3p3SCkHlrcfCkuMcABc SdQ5dYjHg/wNne8OmNYkRDtUs34n120gfF4IWnAm0wI0JmNFctruP+AtRzXxjWSa krPwrNoWniJd6TjcJSO4cDBlEd+se4X75xRDlWPGIylTNgoLo8yAqfXL3mrk1k/b 23BM52xcf0owoup2dIHnSAGTW3rcQ== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4hgmbt984n-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 29 Oct 2026 09:21:39 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 69T955UC2945485; Thu, 29 Oct 2026 09:21:38 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4hh8ghb356-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Oct 2026 09:21:38 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 69T9LWsP47710674 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Oct 2026 09:21:32 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E63D2004D; Thu, 29 Oct 2026 09:21:32 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5E6F520040; Thu, 29 Oct 2026 09:21:31 +0000 (GMT) Received: from kubota.pok.stglabs.ibm.com (unknown [9.114.39.181]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 29 Oct 2026 09:21:31 +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 v4 0/2] Widen the stat fields in the remote protocol Date: Thu, 29 Oct 2026 04:21:22 -0500 Message-ID: <20261029092124.233055-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-Spam-Details-Enc: AW1haW4tMjYxMDI5MDAzNSBTYWx0ZWRfXx6NpiYELg61Z 8Wyy4VlbOoX98HEaIrk+Z0nu2XDOZrvhn9J3fCLFSffPvN8iZwA90VHyvqYDshPgk5hkfT+cA+X x9Hvzz194LPwksCQTPS13nLl5nCwpxo2PFoVQFv3IlnImHsLfycD+I0sH7oBWYbXdg5ifvGcITg pN8M5MWOO/yfKaX4UTFXct8IdHlTcI4VHAsRjTodoENYlx9VOQPWdEnvqlMCKwKnOqKOHiFvcN7 cN6dW5bhKgXRBo2FUGpTCXkrWvuo6qDP6zljB7wun2IK12CGCDlB244xapXcfy8kcyX1t6YQkz1 W2rdzO43NV8esbYoRr6GD5Tmp7f2ZqZnlmmZ3W/rQzBB0o8eqGIqnph0Jefoi8lBFPHlX9yX61H oDgL2QkLuWg091o6WwMh54G2zR0HB8tYKCSrq+OA+3b5FqydYcSHjeY8bbEiKIKOOF2mAHrg2Tl mRHyLJJO6Wot93YA49Q== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDI5MDAzNSBTYWx0ZWRfX3cPfbux+3hix /GOmWFhv7wgYTvyzgCwmtQi9QfBu4Be8aMvGWpSroyl63ivh25c3mgQa3qIaBbcRXgQTN8lonAZ 5h6rUiK8uNmPacinq5SBFJTJvSzrm5w= X-Proofpoint-ORIG-GUID: SIAJbEQeA7VhPfp4n6fwXI4irGXo7JZK X-Proofpoint-GUID: SIAJbEQeA7VhPfp4n6fwXI4irGXo7JZK X-Authority-Analysis: v=2.4 cv=CeKdd7rl c=1 sm=1 tr=0 ts=6ae31023 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=660iZSQnnn4A: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-10-29_03,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610290035 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 v4: 1/2, addressing Ulrich's and Andrew's review: - Pack struct stat directly into the negotiated form, dropping the wide-to-narrow conversion and its helpers. - Reuse remote_fileio_to_host_ulong and host_to_fileio_ulong. - Factor the three vFile stat replies into hostio_send_stat_reply. - Reset the stat64 feature flag on each new connection. - Move the truncation warning into host_to_fileio_uint and host_to_fileio_time. These are shared with the F-packet path, so GDB's Fstat and Ffstat now warn on truncation too. - Style fixes, and commit message corrections: seven fields, not six, and no ChangeLog. 2/2: - Drop the ChangeLog. Whether F-packet support is wanted is still open; 2/2 can be dropped without affecting 1/2. Both patches are rebased on current master. 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 | 96 +++++++++++++++++++++ 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 | 32 +++++++ gdbsupport/fileio.h | 48 +++++++++-- 12 files changed, 398 insertions(+), 85 deletions(-) -- 2.51.1