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

Pavel Labath via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 28/01/2025 09:26, Pavel Labath via Gdb wrote:
> Hello everyone, an lldb dev here :)
> 
> I'm sorry for the trouble our implementation of 'x' has caused. I have 
> to admit I was surprised to find that the packet was not in the gdb 
> documentation already. It's been implemented in lldb for as long as I 
> can remember (~10 years), and the new packets we're adding nowadays have 
> much longer names, so I had assumed that it was always a part of the gdb 
> spec.
> 
> For what it's worth, I think your definition of the packet makes much 
> more sense. LLDB's definition is indeed ambiguous (and I didn't realize 
> how ambiguous until now) -- it cannot distinguish between a (truncated?) 
> memory read and an error. This behavior is not completely easy to 
> trigger because lldb will by default round the memory reads to 512-byte 
> boundaries (so truncation is unlikely), but with the right commands, I 
> was able to get it to treat valid memory as an error.
> 
> For this reason, I am going to propose to migrate lldb to the gdb 
> ("official") definition of the packet. Since we have users which need 
> (fairly long) windows of compatibility with old server, this is going to 
> require method to detect the implementation in use, so I'd like to reuse 
> the same mechanism that's going to be used in gdb (both the zero length 
> probe and the qSupported method seem fine to me).
> 
> regards,
> Pavel

And this 
<https://discourse.llvm.org/t/rfc-fixing-incompatibilties-of-the-x-packet-w-r-t-gdb/84288/1> 
is the lldb thread for that.

pl
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.