[lldb] Move register info "augmentation" from gdb-remote into ABI
authorPavel Labath <pavel@labath.sk>
Tue, 3 Dec 2019 10:39:20 +0000 (11:39 +0100)
committerPavel Labath <pavel@labath.sk>
Tue, 3 Dec 2019 10:39:20 +0000 (11:39 +0100)
commit2b8db387f2a616f39a077ede18c6366f2ea9f203
treebc031616f89a752df513eeb04662dbf0ab64d992
parent09667bc1920463107684a566c3f2c3cef9b156e7
[lldb] Move register info "augmentation" from gdb-remote into ABI

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.

Reviewers: jasonmolenda, clayborg, tatyana-krasnukha

Subscribers: aprantl, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70906
lldb/include/lldb/Target/ABI.h
lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py
lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/basic_eh_frame.yaml [new file with mode: 0644]
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Target/ABI.cpp