Lines Matching refs:ptid

131 static void attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
133 static void detach_thread (ptid_t ptid, int verbose);
139 #define GET_PID(ptid) ptid_get_pid (ptid)
140 #define GET_LWP(ptid) ptid_get_lwp (ptid)
141 #define GET_THREAD(ptid) ptid_get_tid (ptid)
143 #define is_lwp(ptid) (GET_LWP (ptid) != 0)
144 #define is_thread(ptid) (GET_THREAD (ptid) != 0)
322 err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (thread_info->ptid),
328 (long) GET_THREAD (thread_info->ptid),
360 thread_from_lwp (ptid_t ptid)
367 if (GET_LWP (ptid) == 0)
368 ptid = BUILD_LWP (GET_PID (ptid), GET_PID (ptid));
370 gdb_assert (is_lwp (ptid));
372 err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th);
375 GET_LWP (ptid), thread_db_err_str (err));
382 anymore. In that case, we don't want to process this ptid anymore
385 we return a -1 ptid which is also how the thread list marks a
393 return BUILD_THREAD (thread_info->private->ti.ti_tid, GET_PID (ptid));
397 lwp_from_thread (ptid_t ptid)
402 if (!is_thread (ptid))
403 return ptid;
405 thread_info = find_thread_pid (ptid);
408 return BUILD_LWP (thread_info->private->ti.ti_lid, GET_PID (ptid));
726 attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
742 if (in_thread_list (ptid))
744 tp = find_thread_pid (ptid);
750 delete_thread (ptid);
756 tp = add_thread (ptid);
761 printf_unfiltered ("[New %s]\n", target_pid_to_str (ptid));
768 ATTACH_LWP (BUILD_LWP (ti_p->ti_lid, GET_PID (ptid)), 0);
775 target_pid_to_str (ptid), thread_db_err_str (err));
796 detach_thread (ptid_t ptid, int verbose)
801 printf_unfiltered ("[%s exited]\n", target_pid_to_str (ptid));
810 thread_info = find_thread_pid (ptid);
845 thread_db_resume (ptid_t ptid, int step, enum target_signal signo)
849 if (GET_PID (ptid) == -1)
851 else if (is_thread (ptid))
852 ptid = lwp_from_thread (ptid);
857 target_beneath->to_resume (ptid, step, signo);
867 check_event (ptid_t ptid)
876 stop_pc = read_pc_pid (ptid) - DECR_PC_AFTER_BREAK;
912 ptid = BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
919 attach_thread (ptid, msg.th_p, &ti, 1);
925 if (!in_thread_list (ptid))
928 detach_thread (ptid, 1);
940 thread_db_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
944 if (GET_PID (ptid) != -1 && is_thread (ptid))
945 ptid = lwp_from_thread (ptid);
947 ptid = target_beneath->to_wait (ptid, ourstatus);
953 return ptid;
961 check_event (ptid);
966 /* Change the ptid back into the higher level PID + TID format.
968 get back a dead ptid. This can occur if the thread death event
971 ptid = thread_from_lwp (ptid);
972 if (GET_PID (ptid) == -1)
975 return ptid;
1097 thread_db_post_startup_inferior (ptid_t ptid)
1103 proc_handle.pid = GET_PID (ptid);
1128 thread_db_thread_alive (ptid_t ptid)
1133 if (is_thread (ptid))
1136 thread_info = find_thread_pid (ptid);
1164 return target_beneath->to_thread_alive (ptid);
1174 ptid_t ptid;
1184 ptid = BUILD_THREAD (ti.ti_tid, GET_PID (inferior_ptid));
1186 if (!in_thread_list (ptid))
1187 attach_thread (ptid, th_p, &ti, 1);
1206 thread_db_pid_to_str (ptid_t ptid)
1208 if (is_thread (ptid))
1215 thread_info = find_thread_pid (ptid);
1220 GET_THREAD (ptid));
1241 if (target_beneath->to_pid_to_str (ptid))
1242 return target_beneath->to_pid_to_str (ptid);
1244 return normal_pid_to_str (ptid);
1251 thread_db_get_thread_local_address (ptid_t ptid, struct objfile *objfile,
1254 if (is_thread (ptid))
1281 thread_info = find_thread_pid (ptid);
1300 objfile->name, (long) GET_THREAD (ptid));
1306 objfile->name, (long) GET_THREAD (ptid));
1316 (long) GET_THREAD (ptid),
1321 (long) GET_THREAD (ptid),
1330 return target_beneath->to_get_thread_local_address (ptid, objfile,