/* On Linux, threads are implemented as pseudo-processes, in which
case we may be tracing more than one process at a time. In that
- case, inferior_pid will contain the main process ID and the
+ case, inferior_ptid will contain the main process ID and the
individual thread (process) ID mashed together. These macros are
used to separate them out. These definitions should be overridden
if thread support is included. */
#endif
int
-get_thread_id (int inferior_pid)
+get_thread_id (ptid_t ptid)
{
- int tid = TIDGET (inferior_pid);
- if (0 == tid) tid = inferior_pid;
+ int tid = TIDGET (ptid);
+ if (0 == tid)
+ tid = PIDGET (ptid);
return tid;
}
-#define GET_THREAD_ID(PID) get_thread_id ((PID));
+#define GET_THREAD_ID(PTID) get_thread_id ((PTID));
static void
fetch_nwfpe_single (unsigned int fn, FPA11 * fpa11)
FPA11 fp;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
/* Read the floating point state. */
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
FPA11 fp;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
/* Read the floating point state. */
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
FPA11 fp;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
/* Read the floating point state. */
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
FPA11 fp;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
/* Read the floating point state. */
ret = ptrace (PT_GETFPREGS, tid, 0, &fp);
struct pt_regs regs;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
ret = ptrace (PTRACE_GETREGS, tid, 0, ®s);
if (ret < 0)
struct pt_regs regs;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
ret = ptrace (PTRACE_GETREGS, tid, 0, ®s);
if (ret < 0)
return;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
/* Get the general registers from the process. */
ret = ptrace (PTRACE_GETREGS, tid, 0, ®s);
struct pt_regs regs;
/* Get the thread id for the ptrace call. */
- tid = GET_THREAD_ID (inferior_pid);
+ tid = GET_THREAD_ID (inferior_ptid);
/* Fetch the general registers. */
ret = ptrace (PTRACE_GETREGS, tid, 0, ®s);