diff options
Diffstat (limited to 'lldb/source/Target/LanguageRuntime.cpp')
-rw-r--r-- | lldb/source/Target/LanguageRuntime.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp index f2e2febf8b88..be878d69fa00 100644 --- a/lldb/source/Target/LanguageRuntime.cpp +++ b/lldb/source/Target/LanguageRuntime.cpp @@ -259,6 +259,25 @@ BreakpointSP LanguageRuntime::CreateExceptionBreakpoint( return exc_breakpt_sp; } +UnwindPlanSP +LanguageRuntime::GetRuntimeUnwindPlan(Thread &thread, RegisterContext *regctx, + bool &behaves_like_zeroth_frame) { + ProcessSP process_sp = thread.GetProcess(); + if (!process_sp.get()) + return UnwindPlanSP(); + if (process_sp->GetDisableLangRuntimeUnwindPlans() == true) + return UnwindPlanSP(); + for (const lldb::LanguageType lang_type : Language::GetSupportedLanguages()) { + if (LanguageRuntime *runtime = process_sp->GetLanguageRuntime(lang_type)) { + UnwindPlanSP plan_sp = runtime->GetRuntimeUnwindPlan( + process_sp, regctx, behaves_like_zeroth_frame); + if (plan_sp.get()) + return plan_sp; + } + } + return UnwindPlanSP(); +} + void LanguageRuntime::InitializeCommands(CommandObject *parent) { if (!parent) return; |