+/* Return non-zero if PTID is still alive.
+
+ Assumes that DEC_THREAD_LIST is up to date. */
+static int
+dec_thread_ptid_is_alive (ptid_t ptid)
+{
+ pthreadDebugId_t tid = ptid_get_tid (ptid);
+ int i;
+ struct dec_thread_info *info;
+
+ if (tid == 0)
+ /* This is the thread corresponding to the process. This ptid
+ is always alive until the program exits. */
+ return 1;
+
+ /* Search whether an entry with the same tid exists in the dec-thread
+ list of threads. If it does, then the thread is still alive.
+ No match found means that the thread must be dead, now. */
+ for (i = 0; VEC_iterate (dec_thread_info_s, dec_thread_list, i, info); i++)
+ if (info->thread == tid)
+ return 1;
+ return 0;
+}
+