aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-06-11 12:10:09 -0600
committerTom Tromey <tom@tromey.com>2018-07-03 11:36:43 -0600
commite38504b39279fa86cbb2c4a45ab8ec34e3aef90b (patch)
tree16f941e0132d751ed93e793e8ac078418f656938 /gdb/ppc-linux-nat.c
parente99b03dcf42606425eab8bd12eadb8aa4007f35a (diff)
downloadgdb-e38504b39279fa86cbb2c4a45ab8ec34e3aef90b.zip
gdb-e38504b39279fa86cbb2c4a45ab8ec34e3aef90b.tar.gz
gdb-e38504b39279fa86cbb2c4a45ab8ec34e3aef90b.tar.bz2
Remove ptid_get_lwp
This removes ptid_get_lwp in favor of calling the ptid_t::lwp method. gdb/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * common/ptid.c (ptid_get_lwp): Remove. * common/ptid.h (ptid_get_lwp): Don't declare. * aarch64-linux-nat.c: Update. * ada-tasks.c: Update. * aix-thread.c: Update. * amd64-linux-nat.c: Update. * arm-linux-nat.c: Update. * corelow.c: Update. * fbsd-nat.c: Update. * fbsd-tdep.c: Update. * gnu-nat.c: Update. * i386-cygwin-tdep.c: Update. * i386-gnu-nat.c: Update. * i386-linux-nat.c: Update. * ia64-linux-nat.c: Update. * inf-ptrace.c: Update. * infrun.c: Update. * linux-fork.c: Update. * linux-nat.c: Update. * linux-tdep.c: Update. * linux-thread-db.c: Update. * mips-linux-nat.c: Update. * nat/aarch64-linux-hw-point.c: Update. * nat/aarch64-linux.c: Update. * nat/linux-btrace.c: Update. * nat/linux-osdata.c: Update. * nat/linux-procfs.c: Update. * nat/x86-linux-dregs.c: Update. * obsd-nat.c: Update. * ppc-fbsd-nat.c: Update. * ppc-linux-nat.c: Update. * procfs.c: Update. * python/py-infthread.c: Update. * ravenscar-thread.c: Update. * remote.c: Update. * s390-linux-nat.c: Update. * sol-thread.c: Update. * sol2-tdep.c: Update. * spu-linux-nat.c: Update. * x86-linux-nat.c: Update. * xtensa-linux-nat.c: Update. gdb/gdbserver/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * linux-low.c: Update. * linux-mips-low.c: Update. * lynx-low.c: Update. * nto-low.c: Update. * remote-utils.c: Update. * server.c: Update. * spu-low.c: Update. * target.c: Update. * thread-db.c: Update.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r--gdb/ppc-linux-nat.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 09cb247..9719a0e 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1224,7 +1224,7 @@ have_ptrace_hwdebug_interface (void)
{
int tid;
- tid = ptid_get_lwp (inferior_ptid);
+ tid = inferior_ptid.lwp ();
if (tid == 0)
tid = inferior_ptid.pid ();
@@ -1296,7 +1296,7 @@ ppc_linux_nat_target::can_use_hw_breakpoint (enum bptype type, int cnt, int ot)
/* We need to know whether ptrace supports PTRACE_SET_DEBUGREG
and whether the target has DABR. If either answer is no, the
ptrace call will return -1. Fail in that case. */
- tid = ptid_get_lwp (ptid);
+ tid = ptid.lwp ();
if (tid == 0)
tid = ptid.pid ();
@@ -1508,7 +1508,7 @@ ppc_linux_nat_target::insert_hw_breakpoint (struct gdbarch *gdbarch,
}
ALL_LWPS (lp)
- hwdebug_insert_point (&p, ptid_get_lwp (lp->ptid));
+ hwdebug_insert_point (&p, lp->ptid.lwp ());
return 0;
}
@@ -1544,7 +1544,7 @@ ppc_linux_nat_target::remove_hw_breakpoint (struct gdbarch *gdbarch,
}
ALL_LWPS (lp)
- hwdebug_remove_point (&p, ptid_get_lwp (lp->ptid));
+ hwdebug_remove_point (&p, lp->ptid.lwp ());
return 0;
}
@@ -1587,7 +1587,7 @@ ppc_linux_nat_target::insert_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
p.condition_value = 0;
ALL_LWPS (lp)
- hwdebug_insert_point (&p, ptid_get_lwp (lp->ptid));
+ hwdebug_insert_point (&p, lp->ptid.lwp ());
return 0;
}
@@ -1615,7 +1615,7 @@ ppc_linux_nat_target::remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask,
p.condition_value = 0;
ALL_LWPS (lp)
- hwdebug_remove_point (&p, ptid_get_lwp (lp->ptid));
+ hwdebug_remove_point (&p, lp->ptid.lwp ());
return 0;
}
@@ -1625,7 +1625,7 @@ static int
can_use_watchpoint_cond_accel (void)
{
struct thread_points *p;
- int tid = ptid_get_lwp (inferior_ptid);
+ int tid = inferior_ptid.lwp ();
int cnt = hwdebug_info.num_condition_regs, i;
CORE_ADDR tmp_value;
@@ -1879,7 +1879,7 @@ ppc_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
create_watchpoint_request (&p, addr, len, type, cond, 1);
ALL_LWPS (lp)
- hwdebug_insert_point (&p, ptid_get_lwp (lp->ptid));
+ hwdebug_insert_point (&p, lp->ptid.lwp ());
ret = 0;
}
@@ -1923,7 +1923,7 @@ ppc_linux_nat_target::insert_watchpoint (CORE_ADDR addr, int len,
saved_dabr_value = dabr_value;
ALL_LWPS (lp)
- if (ptrace (PTRACE_SET_DEBUGREG, ptid_get_lwp (lp->ptid), 0,
+ if (ptrace (PTRACE_SET_DEBUGREG, lp->ptid.lwp (), 0,
saved_dabr_value) < 0)
return -1;
@@ -1948,7 +1948,7 @@ ppc_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len,
create_watchpoint_request (&p, addr, len, type, cond, 0);
ALL_LWPS (lp)
- hwdebug_remove_point (&p, ptid_get_lwp (lp->ptid));
+ hwdebug_remove_point (&p, lp->ptid.lwp ());
ret = 0;
}
@@ -1956,7 +1956,7 @@ ppc_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len,
{
saved_dabr_value = 0;
ALL_LWPS (lp)
- if (ptrace (PTRACE_SET_DEBUGREG, ptid_get_lwp (lp->ptid), 0,
+ if (ptrace (PTRACE_SET_DEBUGREG, lp->ptid.lwp (), 0,
saved_dabr_value) < 0)
return -1;
@@ -1969,7 +1969,7 @@ ppc_linux_nat_target::remove_watchpoint (CORE_ADDR addr, int len,
void
ppc_linux_nat_target::low_new_thread (struct lwp_info *lp)
{
- int tid = ptid_get_lwp (lp->ptid);
+ int tid = lp->ptid.lwp ();
if (have_ptrace_hwdebug_interface ())
{
@@ -2008,7 +2008,7 @@ static void
ppc_linux_thread_exit (struct thread_info *tp, int silent)
{
int i;
- int tid = ptid_get_lwp (tp->ptid);
+ int tid = tp->ptid.lwp ();
struct hw_break_tuple *hw_breaks;
struct thread_points *t = NULL, *p;
@@ -2057,7 +2057,7 @@ ppc_linux_nat_target::stopped_data_address (CORE_ADDR *addr_p)
/* The index (or slot) of the *point is passed in the si_errno field. */
int slot = siginfo.si_errno;
- t = hwdebug_find_thread_points_by_tid (ptid_get_lwp (inferior_ptid), 0);
+ t = hwdebug_find_thread_points_by_tid (inferior_ptid.lwp (), 0);
/* Find out if this *point is a hardware breakpoint.
If so, we should return 0. */
@@ -2183,7 +2183,7 @@ ppc_linux_nat_target::auxv_parse (gdb_byte **readptr,
gdb_byte *endptr, CORE_ADDR *typep,
CORE_ADDR *valp)
{
- int tid = ptid_get_lwp (inferior_ptid);
+ int tid = inferior_ptid.lwp ();
if (tid == 0)
tid = inferior_ptid.pid ();
@@ -2210,7 +2210,7 @@ ppc_linux_nat_target::auxv_parse (gdb_byte **readptr,
const struct target_desc *
ppc_linux_nat_target::read_description ()
{
- int tid = ptid_get_lwp (inferior_ptid);
+ int tid = inferior_ptid.lwp ();
if (tid == 0)
tid = inferior_ptid.pid ();