[Lldb-commits] [PATCH] D16814: Fix handling of the arm IT instruction in the unwinder
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 2 10:19:46 PST 2016
tberghammer created this revision.
tberghammer added reviewers: omjavaid, jasonmolenda, clayborg.
tberghammer added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer, rengolin, aemerson.
Fix handling of the arm IT instruction in the unwinder
The IT instruction can specify condition code for up to 4 consecutive
instruction and it is used quite often by clang in epilogues causing
an issue when trying to unwind from locations covered by the IT
instruction and for locations immediately after the IT instruction.
Changes made to fix it:
* Introduce the concept of conditional instruction block what is a list
of consecutive instructions with the same condition. We update the
unwind information during the conditional instruction block and when
we reach the end of it (first instruction with a different condition)
then we restore the unwind information we had before the condition.
* Fix a bug in the ARM instruction emulator where neither PC nor the
ITSTATE was advanced when we reached an instruction what we can't
decode.
After the change we have no regression on android-arm running the
regular test suit and TestStandardUnwind also passes when running it
with clang as the compiler (previously it failed on an IT instruction).
http://reviews.llvm.org/D16814
Files:
include/lldb/Core/EmulateInstruction.h
include/lldb/Symbol/UnwindPlan.h
source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
source/Plugins/Instruction/ARM/EmulateInstructionARM.h
source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
source/Symbol/UnwindPlan.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16814.46672.patch
Type: text/x-patch
Size: 14826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160202/79baf78e/attachment.bin>
More information about the lldb-commits
mailing list