This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc208deb90082: [lldb] [ABI/AArch64] Recognize special regs by 
their xN names too (authored by mgorny).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109691

Files:
  lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
  lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py


Index: lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
===================================================================
--- lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
@@ -409,5 +409,11 @@
                    ["x0 = 0x0807060504030201"])
         self.match("register read arg2",
                    ["x1 = 0x1817161514131211"])
+        self.match("register read fp",
+                   ["x29 = 0x3837363534333231"])
+        self.match("register read lr",
+                   ["x30 = 0x4847464544434241"])
+        self.match("register read ra",
+                   ["x30 = 0x4847464544434241"])
         self.match("register read flags",
                    ["cpsr = 0x74737271"])
Index: lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
===================================================================
--- lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
+++ lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
@@ -55,9 +55,9 @@
 uint32_t ABIAArch64::GetGenericNum(llvm::StringRef name) {
   return llvm::StringSwitch<uint32_t>(name)
       .Case("pc", LLDB_REGNUM_GENERIC_PC)
-      .Case("lr", LLDB_REGNUM_GENERIC_RA)
-      .Case("sp", LLDB_REGNUM_GENERIC_SP)
-      .Case("fp", LLDB_REGNUM_GENERIC_FP)
+      .Cases("lr", "x30", LLDB_REGNUM_GENERIC_RA)
+      .Cases("sp", "x31", LLDB_REGNUM_GENERIC_SP)
+      .Cases("fp", "x29", LLDB_REGNUM_GENERIC_FP)
       .Case("cpsr", LLDB_REGNUM_GENERIC_FLAGS)
       .Case("x0", LLDB_REGNUM_GENERIC_ARG1)
       .Case("x1", LLDB_REGNUM_GENERIC_ARG2)


Index: lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
===================================================================
--- lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py
@@ -409,5 +409,11 @@
                    ["x0 = 0x0807060504030201"])
         self.match("register read arg2",
                    ["x1 = 0x1817161514131211"])
+        self.match("register read fp",
+                   ["x29 = 0x3837363534333231"])
+        self.match("register read lr",
+                   ["x30 = 0x4847464544434241"])
+        self.match("register read ra",
+                   ["x30 = 0x4847464544434241"])
         self.match("register read flags",
                    ["cpsr = 0x74737271"])
Index: lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
===================================================================
--- lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
+++ lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
@@ -55,9 +55,9 @@
 uint32_t ABIAArch64::GetGenericNum(llvm::StringRef name) {
   return llvm::StringSwitch<uint32_t>(name)
       .Case("pc", LLDB_REGNUM_GENERIC_PC)
-      .Case("lr", LLDB_REGNUM_GENERIC_RA)
-      .Case("sp", LLDB_REGNUM_GENERIC_SP)
-      .Case("fp", LLDB_REGNUM_GENERIC_FP)
+      .Cases("lr", "x30", LLDB_REGNUM_GENERIC_RA)
+      .Cases("sp", "x31", LLDB_REGNUM_GENERIC_SP)
+      .Cases("fp", "x29", LLDB_REGNUM_GENERIC_FP)
       .Case("cpsr", LLDB_REGNUM_GENERIC_FLAGS)
       .Case("x0", LLDB_REGNUM_GENERIC_ARG1)
       .Case("x1", LLDB_REGNUM_GENERIC_ARG2)
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to