[Lldb-commits] [lldb] r315221 - Update ABISysV_arm64::RegisterIsVolatile to accept registers prefixed with r

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 9 10:49:33 PDT 2017

Author: sas
Date: Mon Oct  9 10:49:32 2017
New Revision: 315221

URL: http://llvm.org/viewvc/llvm-project?rev=315221&view=rev
Update ABISysV_arm64::RegisterIsVolatile to accept registers prefixed with r

While the specification says that the 64bit registers are prefixed with
`x`, it seems that many people still use `r`. Until recently, we had been using
the `r` prefix instead of the `x` prefix in ds2. This caused lldb to fail during
unwinding. I think it's reasonable to check for a register prefixed with `r`,
since some people still choose to use `r`.

Reviewers: sas, fjricci, clayborg

Reviewed By: sas, clayborg

Subscribers: aemerson, javed.absar, kristof.beyls

Differential Revision: https://reviews.llvm.org/D38376

Change by Alex Langford <apl at fb.com>


Modified: lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp?rev=315221&r1=315220&r2=315221&view=diff
--- lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp Mon Oct  9 10:49:32 2017
@@ -2018,7 +2018,7 @@ bool ABISysV_arm64::RegisterIsVolatile(c
     if (name[0] == 'l' && name[1] == 'r') // lr
       return false;
-    if (name[0] == 'x') {
+    if (name[0] == 'x' || name[0] == 'r') {
       // Volatile registers: x0-x18
       // Although documentation says only x19-28 + sp are callee saved
       // We ll also have to treat x30 as non-volatile.

More information about the lldb-commits mailing list