This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Do not clear the value of st_dev in File I/O's stat()


> The idea was that st_dev values on one system don't make sense on
> another system.  Also, st_dev values for files reflect the underlying
> partition on the inferior system, which doesn't mean anything to the GDB
> host system.
>
> I don't know how important backward compat is here, but there may
> be code out there which still relies on the simple file vs. console
> st_dev from stat().  Version check?
>
> Other than that, if you think that this is an outdated approach, just
> make sure to change the docs as well.

I think the approach is still valid, otherwise it would be like if the
target program should know the host. Which reminds me that with
remote_fileio_fstat(), I have the case where my host st_dev has 64 bits,
which doesn't fit into fileio's 32-bit fst_dev.

I think I should resubmit this patch along with my other patch allowing
to "open non regular files" so that I add common device ids (link, fifo,
etc.) to the list of returned fst_dev, and I modify
remote_fileio_fstat() so that it applies the same values to fst_dev.

-- 
Julio Guerra
Co-founder & CTO of Farjump
Mobile: +33 618 644 164
LinkedIn: https://linkedin.com/in/guerrajulio
Slack: farjump.slack.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]