aboutsummaryrefslogtreecommitdiff
path: root/gdb/inf-ptrace.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/inf-ptrace.c
parentfd79271bd9dd6bb1626fb6f5ec3a415dc24950b1 (diff)
downloadgdb-f2907e49910853edf3c1aec995b3c44b3bba8999.zip
gdb-f2907e49910853edf3c1aec995b3c44b3bba8999.tar.gz
gdb-f2907e49910853edf3c1aec995b3c44b3bba8999.tar.bz2
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/inf-ptrace.c')
-rw-r--r--gdb/inf-ptrace.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index 945af83..3b32b67 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -131,7 +131,7 @@ inf_ptrace_target::create_inferior (const char *exec_file,
pid = fork_inferior (exec_file, allargs, env, inf_ptrace_me, NULL,
NULL, NULL, NULL);
- ptid = pid_to_ptid (pid);
+ ptid = ptid_t (pid);
/* We have something that executes now. We'll be running through
the shell at this point (if startup-with-shell is true), but the
pid shouldn't change. */
@@ -213,10 +213,10 @@ inf_ptrace_target::attach (const char *args, int from_tty)
if (exec_file)
printf_unfiltered (_("Attaching to program: %s, %s\n"), exec_file,
- target_pid_to_str (pid_to_ptid (pid)));
+ target_pid_to_str (ptid_t (pid)));
else
printf_unfiltered (_("Attaching to %s\n"),
- target_pid_to_str (pid_to_ptid (pid)));
+ target_pid_to_str (ptid_t (pid)));
gdb_flush (gdb_stdout);
}
@@ -233,7 +233,7 @@ inf_ptrace_target::attach (const char *args, int from_tty)
inf = current_inferior ();
inferior_appeared (inf, pid);
inf->attach_flag = 1;
- inferior_ptid = pid_to_ptid (pid);
+ inferior_ptid = ptid_t (pid);
/* Always add a main thread. If some target extends the ptrace
target, it should decorate the ptid later with more info. */
@@ -428,7 +428,7 @@ inf_ptrace_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
{
case PTRACE_FORK:
ourstatus->kind = TARGET_WAITKIND_FORKED;
- ourstatus->value.related_pid = pid_to_ptid (pe.pe_other_pid);
+ ourstatus->value.related_pid = ptid_t (pe.pe_other_pid);
/* Make sure the other end of the fork is stopped too. */
fpid = waitpid (pe.pe_other_pid, &status, 0);
@@ -443,17 +443,17 @@ inf_ptrace_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
gdb_assert (pe.pe_other_pid == pid);
if (fpid == ptid_get_pid (inferior_ptid))
{
- ourstatus->value.related_pid = pid_to_ptid (pe.pe_other_pid);
- return pid_to_ptid (fpid);
+ ourstatus->value.related_pid = ptid_t (pe.pe_other_pid);
+ return ptid_t (fpid);
}
- return pid_to_ptid (pid);
+ return ptid_t (pid);
}
}
#endif
store_waitstatus (ourstatus, status);
- return pid_to_ptid (pid);
+ return ptid_t (pid);
}
/* Transfer data via ptrace into process PID's memory from WRITEBUF, or