This patch allows a RegisterContext to record if it behaves like a 0th frame -- where its pc value should not be decremented before symbolication. It adds a call out to the LanguageRuntime to get a special UnwindPlan when unwinding from the 0th (first) frame, not just further unwinds up the stack. The majority of the patch is the mechanical addition of the new ivar/method to expose this, and the LanguageRuntime hook in InitializeZerothFrame(). This is a follow-on patch to the previous https://reviews.llvm.org/D96839
For the Swift async unwinds, the saved pc values we have are not normal ABI style calls, and backing up the resume pc results in bad symbolication. I've been meaning to add a capability like this to RegisterContext for a while for DWARFExpression::Evaluate where we get a frame's pc value to look up a location list entry too (and do not decr the pc resulting in bogus values being displayed for noreturn calls) - I'll fix that in a separate patch.
I have API tests when the Swift language runtime is present, but in generic lldb we don't have an environment quite like this. In the followup patch to DWARFExpression::Evaluate I'll be able to test RegisterContext::BehavesLikeZerothFrame so there will be some test coverage then.
rdar://problem/70398009
clang-tidy: error: 'lldb/Breakpoint/BreakpointResolver.h' file not found [clang-diagnostic-error]
not useful