Lines Matching refs:ptid

153 static int fbsd_thread_alive (ptid_t ptid);
154 static void attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
160 #define GET_PID(ptid) ptid_get_pid (ptid)
161 #define GET_LWP(ptid) ptid_get_lwp (ptid)
162 #define GET_THREAD(ptid) ptid_get_tid (ptid)
164 #define IS_LWP(ptid) (GET_LWP (ptid) != 0)
165 #define IS_THREAD(ptid) (GET_THREAD (ptid) != 0)
252 thread_from_lwp (ptid_t ptid, td_thrhandle_t *th, td_thrinfo_t *ti)
256 gdb_assert (IS_LWP (ptid));
260 err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), th);
266 return BUILD_THREAD (ti->ti_tid, GET_PID (ptid));
271 return BUILD_LWP (GET_LWP (ptid), GET_PID (ptid));
310 ptid_t tmp, ptid;
314 ptid = thread_from_lwp (tmp, &th, &ti);
315 if (!in_thread_list (ptid))
317 attach_thread (ptid, &th, &ti, 1);
319 inferior_ptid = ptid;
603 fbsd_thread_resume (ptid_t ptid, int step, enum target_signal signo)
613 child_ops.to_resume (ptid, step, signo);
617 if (GET_PID(ptid) != -1 && step != 0)
620 work_ptid = ptid;
699 attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
705 if (!in_thread_list (ptid)) {
706 add_thread (ptid);
708 printf_unfiltered ("[New %s]\n", target_pid_to_str (ptid));
714 if (! IS_THREAD(ptid))
722 target_pid_to_str (ptid), thread_db_err_str (err));
726 detach_thread (ptid_t ptid, int verbose)
729 printf_unfiltered ("[%s exited]\n", target_pid_to_str (ptid));
733 check_event (ptid_t ptid)
742 stop_pc = read_pc_pid (ptid) - DECR_PC_AFTER_BREAK;
760 ptid = BUILD_THREAD (ti.ti_tid, GET_PID (ptid));
767 attach_thread (ptid, (void *)(uintptr_t)msg.th_p, &ti, 1);
770 if (!in_thread_list (ptid))
772 detach_thread (ptid, 1);
782 fbsd_thread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
790 ret = child_ops.to_wait (ptid, ourstatus);
1066 fbsd_thread_post_startup_inferior (ptid_t ptid)
1072 proc_handle.pid = GET_PID (ptid);
1107 fbsd_thread_alive (ptid_t ptid)
1115 if (IS_THREAD (ptid))
1117 err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
1131 else if (GET_LWP (ptid) == 0)
1139 err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th);
1151 lwp = GET_LWP (ptid);
1157 return ptrace (PT_GETREGS, GET_LWP (ptid), (caddr_t)&gregs, 0) == 0;
1171 ptid_t ptid;
1181 ptid = BUILD_THREAD (ti.ti_tid, proc_handle.pid);
1182 attach_thread (ptid, th_p, &ti, 1);
1203 fbsd_thread_pid_to_str (ptid_t ptid)
1207 if (IS_THREAD (ptid))
1213 err = td_ta_map_id2thr_p (thread_agent, GET_THREAD (ptid), &th);
1216 GET_THREAD (ptid), thread_db_err_str (err));
1221 GET_THREAD (ptid), thread_db_err_str (err));
1238 else if (IS_LWP (ptid))
1240 snprintf (buf, sizeof (buf), "LWP %d", (int) GET_LWP (ptid));
1243 return normal_pid_to_str (ptid);
1247 fbsd_thread_get_local_address(ptid_t ptid, struct objfile *objfile,
1256 if (IS_THREAD (ptid))
1275 ret = td_ta_map_id2thr_p (thread_agent, GET_THREAD(ptid), &th);
1286 (long) GET_THREAD (ptid),
1291 (long) GET_THREAD (ptid),