[all-commits] [llvm/llvm-project] 223e8c: Set a default number of address bits on Darwin arm...

Jason Molenda via All-commits all-commits at lists.llvm.org
Thu Dec 9 22:53:16 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 223e8ca02616dd9353da230d95589954927025c9
      https://github.com/llvm/llvm-project/commit/223e8ca02616dd9353da230d95589954927025c9
  Author: Jason Molenda <jason at molenda.com>
  Date:   2021-12-09 (Thu, 09 Dec 2021)

  Changed paths:
    M lldb/source/DataFormatters/CXXFunctionPointer.cpp
    M lldb/source/Plugins/ABI/AArch64/ABIMacOSX_arm64.cpp
    M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    M lldb/source/Utility/ArchSpec.cpp
    A lldb/test/API/macosx/corefile-default-ptrauth/Makefile
    A lldb/test/API/macosx/corefile-default-ptrauth/TestCorefileDefaultPtrauth.py
    A lldb/test/API/macosx/corefile-default-ptrauth/create-corefile.c
    A lldb/test/API/macosx/corefile-default-ptrauth/main.c

  Log Message:
  -----------
  Set a default number of address bits on Darwin arm64 systems

With arm64e ARMv8.3 pointer authentication, lldb needs to know how
many bits are used for addressing and how many are used for pointer
auth signing.  This should be determined dynamically from the inferior
system / corefile, but there are some workflows where it still isn't
recorded and we fall back on a default value that is correct on some
Darwin environments.

This patch also explicitly sets the vendor of mach-o binaries to
Apple, so we select an Apple ABI instead of a random other ABI.

It adds a function pointer formatter for systems where pointer
authentication is in use, and we can strip the ptrauth bits off
of the function pointer address and get a different value that
points to an actual symbol.

Differential Revision: https://reviews.llvm.org/D115431
rdar://84644661




More information about the All-commits mailing list