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]> |
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