[Lldb-commits] [PATCH] D48865: [LLDB] CommandObjectThreadUntil::DoExecute() sets the wrong selected thread ID

Venkata Ramanaiah via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 11 22:39:00 PDT 2018


ramana-nvr updated this revision to Diff 155114.
ramana-nvr added a comment.

The error messages now refer to the thread ID instead of the thread index.


https://reviews.llvm.org/D48865

Files:
  source/Commands/CommandObjectThread.cpp


Index: source/Commands/CommandObjectThread.cpp
===================================================================
--- source/Commands/CommandObjectThread.cpp
+++ source/Commands/CommandObjectThread.cpp
@@ -1183,8 +1183,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());
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
@@ -1201,9 +1201,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());
           result.SetStatus(eReturnStatusFailed);
           return false;
         }
@@ -1279,13 +1278,13 @@
         new_plan_sp->SetOkayToDiscard(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);
+          "Frame index %u of thread id %" PRIu64 " has no debug information.\n",
+          m_options.m_frame_idx, thread->GetID());
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
-      process->GetThreadList().SetSelectedThreadByID(m_options.m_thread_idx);
+      process->GetThreadList().SetSelectedThreadByID(thread->GetID());
 
       StreamString stream;
       Status error;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48865.155114.patch
Type: text/x-patch
Size: 1968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180712/4788a8d8/attachment.bin>


More information about the lldb-commits mailing list