Re: [PATCH 1/2][PR GDB/32956] gdb: implement linux namespace support for fileio_stat

Tom Tromey
2025-06-11T13:29:56Z

>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:

Andrew> OK, so I dug into the history, and it would appear that (a) it was just
Andrew> a mistake, and (b) it was all my fault :-/

A classic programming story, I can't tell you how many times I've been
there.

Andrew> Most of this can easily be fixed, but the remote protocol part we're
Andrew> unfortunately stuck with. Though I wonder if we can "fix" this by just
Andrew> have a 'stat' and 'lstat' remote protocol packet, change 'stat' to do an
Andrew> actual 'stat', then on the GDB side we'll change the internal target API
Andrew> to be called 'lstat'. This would effectively orphan the remote 'stat'
Andrew> packet, as nobody would use it, but that's OK I think, and only minimal
Andrew> overhead. I'll take a look at rolling something like this together.

Wouldn't this negatively affect any existing remotes that implement stat-as-lstat?
(I don't know if any of these actually exist.)

It might be better to just document it.

Tom