[Lldb-commits] [lldb] [lldb] Introduce ScriptedFrameProvider for real threads (PR #161870)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 5 12:31:45 PST 2025
================
@@ -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
More information about the lldb-commits
mailing list