diff options
Diffstat (limited to 'lldb/source/DataFormatters/FormattersHelpers.cpp')
-rw-r--r-- | lldb/source/DataFormatters/FormattersHelpers.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lldb/source/DataFormatters/FormattersHelpers.cpp b/lldb/source/DataFormatters/FormattersHelpers.cpp index 4b0e82e975e..6c1b8c37480 100644 --- a/lldb/source/DataFormatters/FormattersHelpers.cpp +++ b/lldb/source/DataFormatters/FormattersHelpers.cpp @@ -140,13 +140,18 @@ lldb_private::formatters::GetViableFrame (ExecutionContext exe_ctx) if (frame) return frame; + Thread *thread = exe_ctx.GetThreadPtr(); + if (thread) + return thread->GetSelectedFrame().get(); + Process* process = exe_ctx.GetProcessPtr(); if (!process) return nullptr; - ThreadSP thread_sp(process->GetThreadList().GetSelectedThread()); - if (thread_sp) - return thread_sp->GetSelectedFrame().get(); + thread = process->GetThreadList().GetSelectedThread().get(); + if (thread) + return thread->GetSelectedFrame().get(); + return nullptr; } |