This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [gdb-remote] Use hexadecimal numbers in vFile packets for GDB compliance
ClosedPublic

Authored by mgorny on Aug 4 2021, 9:25 AM.

Details

Summary

Use hexadecimal numbers rather than decimal in various vFile packets
in order to fix compatibility with gdbserver. This also changes the few
custom LLDB packets -- while technically they do not have to be changed,
it is easier to use the same syntax consistently across LLDB.

Diff Detail

Event Timeline

mgorny created this revision.Aug 4 2021, 9:25 AM
mgorny requested review of this revision.Aug 4 2021, 9:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2021, 9:25 AM
mgorny retitled this revision from [lldb] [gdb-remote] Use hexadecimal numbers in vFile packats for GDB compliance to [lldb] [gdb-remote] Use hexadecimal numbers in vFile packets for GDB compliance.Aug 4 2021, 9:40 AM
emaste added a comment.Aug 4 2021, 9:48 AM

LGTM, although in FreeBSD we don't have any backwards- or cross-compatibility issues to worry about.

jasonmolenda accepted this revision.Aug 4 2021, 12:07 PM

LGTM, thanks for updating the docs too. I have a separate platform implementation ("lldb-platform") that I wrote but it's not in wide use outside the apple lldb team, I'm not going to worry about versioning the protocol or falling back to the old buggy behavior. I'll update my impl for https://reviews.llvm.org/D106985 and https://reviews.llvm.org/D106984 once these are landed.

This revision is now accepted and ready to land.Aug 4 2021, 12:07 PM
mgorny updated this revision to Diff 364781.Aug 6 2021, 6:43 AM

Add tests for server and client. Fix error handling.

mgorny updated this revision to Diff 364873.Aug 6 2021, 12:58 PM

Fix vFile:pread to actually return the underlying error in client.

This revision was landed with ongoing or failed builds.Aug 9 2021, 3:35 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 3:35 AM

This change is causing failures on the Windows lldb bot:

https://lab.llvm.org/buildbot/#/builders/83/builds/9098

I've already attempted to fix this, I'll try more. It doesn't help that buildbot webUI is so shoddy it takes me around 10 minutes to get any results :-(.

Ok, I've reverted my previous attempts and just marked the tests for skipping on Windows. Hopefully this'll work.