Page MenuHomePhabricator

[lldb] [gdb-remote] Try using <architecture/> for remote arch unconditionally
ClosedPublic

Authored by mgorny on Sep 4 2021, 6:23 AM.

Details

Summary

Try determining the process architecture from <architecture/> tag
unconditionally, rather than for very specific cases. Generic gdbserver
implementations do not support LLDB-specific packets used to determine
the process architecture, therefore this fallback is necessary to
support architecture-specific behavior on these targets. Rather than
maintaining a mapping of all known architectures, just try mapping
the GDB values into triplets, as that is going to work most of the time.

This change is confirmed to fix LLDB against gdbserver when debugging
i386 and aarch64 executables.

Diff Detail

Event Timeline

mgorny created this revision.Sep 4 2021, 6:23 AM
mgorny requested review of this revision.Sep 4 2021, 6:23 AM
mgorny updated this revision to Diff 370756.Sep 4 2021, 1:02 PM

Add initial tests for aarch64 regs (roughly confirming that it gets the target.xml correctly).

mgorny updated this revision to Diff 370764.Sep 4 2021, 2:40 PM

Add basic i386 tests.

mgorny updated this revision to Diff 371136.Sep 7 2021, 11:40 AM

Require respective targets for tests, and tests for the generic AArch64 aliases that already work.

labath accepted this revision.Sep 16 2021, 12:28 AM

Sounds like a good idea.

This revision is now accepted and ready to land.Sep 16 2021, 12:28 AM
This revision was landed with ongoing or failed builds.Sep 16 2021, 1:23 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 16 2021, 1:23 AM