/* TID parsing for GDB, the GNU debugger.
- Copyright (C) 2015-2018 Free Software Foundation, Inc.
+ Copyright (C) 2015-2019 Free Software Foundation, Inc.
This file is part of GDB.
{
const char *number = tidstr;
const char *dot, *p1;
- struct thread_info *tp;
struct inferior *inf;
int thr_num;
int explicit_inf_id = 0;
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)
{
return m_state == STATE_STAR_RANGE;
}
-/* See gdbthread.h. */
+/* See tid-parse.h. */
int
tid_is_in_list (const char *list, int default_inferior,