[Lldb-commits] [lldb] r132511 - /lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
Johnny Chen
johnny.chen at apple.com
Thu Jun 2 16:19:06 PDT 2011
Author: johnny
Date: Thu Jun 2 18:19:06 2011
New Revision: 132511
URL: http://llvm.org/viewvc/llvm-project?rev=132511&view=rev
Log:
Bail out if we have an invalid thumb instruction.
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=132511&r1=132510&r2=132511&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Thu Jun 2 18:19:06 2011
@@ -12943,9 +12943,8 @@
if (Bits32(opcode, 15, 12) == 0x0d && Bits32(opcode, 11, 7) != 0x0f)
return Bits32(opcode, 11, 7);
}
- else
+ else if (byte_size == 4)
{
- //assert (byte_size == 4);
if (Bits32(opcode, 31, 27) == 0x1e &&
Bits32(opcode, 15, 14) == 0x02 &&
Bits32(opcode, 12, 12) == 0x00 &&
@@ -12954,6 +12953,9 @@
return Bits32(opcode, 25, 22);
}
}
+ else
+ // We have an invalid thumb instruction, let's bail out.
+ break;
return m_it_session.GetCond();
}
More information about the lldb-commits
mailing list