This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Move register info "augmentation" from gdb-remote into ABI
ClosedPublic

Authored by labath on Dec 2 2019, 7:57 AM.

Details

Summary

Previously the ABI plugin exposed some "register infos" and the
gdb-remote code used those to fill in the missing bits. Now, the
"filling in" code is in the ABI plugin itself, and the gdb-remote code
just invokes that.

The motivation for this is two-fold:
a) the "augmentation" logic is useful outside of process gdb-remote. For

instance, it would allow us to avoid repeating the register number
definitions in minidump code.

b) It gives more implementation freedom to the ABI classes. Now that

these "register infos" are essentially implementation details, classes
can use other methods to obtain dwarf/eh_frame register numbers -- for
instance they can consult llvm MC layer.

Since the augmentation code was not currently tested anywhere, I took
the opportunity to create a simple test for it.

Diff Detail

Event Timeline

labath created this revision.Dec 2 2019, 7:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2019, 7:57 AM
Herald added a subscriber: aprantl. · View Herald Transcript
clayborg accepted this revision.Dec 2 2019, 8:18 AM

lgtm

This revision is now accepted and ready to land.Dec 2 2019, 8:18 AM
jasonmolenda accepted this revision.Dec 2 2019, 3:29 PM

Good change, lgtm.

This revision was automatically updated to reflect the committed changes.