summaryrefslogtreecommitdiff
path: root/gdb/sol-thread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-06-11 11:25:49 -0600
committerTom Tromey <tom@tromey.com>2018-07-03 11:36:42 -0600
commitf2907e49910853edf3c1aec995b3c44b3bba8999 (patch)
tree7352a0fdbe482ea1e7c60ed5bc37f00ceb17287d /gdb/sol-thread.c
parentfd79271bd9dd6bb1626fb6f5ec3a415dc24950b1 (diff)
downloadbinutils-gdb-f2907e49910853edf3c1aec995b3c44b3bba8999.tar.gz
Remove pid_to_ptid
This removes pid_to_ptid in favor of calling the ptid_t constructor directly. gdb/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * common/ptid.c (pid_to_ptid): Remove. * common/ptid.h (pid_to_ptid): Don't declare. * aix-thread.c: Update. * arm-linux-nat.c: Update. * common/ptid.c: Update. * common/ptid.h: Update. * corelow.c: Update. * ctf.c: Update. * darwin-nat.c: Update. * fbsd-nat.c: Update. * fork-child.c: Update. * gnu-nat.c: Update. * go32-nat.c: Update. * inf-ptrace.c: Update. * infcmd.c: Update. * inferior.c: Update. * infrun.c: Update. * linux-fork.c: Update. * linux-nat.c: Update. * nat/aarch64-linux-hw-point.c: Update. * nat/fork-inferior.c: Update. * nat/x86-linux-dregs.c: Update. * nto-procfs.c: Update. * obsd-nat.c: Update. * procfs.c: Update. * progspace.c: Update. * remote.c: Update. * rs6000-nat.c: Update. * s390-linux-nat.c: Update. * sol-thread.c: Update. * spu-linux-nat.c: Update. * target.c: Update. * top.c: Update. * tracefile-tfile.c: Update. * windows-nat.c: Update. gdb/gdbserver/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * linux-low.c: Update. * linux-ppc-low.c: Update. * linux-x86-low.c: Update. * proc-service.c: Update. * server.c: Update. * spu-low.c: Update. * thread-db.c: Update. * win32-low.c: Update.
Diffstat (limited to 'gdb/sol-thread.c')
-rw-r--r--gdb/sol-thread.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index d67fd8352f6..85d3ad92ff5 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -307,20 +307,20 @@ thread_to_lwp (ptid_t thread_id, int default_lwp)
val = p_td_ta_map_id2thr (main_ta, ptid_get_tid (thread_id), &th);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* Thread must have terminated. */
+ return ptid_t (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error (_("thread_to_lwp: td_ta_map_id2thr %s"), td_err_string (val));
val = p_td_thr_get_info (&th, &ti);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* Thread must have terminated. */
+ return ptid_t (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error (_("thread_to_lwp: td_thr_get_info: %s"), td_err_string (val));
if (ti.ti_state != TD_THR_ACTIVE)
{
if (default_lwp != -1)
- return pid_to_ptid (default_lwp);
+ return ptid_t (default_lwp);
error (_("thread_to_lwp: thread state not active: %s"),
td_state_string (ti.ti_state));
}
@@ -346,11 +346,11 @@ lwp_to_thread (ptid_t lwp)
/* It's an LWP. Convert it to a thread ID. */
if (!target_thread_alive (lwp))
- return pid_to_ptid (-1); /* Must be a defunct LPW. */
+ return ptid_t (-1); /* Must be a defunct LPW. */
val = p_td_ta_map_lwp2thr (main_ta, ptid_get_lwp (lwp), &th);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* Thread must have terminated. */
+ return ptid_t (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error (_("lwp_to_thread: td_ta_map_lwp2thr: %s."), td_err_string (val));
@@ -362,7 +362,7 @@ lwp_to_thread (ptid_t lwp)
val = p_td_thr_get_info (&th, &ti);
if (val == TD_NOTHR)
- return pid_to_ptid (-1); /* Thread must have terminated. */
+ return ptid_t (-1); /* Thread must have terminated. */
else if (val != TD_OK)
error (_("lwp_to_thread: td_thr_get_info: %s."), td_err_string (val));
@@ -387,7 +387,7 @@ sol_thread_target::detach (inferior *inf, int from_tty)
target_ops *beneath = this->beneath ();
sol_thread_active = 0;
- inferior_ptid = pid_to_ptid (ptid_get_pid (main_ph.ptid));
+ inferior_ptid = ptid_t (ptid_get_pid (main_ph.ptid));
unpush_target (this);
beneath->detach (inf, from_tty);
}