aboutsummaryrefslogtreecommitdiff
path: root/gdb/xtensa-linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xtensa-linux-nat.c')
-rw-r--r--gdb/xtensa-linux-nat.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index 7f530ce..77ad3e0 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -42,16 +42,6 @@
hardware-specific overlays. */
#include "xtensa-xtregs.c"
-static int
-get_thread_id (ptid_t ptid)
-{
- int tid = ptid_get_lwp (ptid);
- if (0 == tid)
- tid = ptid_get_pid (ptid);
- return tid;
-}
-#define GET_THREAD_ID(PTID) get_thread_id (PTID)
-
void
fill_gregset (const struct regcache *regcache,
gdb_gregset_t *gregsetp, int regnum)
@@ -181,7 +171,7 @@ supply_fpregset (struct regcache *regcache,
static void
fetch_gregs (struct regcache *regcache, int regnum)
{
- int tid = GET_THREAD_ID (inferior_ptid);
+ int tid = ptid_get_lwp (inferior_ptid);
const gdb_gregset_t regs;
int areg;
@@ -200,7 +190,7 @@ fetch_gregs (struct regcache *regcache, int regnum)
static void
store_gregs (struct regcache *regcache, int regnum)
{
- int tid = GET_THREAD_ID (inferior_ptid);
+ int tid = ptid_get_lwp (inferior_ptid);
gdb_gregset_t regs;
int areg;
@@ -228,7 +218,7 @@ static int xtreg_high;
static void
fetch_xtregs (struct regcache *regcache, int regnum)
{
- int tid = GET_THREAD_ID (inferior_ptid);
+ int tid = ptid_get_lwp (inferior_ptid);
const xtensa_regtable_t *ptr;
char xtregs [XTENSA_ELF_XTREG_SIZE];
@@ -244,7 +234,7 @@ fetch_xtregs (struct regcache *regcache, int regnum)
static void
store_xtregs (struct regcache *regcache, int regnum)
{
- int tid = GET_THREAD_ID (inferior_ptid);
+ int tid = ptid_get_lwp (inferior_ptid);
const xtensa_regtable_t *ptr;
char xtregs [XTENSA_ELF_XTREG_SIZE];