aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 5361771..a7ac3c8 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -428,6 +428,18 @@ first_thread_of_process (int pid)
return ret;
}
+struct thread_info *
+any_thread_of_process (int pid)
+{
+ struct thread_info *tp;
+
+ for (tp = thread_list; tp; tp = tp->next)
+ if (ptid_get_pid (tp->ptid) == pid)
+ return tp;
+
+ return NULL;
+}
+
/* Print a list of thread ids currently known, and the total number of
threads. To be used from within catch_errors. */
static int