This revision was automatically updated to reflect the committed changes. Closed by commit rGab7fcf24849d: [LLDB] CommandObjectThreadUntil::DoExecute() sets the wrong selected thread ID (authored by RamNalamothu).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48865/new/ https://reviews.llvm.org/D48865 Files: lldb/source/Commands/CommandObjectThread.cpp Index: lldb/source/Commands/CommandObjectThread.cpp =================================================================== --- lldb/source/Commands/CommandObjectThread.cpp +++ lldb/source/Commands/CommandObjectThread.cpp @@ -984,8 +984,8 @@ thread->GetStackFrameAtIndex(m_options.m_frame_idx).get(); if (frame == nullptr) { result.AppendErrorWithFormat( - "Frame index %u is out of range for thread %u.\n", - m_options.m_frame_idx, m_options.m_thread_idx); + "Frame index %u is out of range for thread id %" PRIu64 ".\n", + m_options.m_frame_idx, thread->GetID()); return false; } @@ -1002,9 +1002,8 @@ if (line_table == nullptr) { result.AppendErrorWithFormat("Failed to resolve the line table for " - "frame %u of thread index %u.\n", - m_options.m_frame_idx, - m_options.m_thread_idx); + "frame %u of thread id %" PRIu64 ".\n", + m_options.m_frame_idx, thread->GetID()); return false; } @@ -1090,13 +1089,18 @@ return false; } } else { - result.AppendErrorWithFormat( - "Frame index %u of thread %u has no debug information.\n", - m_options.m_frame_idx, m_options.m_thread_idx); + result.AppendErrorWithFormat("Frame index %u of thread id %" PRIu64 + " has no debug information.\n", + m_options.m_frame_idx, thread->GetID()); return false; } - process->GetThreadList().SetSelectedThreadByID(m_options.m_thread_idx); + if (!process->GetThreadList().SetSelectedThreadByID(thread->GetID())) { + result.AppendErrorWithFormat( + "Failed to set the selected thread to thread id %" PRIu64 ".\n", + thread->GetID()); + return false; + } StreamString stream; Status error;
Index: lldb/source/Commands/CommandObjectThread.cpp =================================================================== --- lldb/source/Commands/CommandObjectThread.cpp +++ lldb/source/Commands/CommandObjectThread.cpp @@ -984,8 +984,8 @@ thread->GetStackFrameAtIndex(m_options.m_frame_idx).get(); if (frame == nullptr) { result.AppendErrorWithFormat( - "Frame index %u is out of range for thread %u.\n", - m_options.m_frame_idx, m_options.m_thread_idx); + "Frame index %u is out of range for thread id %" PRIu64 ".\n", + m_options.m_frame_idx, thread->GetID()); return false; } @@ -1002,9 +1002,8 @@ if (line_table == nullptr) { result.AppendErrorWithFormat("Failed to resolve the line table for " - "frame %u of thread index %u.\n", - m_options.m_frame_idx, - m_options.m_thread_idx); + "frame %u of thread id %" PRIu64 ".\n", + m_options.m_frame_idx, thread->GetID()); return false; } @@ -1090,13 +1089,18 @@ return false; } } else { - result.AppendErrorWithFormat( - "Frame index %u of thread %u has no debug information.\n", - m_options.m_frame_idx, m_options.m_thread_idx); + result.AppendErrorWithFormat("Frame index %u of thread id %" PRIu64 + " has no debug information.\n", + m_options.m_frame_idx, thread->GetID()); return false; } - process->GetThreadList().SetSelectedThreadByID(m_options.m_thread_idx); + if (!process->GetThreadList().SetSelectedThreadByID(thread->GetID())) { + result.AppendErrorWithFormat( + "Failed to set the selected thread to thread id %" PRIu64 ".\n", + thread->GetID()); + return false; + } StreamString stream; Status error;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits