================
@@ -1439,13 +1445,59 @@ void Thread::CalculateExecutionContext(ExecutionContext
&exe_ctx) {
StackFrameListSP Thread::GetStackFrameList() {
std::lock_guard<std::recursive_mutex> guard(m_frame_mutex);
- if (!m_curr_frames_sp)
- m_curr_frames_sp =
- std::make_shared<StackFrameList>(*this, m_prev_frames_sp, true);
+ if (!m_curr_frames_sp) {
+ // Try to load the frame provider if we don't have one yet
+ if (!m_frame_provider_sp) {
+ ProcessSP process_sp = GetProcess();
+ if (process_sp) {
+ Target &target = process_sp->GetTarget();
+ auto descriptor = target.GetScriptedFrameProviderDescriptor();
+ if (descriptor && descriptor->IsValid()) {
+ // Check if this descriptor applies to this thread
+ if (descriptor->AppliesToThread(GetID())) {
+ if (llvm::Error error = LoadScriptedFrameProvider()) {
----------------
medismailben wrote:
I was also unhappy with this so I re-wrote it, let me know if you prefer it
better like this.
https://github.com/llvm/llvm-project/pull/161870
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits