Author: tberghammer
Date: Fri Dec 18 09:35:08 2015
New Revision: 256000

URL: http://llvm.org/viewvc/llvm-project?rev=256000&view=rev
Log:
Fix the emulation of arm strd instruction

The incorrect instruction emulation caused issues in the stack unwinding
code when strd was used to push 2 register to the stack with writeback.

Modified:
    lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Modified: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp?rev=256000&r1=255999&r2=256000&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Fri Dec 
18 09:35:08 2015
@@ -10615,9 +10615,12 @@ EmulateInstructionARM::EmulateSTRDImm (c
         //if wback then R[n] = offset_addr;
         if (wback)
         {
-            context.type = eContextAdjustBaseRegister;
+            if (n == 13)
+                context.type = eContextAdjustStackPointer;
+            else
+                context.type = eContextAdjustBaseRegister;
             context.SetAddress (offset_addr);
-                  
+
             if (!WriteRegisterUnsigned (context, eRegisterKindDWARF, dwarf_r0 
+ n, offset_addr))
                 return false;
         }


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to