aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
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/nat
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/nat')
-rw-r--r--gdb/nat/aarch64-linux-hw-point.c2
-rw-r--r--gdb/nat/aarch64-linux.c2
-rw-r--r--gdb/nat/linux-btrace.c4
-rw-r--r--gdb/nat/linux-osdata.c2
-rw-r--r--gdb/nat/linux-procfs.c2
-rw-r--r--gdb/nat/x86-linux-dregs.c4
6 files changed, 8 insertions, 8 deletions
diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c
index 3de3e5b..18b5af2 100644
--- a/gdb/nat/aarch64-linux-hw-point.c
+++ b/gdb/nat/aarch64-linux-hw-point.c
@@ -296,7 +296,7 @@ debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
{
struct aarch64_dr_update_callback_param *param_p
= (struct aarch64_dr_update_callback_param *) ptr;
- int tid = ptid_get_lwp (ptid_of_lwp (lwp));
+ int tid = ptid_of_lwp (lwp).lwp ();
int idx = param_p->idx;
int is_watchpoint = param_p->is_watchpoint;
struct arch_lwp_info *info = lwp_arch_private_info (lwp);
diff --git a/gdb/nat/aarch64-linux.c b/gdb/nat/aarch64-linux.c
index c3c29a0..0f2c801 100644
--- a/gdb/nat/aarch64-linux.c
+++ b/gdb/nat/aarch64-linux.c
@@ -45,7 +45,7 @@ aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
|| DR_HAS_CHANGED (info->dr_changed_wp))
{
ptid_t ptid = ptid_of_lwp (lwp);
- int tid = ptid_get_lwp (ptid);
+ int tid = ptid.lwp ();
struct aarch64_debug_reg_state *state
= aarch64_get_debug_reg_state (ptid.pid ());
diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c
index b2c30b3..83afe88 100644
--- a/gdb/nat/linux-btrace.c
+++ b/gdb/nat/linux-btrace.c
@@ -469,7 +469,7 @@ linux_enable_bts (ptid_t ptid, const struct btrace_config_bts *conf)
bts->attr.exclude_hv = 1;
bts->attr.exclude_idle = 1;
- pid = ptid_get_lwp (ptid);
+ pid = ptid.lwp ();
if (pid == 0)
pid = ptid.pid ();
@@ -585,7 +585,7 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf)
size_t pages;
int pid, pg;
- pid = ptid_get_lwp (ptid);
+ pid = ptid.lwp ();
if (pid == 0)
pid = ptid.pid ();
diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c
index 358a89e..25e895d 100644
--- a/gdb/nat/linux-osdata.c
+++ b/gdb/nat/linux-osdata.c
@@ -70,7 +70,7 @@ linux_common_core_of_thread (ptid_t ptid)
int core;
sprintf (filename, "/proc/%lld/task/%lld/stat",
- (PID_T) ptid.pid (), (PID_T) ptid_get_lwp (ptid));
+ (PID_T) ptid.pid (), (PID_T) ptid.lwp ());
gdb_file_up f = gdb_fopen_cloexec (filename, "r");
if (!f)
return -1;
diff --git a/gdb/nat/linux-procfs.c b/gdb/nat/linux-procfs.c
index a672cdf..20708fa 100644
--- a/gdb/nat/linux-procfs.c
+++ b/gdb/nat/linux-procfs.c
@@ -240,7 +240,7 @@ linux_proc_tid_get_name (ptid_t ptid)
char comm_path[100];
const char *comm_val;
pid_t pid = ptid.pid ();
- pid_t tid = ptid_lwp_p (ptid) ? ptid_get_lwp (ptid) : ptid.pid ();
+ pid_t tid = ptid_lwp_p (ptid) ? ptid.lwp () : ptid.pid ();
xsnprintf (comm_path, sizeof (comm_path),
"/proc/%ld/task/%ld/comm", (long) pid, (long) tid);
diff --git a/gdb/nat/x86-linux-dregs.c b/gdb/nat/x86-linux-dregs.c
index d362c30..8aa8717 100644
--- a/gdb/nat/x86-linux-dregs.c
+++ b/gdb/nat/x86-linux-dregs.c
@@ -44,7 +44,7 @@ x86_linux_dr_get (ptid_t ptid, int regnum)
unsigned long value;
gdb_assert (ptid_lwp_p (ptid));
- tid = ptid_get_lwp (ptid);
+ tid = ptid.lwp ();
errno = 0;
value = ptrace (PTRACE_PEEKUSER, tid, u_debugreg_offset (regnum), 0);
@@ -62,7 +62,7 @@ x86_linux_dr_set (ptid_t ptid, int regnum, unsigned long value)
int tid;
gdb_assert (ptid_lwp_p (ptid));
- tid = ptid_get_lwp (ptid);
+ tid = ptid.lwp ();
errno = 0;
ptrace (PTRACE_POKEUSER, tid, u_debugreg_offset (regnum), value);