[Lldb-commits] [lldb] r125793 - /lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp

Johnny Chen johnny.chen at apple.com
Thu Feb 17 15:27:44 PST 2011


Author: johnny
Date: Thu Feb 17 17:27:44 2011
New Revision: 125793

URL: http://llvm.org/viewvc/llvm-project?rev=125793&view=rev
Log:
Fix a bug in EmulateTB() (TBB, TBH) where the branch length should be "twice"
the value of the byte/halfword returned from the table.

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=125793&r1=125792&r2=125793&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Thu Feb 17 17:27:44 2011
@@ -1893,7 +1893,7 @@
     // PC-relative offset to branch forward
     EmulateInstruction::Context context;
     context.type = EmulateInstruction::eContextTableBranchReadMemory;
-    uint32_t offset = MemURead(context, addr, is_tbh ? 2 : 1, 0, &success);
+    uint32_t offset = MemURead(context, addr, is_tbh ? 2 : 1, 0, &success) * 2;
     if (!success)
         return false;
 





More information about the lldb-commits mailing list