[all-commits] [llvm/llvm-project] 07355c: [lldb] Delete register info definitions in the x86...

plabath via All-commits all-commits at lists.llvm.org
Mon Feb 17 05:01:44 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 07355c1c08be54e6fda494168724e76e7e7da8cd
      https://github.com/llvm/llvm-project/commit/07355c1c08be54e6fda494168724e76e7e7da8cd
  Author: Pavel Labath <labath at google.com>
  Date:   2020-02-17 (Mon, 17 Feb 2020)

  Changed paths:
    M lldb/include/lldb/Target/ABI.h
    M lldb/source/Plugins/ABI/X86/ABISysV_x86_64.cpp
    M lldb/source/Plugins/ABI/X86/ABISysV_x86_64.h
    M lldb/source/Plugins/ABI/X86/ABIWindows_x86_64.cpp
    M lldb/source/Plugins/ABI/X86/ABIWindows_x86_64.h
    A lldb/source/Plugins/ABI/X86/ABIX86_64.h
    M lldb/source/Target/ABI.cpp
    A lldb/unittests/Target/ABITest.cpp
    M lldb/unittests/Target/CMakeLists.txt

  Log Message:
  -----------
  [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




More information about the All-commits mailing list