Add an optional "alias" attribute to syscall entries.
[deliverable/binutils-gdb.git] / gdb / tid-parse.c
index 94967a5ab38cc431b037b56fe965baba2e5137bf..7f2d08ab0658d3322c6e863e61076918d8e2dbbb 100644 (file)
@@ -55,7 +55,6 @@ parse_thread_id (const char *tidstr, const char **end)
 {
   const char *number = tidstr;
   const char *dot, *p1;
-  struct thread_info *tp;
   struct inferior *inf;
   int thr_num;
   int explicit_inf_id = 0;
@@ -90,12 +89,13 @@ parse_thread_id (const char *tidstr, const char **end)
   if (thr_num == 0)
     invalid_thread_id_error (number);
 
-  ALL_THREADS (tp)
-    {
-      if (ptid_get_pid (tp->ptid) == inf->pid
-         && tp->per_inf_num == thr_num)
+  thread_info *tp = nullptr;
+  for (thread_info *it : inf->threads ())
+    if (it->per_inf_num == thr_num)
+      {
+       tp = it;
        break;
-    }
+      }
 
   if (tp == NULL)
     {
@@ -301,7 +301,7 @@ tid_range_parser::in_star_range () const
   return m_state == STATE_STAR_RANGE;
 }
 
-/* See gdbthread.h.  */
+/* See tid-parse.h.  */
 
 int
 tid_is_in_list (const char *list, int default_inferior,
This page took 0.029061 seconds and 4 git commands to generate.