From: Abhay Kandpal <abhay@linux.ibm.com>
To: Andrew Burgess <aburgess@redhat.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Carl Love <cel@linux.ibm.com>, Abhay Kandpal <abhay.k@ibm.com>
Subject: Re: remote fileio: st_ino truncated to 32 bits in vFile:stat/lstat
Date: Wed, 2 Sep 2026 20:01:30 +0530 [thread overview]
Message-ID: <4926e2b6-bb90-4d80-8d43-4d64271638f4@linux.ibm.com> (raw)
In-Reply-To: <b713a450-3535-40a7-98a2-f6764ad94b50@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]
Hi Andrew,
I've implemented the two-struct approach with qSupported negotiation as you described,
and it works - gdb.server/fileio-packets.exp now passes on the xfs filesystem where it was failing,
and there are no unexpected failures in the full testsuite on two machines.
One thing before I post the patch. I've only changed the vFile packets, not the F-packet path.
The two uses of fio_stat look quite different once you follow them through.
vFile sends the struct as packet data between GDB and gdbserver
(hostio_reply_with_data and fileio_process_fstat_and_lstat_reply), so qSupported negotiation works there.
The F-packet path writes the struct directly into inferior memory (remote_fileio_func_stat, target_write_memory),
where the inferior reads it as the 64-byte layout documented in the manual under "struct stat".
I don't see a way to change that layout without breaking existing targets,
and the manual describes st_ino there as having "no valid meaning for the target,
transmitted unchanged", and says members "could eventually get truncated on the target".
So my reading is that the F-packet layout should stay as it is.
I will share the patch soon.
Thanks
Abhay
On 27/08/26 12:13, Abhay Kandpal wrote:
> th directions.
[-- Attachment #2: Type: text/html, Size: 1968 bytes --]
prev parent reply other threads:[~2026-09-02 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 18:04 Abhay Kandpal
2026-08-26 17:21 ` Andrew Burgess
2026-08-27 6:43 ` Abhay Kandpal
2026-09-02 14:31 ` Abhay Kandpal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4926e2b6-bb90-4d80-8d43-4d64271638f4@linux.ibm.com \
--to=abhay@linux.ibm.com \
--cc=abhay.k@ibm.com \
--cc=aburgess@redhat.com \
--cc=cel@linux.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox