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.
This commit is contained in:
Tom Tromey 2018-06-11 12:10:09 -06:00
parent e99b03dcf4
commit e38504b392
52 changed files with 263 additions and 219 deletions

View file

@ -1620,7 +1620,7 @@ rewait:
else if (ptid_equal (ptid, minus_one_ptid))
thread = inf_tid_to_thread (inf, -1);
else
thread = inf_tid_to_thread (inf, ptid_get_lwp (ptid));
thread = inf_tid_to_thread (inf, ptid.lwp ());
if (!thread || thread->port == MACH_PORT_NULL)
{
@ -2049,7 +2049,7 @@ gnu_nat_target::resume (ptid_t ptid, int step, enum gdb_signal sig)
else
/* Just allow a single thread to run. */
{
struct proc *thread = inf_tid_to_thread (inf, ptid_get_lwp (ptid));
struct proc *thread = inf_tid_to_thread (inf, ptid.lwp ());
if (!thread)
error (_("Can't run single thread id %s: no such thread!"),
@ -2060,7 +2060,7 @@ gnu_nat_target::resume (ptid_t ptid, int step, enum gdb_signal sig)
if (step)
{
step_thread = inf_tid_to_thread (inf, ptid_get_lwp (ptid));
step_thread = inf_tid_to_thread (inf, ptid.lwp ());
if (!step_thread)
warning (_("Can't step thread id %s: no such thread."),
target_pid_to_str (ptid));
@ -2293,7 +2293,7 @@ gnu_nat_target::thread_alive (ptid_t ptid)
{
inf_update_procs (gnu_current_inf);
return !!inf_tid_to_thread (gnu_current_inf,
ptid_get_lwp (ptid));
ptid.lwp ());
}
@ -2716,7 +2716,7 @@ const char *
gnu_nat_target::pid_to_str (ptid_t ptid)
{
struct inf *inf = gnu_current_inf;
int tid = ptid_get_lwp (ptid);
int tid = ptid.lwp ();
struct proc *thread = inf_tid_to_thread (inf, tid);
if (thread)
@ -2818,7 +2818,7 @@ cur_thread (void)
{
struct inf *inf = cur_inf ();
struct proc *thread = inf_tid_to_thread (inf,
ptid_get_lwp (inferior_ptid));
inferior_ptid.lwp ());
if (!thread)
error (_("No current thread."));
return thread;
@ -3018,7 +3018,7 @@ set_sig_thread_cmd (const char *args, int from_tty)
else
{
struct thread_info *tp = parse_thread_id (args, NULL);
inf->signal_thread = inf_tid_to_thread (inf, ptid_get_lwp (tp->ptid));
inf->signal_thread = inf_tid_to_thread (inf, tp->ptid.lwp ());
}
}