[Lldb-commits] [PATCH] D74244: [lldb] Delete register info definitions in the x86_64 ABI classes
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 7 11:12:40 PST 2020
labath created this revision.
labath added reviewers: JDevlieghere, jasonmolenda.
Herald added a subscriber: mgorny.
Herald added a project: LLDB.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74244
Files:
lldb/include/lldb/Target/ABI.h
lldb/source/Plugins/ABI/X86/ABISysV_x86_64.cpp
lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
lldb/source/Plugins/ABI/X86/ABIWindows_x86_64.cpp
lldb/source/Plugins/ABI/X86/ABIWindows_x86_64.h
lldb/source/Plugins/ABI/X86/ABIx86_64.h
lldb/source/Target/ABI.cpp
lldb/unittests/Target/ABITest.cpp
lldb/unittests/Target/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74244.243245.patch
Type: text/x-patch
Size: 53463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200207/434c16c5/attachment-0001.bin>
More information about the lldb-commits
mailing list