[Lldb-commits] [lldb] r238410 - Fix write register context in EmulateInstructionARM::EmulateADDRdSPImm

Tamas Berghammer tberghammer at google.com
Thu May 28 03:38:32 PDT 2015


Author: tberghammer
Date: Thu May 28 05:38:32 2015
New Revision: 238410

URL: http://llvm.org/viewvc/llvm-project?rev=238410&view=rev
Log:
Fix write register context in EmulateInstructionARM::EmulateADDRdSPImm

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=238410&r1=238409&r2=238410&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Thu May 28 05:38:32 2015
@@ -660,9 +660,12 @@ EmulateInstructionARM::EmulateADDRdSPImm
         }
         addr_t sp_offset = imm32;
         addr_t addr = sp + sp_offset; // a pointer to the stack area
-        
+
         EmulateInstruction::Context context;
-        context.type = eContextSetFramePointer;
+        if (Rd == GetFramePointerRegisterNumber())
+            context.type = eContextSetFramePointer;
+        else
+            context.type = EmulateInstruction::eContextRegisterPlusOffset;
         RegisterInfo sp_reg;
         GetRegisterInfo (eRegisterKindDWARF, dwarf_sp, sp_reg);
         context.SetRegisterPlusOffset (sp_reg, sp_offset);





More information about the lldb-commits mailing list