[Lldb-commits] [lldb] r256000 - Fix the emulation of arm strd instruction

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 18 07:35:08 PST 2015


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;
         }




More information about the lldb-commits mailing list