summaryrefslogtreecommitdiff
path: root/gdb/arm-linux-nat.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-05-04 04:15:33 +0000
committerKevin Buettner <kevinb@redhat.com>2001-05-04 04:15:33 +0000
commit1833b4efc52b4d056d843af95982b36ce34e8784 (patch)
tree2acb1651ccd4af0cc1272d37f373f1a63ac25ac8 /gdb/arm-linux-nat.c
parent0122230badabd76bac4af1754fe642ece1cb45c6 (diff)
downloadgdb-1833b4efc52b4d056d843af95982b36ce34e8784.tar.gz
Phase 1 of the ptid_t changes.gdb-post-ptid_t-2001-05-03
Diffstat (limited to 'gdb/arm-linux-nat.c')
-rw-r--r--gdb/arm-linux-nat.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 5d1487e934e..96c78342d10 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -78,7 +78,7 @@ static unsigned int os_version, os_major, os_minor, os_release;
/* 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. */
@@ -89,13 +89,14 @@ static unsigned int os_version, os_major, os_minor, os_release;
#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)
@@ -230,7 +231,7 @@ fetch_fpregister (int regno)
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);
@@ -279,7 +280,7 @@ fetch_fpregs (void)
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);
@@ -327,7 +328,7 @@ store_fpregister (int regno)
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);
@@ -365,7 +366,7 @@ store_fpregs (void)
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);
@@ -403,7 +404,7 @@ fetch_register (int regno)
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, &regs);
if (ret < 0)
@@ -440,7 +441,7 @@ fetch_regs (void)
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, &regs);
if (ret < 0)
@@ -474,7 +475,7 @@ store_register (int regno)
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, &regs);
@@ -502,7 +503,7 @@ store_regs (void)
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, &regs);