[Lldb-commits] [PATCH] D75607: [lldb] Use llvm::MC for register numbers in AArch64 ABIs

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 4 06:11:39 PST 2020


labath marked an inline comment as done.
labath added inline comments.


================
Comment at: lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp:29-32
+  if (name == "pc")
+    return {LLDB_INVALID_REGNUM, arm64_dwarf::pc};
+  if (name == "cpsr")
+    return {LLDB_INVALID_REGNUM, arm64_dwarf::cpsr};
----------------
This is here to ensure identical behavior to the previous code, but I am not sure it is really needed/correct. [[https://developer.arm.com/docs/ihi0057/c/dwarf-for-the-arm-64-bit-architecture-aarch64-abi-2018q4 | Arm-dwarf spec ]] does not assign a register number to the pc (number 32, used by lldb, is reserved) or cpsr (number 33 is assigned to ELR_mode).

Llvm does not use either of these numbers, so at least no llvm-based toolchain should be generating them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75607/new/

https://reviews.llvm.org/D75607





More information about the lldb-commits mailing list