Remove ptid_build

This removes ptid_build in favor of simply calling the ptid_t
constructor directly.

gdb/ChangeLog
2018-07-03  Tom Tromey  <tom@tromey.com>

	* common/ptid.h (ptid_build): Don't declare.
	* common/ptid.c (ptid_build): Remove.
	* aix-thread.c: Update.
	* bsd-kvm.c: Update.
	* bsd-uthread.c: Update.
	* common/agent.c: Update.
	* common/ptid.c: Update.
	* common/ptid.h: Update.
	* corelow.c: Update.
	* darwin-nat.c: Update.
	* fbsd-nat.c: Update.
	* gnu-nat.c: Update.
	* linux-fork.c: Update.
	* linux-nat.c: Update.
	* linux-thread-db.c: Update.
	* nat/linux-osdata.c: Update.
	* nat/linux-procfs.c: Update.
	* nto-procfs.c: Update.
	* obsd-nat.c: Update.
	* proc-service.c: Update.
	* procfs.c: Update.
	* ravenscar-thread.c: Update.
	* remote-sim.c: Update.
	* remote.c: Update.
	* sol-thread.c: Update.
	* target.c: Update.
	* windows-nat.c: Update.

gdb/gdbserver/ChangeLog
2018-07-03  Tom Tromey  <tom@tromey.com>

	* linux-low.c: Update.
	* lynx-low.c: Update.
	* nto-low.c: Update.
	* remote-utils.c: Update.
	* spu-low.c: Update.
	* thread-db.c: Update.
	* win32-low.c: Update.
This commit is contained in:
Tom Tromey
2018-06-11 11:18:51 -06:00
parent 057302ceb3
commit fd79271bd9
33 changed files with 157 additions and 130 deletions

View File

@ -325,7 +325,7 @@ thread_to_lwp (ptid_t thread_id, int default_lwp)
td_state_string (ti.ti_state));
}
return ptid_build (ptid_get_pid (thread_id), ti.ti_lid, 0);
return ptid_t (ptid_get_pid (thread_id), ti.ti_lid, 0);
}
/* Convert an LWP ID into a POSIX or Solaris thread ID. If LWP_ID
@ -366,7 +366,7 @@ lwp_to_thread (ptid_t lwp)
else if (val != TD_OK)
error (_("lwp_to_thread: td_thr_get_info: %s."), td_err_string (val));
return ptid_build (ptid_get_pid (lwp), 0 , ti.ti_tid);
return ptid_t (ptid_get_pid (lwp), 0 , ti.ti_tid);
}
@ -849,7 +849,7 @@ ps_ptwrite (struct ps_prochandle *ph, psaddr_t addr,
ps_err_e
ps_lgetregs (struct ps_prochandle *ph, lwpid_t lwpid, prgregset_t gregset)
{
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
struct regcache *regcache
= get_thread_arch_regcache (ptid, target_gdbarch ());
@ -865,7 +865,7 @@ ps_err_e
ps_lsetregs (struct ps_prochandle *ph, lwpid_t lwpid,
const prgregset_t gregset)
{
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
struct regcache *regcache
= get_thread_arch_regcache (ptid, target_gdbarch ());
@ -917,7 +917,7 @@ ps_err_e
ps_lgetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
prfpregset_t *fpregset)
{
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
struct regcache *regcache
= get_thread_arch_regcache (ptid, target_gdbarch ());
@ -933,7 +933,7 @@ ps_err_e
ps_lsetfpregs (struct ps_prochandle *ph, lwpid_t lwpid,
const prfpregset_t * fpregset)
{
ptid_t ptid = ptid_build (ptid_get_pid (inferior_ptid), lwpid, 0);
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid), lwpid, 0);
struct regcache *regcache
= get_thread_arch_regcache (ptid, target_gdbarch ());
@ -982,7 +982,7 @@ ps_lgetLDT (struct ps_prochandle *ph, lwpid_t lwpid,
if (ptid_get_pid (inferior_ptid) <= 0 || lwpid <= 0)
return PS_BADLID;
ret = procfs_find_LDT_entry (ptid_build (ptid_get_pid (inferior_ptid),
ret = procfs_find_LDT_entry (ptid_t (ptid_get_pid (inferior_ptid),
lwpid, 0));
if (ret)
{
@ -1042,7 +1042,7 @@ sol_update_thread_list_callback (const td_thrhandle_t *th, void *ignored)
if (retval != TD_OK)
return -1;
ptid = ptid_build (ptid_get_pid (inferior_ptid), 0, ti.ti_tid);
ptid = ptid_t (ptid_get_pid (inferior_ptid), 0, ti.ti_tid);
if (!in_thread_list (ptid) || is_exited (ptid))
add_thread (ptid);