llvm-project/lldb/unittests/Target
Pavel Labath 07355c1c08 [lldb] Delete register info definitions in the x86_64 ABI classes
Summary:
These definitions are used to "augment" information received from the remote
target with eh/debug frame and "generic" register numbers.

Besides being verbose, this information was also incomplete (new registers like
xmm16-31 were missing) and sometimes even downright wrong (ymm register
numbers).

Most of this information is available via llvm's MCRegisterInfo. This patch
creates a new class, MCBasedABI, which retrieves the eh and debug frame register
numbers this way. The tricky part here is that the llvm class uses all-caps
register names, whereas lldb register are lowercase, and sometimes called
slightly differently. Therefore this class introduces some hooks to allow a
subclass to customize the MC lookup. The subclass also needs to suply the
"generic" register numbers, as this is an lldb invention.

This patch ports the x86_64 ABI classes to use the new register info mechanism.
It also creates a new "ABIx86_64" class which can be used to house code common
to x86_64 both ABIs. Right now, this just consists of a single function, but
there are plenty of other things that could be moved here too.

Reviewers: JDevlieghere, jasonmolenda

Subscribers: mgorny, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D74244
2020-02-17 14:01:36 +01:00
..
Inputs
ABITest.cpp [lldb] Delete register info definitions in the x86_64 ABI classes 2020-02-17 14:01:36 +01:00
CMakeLists.txt [lldb] Delete register info definitions in the x86_64 ABI classes 2020-02-17 14:01:36 +01:00
ExecutionContextTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
MemoryRegionInfoTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ModuleCacheTest.cpp [lldb] Add a SubsystemRAII that takes care of calling Initialize and Terminate in the unit tests 2019-12-23 10:38:25 +01:00
PathMappingListTest.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
StackFrameRecognizerTest.cpp [lldb/test] Add alternate symbol to StackFrame Recognizer 2020-02-11 11:44:37 +01:00