LanguageRuntime can provide an UnwindPlan for special occasions
authorJason Molenda <jason@molenda.com>
Fri, 19 Feb 2021 07:20:15 +0000 (23:20 -0800)
committerJason Molenda <jason@molenda.com>
Fri, 19 Feb 2021 07:23:15 +0000 (23:23 -0800)
commitd82ecb0ac72261189ec3a5dccd3ad55aeafe07b4
tree538072a8e2d3ba30a2bdf9a9a4e3ab5cbc849ab4
parent2556d622828ae5631ac483d82592440fa1910d80
LanguageRuntime can provide an UnwindPlan for special occasions

Add a facility in the LanguageRuntime to provide a special
UnwindPlan based on the register values in a RegisterContext,
instead of using the return-pc to find a function and use its
normal UnwindPlans.

Needed when the runtime has special stack frames that we want
to show the user, but aren't actually on the real stack.
Specifically for Swift asynchronous functions.

With feedback from Greg Clayton, Jonas Devlieghere, Dave Lee

<rdar://problem/70398009>

Differential Revision: https://reviews.llvm.org/D96839
lldb/include/lldb/Target/LanguageRuntime.h
lldb/source/Target/LanguageRuntime.cpp
lldb/source/Target/RegisterContextUnwind.cpp