Incompatible implementat ion of 'x' packet in GDB vs LLDB

"Robert O'Callahan" <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAOp6jLYD0g-GUsx7jhO3g8H_4pHkB6dkh51cbyDT-5yMfQwu+A@mail.gmail.com>
GDB (client) 16.1 started sending the gdbserver 'x' packet. It follows the
documentation [1] and expects a leading 'b' in the response [2].
Unfortunately LLDB has supported this packet for quite a long time [3] and
does not expect a leading 'b' in the response. We added support for this
packet to rr last year and followed LLDB's format because it was the only
user of the packet at that time. So GDB 16.1 doesn't work with rr. [4]

I realize that compatibility between GDB and LLDB flavoured gdbserver
protocols is not a priority for either team, but until now it has actually
worked in practice --- rr hasn't needed a client mode switch. We can add
one, but it will be unfortunate if GDB 16.1 and later is incompatible for
anyone who's installed the latest rr since May 2024.

Could you make a GDB 16.1 point release that removes the 'b'? AFAIK it
serves no purpose.

Thanks,
Robert O'Callahan

[1]
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Packets.html#Packets
[2] https://github.com/bminor/binutils-gdb/blob/master/gdb/remote.c#L9739
[3] https://lldb.llvm.org/resources/lldbgdbremote.html#x-binary-memory-read
[4] https://github.com/rr-debugger/rr/pull/3902
-- 
Su ot deraeppa sah dna Rehtaf eht htiw saw hcihw, efil lanrete eht uoy ot
mialcorp ew dna, ti ot yfitset dna ti nees evah ew; deraeppa efil eht. Efil
fo Drow eht gninrecnoc mialcorp ew siht - dehcuot evah sdnah ruo dna ta
dekool evah ew hcihw, seye ruo htiw nees evah ew hcihw, draeh evah ew
hcihw, gninnigeb eht morf saw hcihw taht.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.