[Lldb-commits] [PATCH] D16772: Fix single stepping over the IT instruction
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 2 06:36:22 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL259509: Fix single stepping over the IT instruction (authored by tberghammer).
Changed prior to commit:
http://reviews.llvm.org/D16772?vs=46542&id=46647#toc
Repository:
rL LLVM
http://reviews.llvm.org/D16772
Files:
lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
Index: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
===================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -13062,6 +13062,15 @@
m_opcode_mode = eModeARM;
m_opcode.SetOpcode32 (MemARead(read_inst_context, pc, 4, 0, &success), GetByteOrder());
}
+
+ if (!m_ignore_conditions)
+ {
+ // If we are not ignoreing the conditions then init the it session from the current
+ // value of cpsr.
+ uint32_t it = (Bits32(m_opcode_cpsr, 15, 10) << 2) | Bits32(m_opcode_cpsr, 26, 25);
+ if (it != 0)
+ m_it_session.InitIT(it);
+ }
}
}
if (!success)
@@ -13572,10 +13581,6 @@
bool
EmulateInstructionARM::EvaluateInstruction (uint32_t evaluate_options)
{
- // Advance the ITSTATE bits to their values for the next instruction.
- if (m_opcode_mode == eModeThumb && m_it_session.InITBlock())
- m_it_session.ITAdvance();
-
ARMOpcode *opcode_data = NULL;
if (m_opcode_mode == eModeThumb)
@@ -13614,7 +13619,13 @@
success = (this->*opcode_data->callback) (m_opcode.GetOpcode32(), opcode_data->encoding);
if (!success)
return false;
-
+
+ // Advance the ITSTATE bits to their values for the next instruction if we haven't just executed
+ // an IT instruction what initialized it.
+ if (m_opcode_mode == eModeThumb && m_it_session.InITBlock() &&
+ opcode_data->callback != &EmulateInstructionARM::EmulateIT)
+ m_it_session.ITAdvance();
+
if (auto_advance_pc)
{
uint32_t after_pc_value = ReadRegisterUnsigned (eRegisterKindDWARF, dwarf_pc, 0, &success);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16772.46647.patch
Type: text/x-patch
Size: 1892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160202/8d30574c/attachment.bin>
More information about the lldb-commits
mailing list