aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-09-30 23:09:23 +0000
committerReid Kleckner <rnk@google.com>2015-09-30 23:09:23 +0000
commit6dec87a8a08b715a63347f595ecab0318b6564ea (patch)
tree6980feee267eca8e05910c25cb6a5900cf1d8b5a /lldb/source/Commands/CommandObjectFrame.cpp
parent97746d75bbf73f713c0bbc061525d4f33095ddcb (diff)
downloadllvm-6dec87a8a08b715a63347f595ecab0318b6564ea.zip
llvm-6dec87a8a08b715a63347f595ecab0318b6564ea.tar.gz
llvm-6dec87a8a08b715a63347f595ecab0318b6564ea.tar.bz2
[WinEH] Emit int3 after noreturn calls on Win64
The Win64 unwinder disassembles forwards from each PC to try to determine if this PC is in an epilogue. If so, it skips calling the EH personality function for that frame. Typically, this means you cannot catch an exception in the same frame that you threw it, because 'throw' calls a noreturn runtime function. Previously we avoided this problem with the TrapUnreachable TargetOption, but that's a much bigger hammer than we need. All we need is a 1 byte non-epilogue instruction right after the call. Instead, what we got was an unconditional branch to a shared block containing the ud2, potentially 7 bytes instead of 1. So, this reverts r206684, which added TrapUnreachable, and replaces it with something better. The new code pattern matches for invoke/call followed by unreachable and inserts an int3 into the DAG. To be 100% watertight, we would need to insert SEH_Epilogue instructions into all basic blocks ending in a call with no terminators or successors, but in practice this is unlikely to come up. llvm-svn: 248959
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
0 files changed, 0 insertions, 0 deletions