aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.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/infrun.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/infrun.c')
-rw-r--r--gdb/infrun.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 2eb25c0..b77e40d 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -462,7 +462,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
if (print_inferior_events)
{
/* Ensure that we have a process ptid. */
- ptid_t process_ptid = pid_to_ptid (ptid_get_pid (child_ptid));
+ ptid_t process_ptid = ptid_t (ptid_get_pid (child_ptid));
target_terminal::ours_for_output ();
fprintf_filtered (gdb_stdlog,
@@ -598,7 +598,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
if (print_inferior_events)
{
/* Ensure that we have a process ptid. */
- ptid_t process_ptid = pid_to_ptid (ptid_get_pid (parent_ptid));
+ ptid_t process_ptid = ptid_t (ptid_get_pid (parent_ptid));
target_terminal::ours_for_output ();
fprintf_filtered (gdb_stdlog,
@@ -961,7 +961,7 @@ handle_vfork_child_exec_or_exit (int exec)
if (print_inferior_events)
{
const char *pidstr
- = target_pid_to_str (pid_to_ptid (inf->vfork_parent->pid));
+ = target_pid_to_str (ptid_t (inf->vfork_parent->pid));
target_terminal::ours_for_output ();
@@ -1150,7 +1150,7 @@ follow_exec (ptid_t ptid, char *exec_file_target)
update_breakpoints_after_exec ();
/* What is this a.out's name? */
- process_ptid = pid_to_ptid (pid);
+ process_ptid = ptid_t (pid);
printf_unfiltered (_("%s is executing new program: %s\n"),
target_pid_to_str (process_ptid),
exec_file_target);
@@ -2268,7 +2268,7 @@ user_visible_resume_ptid (int step)
{
/* Resume all threads of the current process (and none of other
processes). */
- resume_ptid = pid_to_ptid (ptid_get_pid (inferior_ptid));
+ resume_ptid = ptid_t (ptid_get_pid (inferior_ptid));
}
else
{
@@ -3621,7 +3621,7 @@ void
prepare_for_detach (void)
{
struct inferior *inf = current_inferior ();
- ptid_t pid_ptid = pid_to_ptid (inf->pid);
+ ptid_t pid_ptid = ptid_t (inf->pid);
displaced_step_inferior_state *displaced = get_displaced_stepping_state (inf);
@@ -4547,7 +4547,7 @@ stop_all_threads (void)
{
if (debug_infrun)
{
- ptid_t ptid = pid_to_ptid (ws.value.integer);
+ ptid_t ptid = ptid_t (ws.value.integer);
fprintf_unfiltered (gdb_stdlog,
"infrun: %s exited while "
@@ -4904,7 +4904,7 @@ handle_inferior_event_1 (struct execution_control_state *ecs)
process as not-executing so that finish_thread_state marks
them stopped (in the user's perspective) if/when we present
the stop to the user. */
- mark_ptid = pid_to_ptid (ptid_get_pid (ecs->ptid));
+ mark_ptid = ptid_t (ptid_get_pid (ecs->ptid));
}
else
mark_ptid = ecs->ptid;
@@ -7887,7 +7887,7 @@ void
print_exited_reason (struct ui_out *uiout, int exitstatus)
{
struct inferior *inf = current_inferior ();
- const char *pidstr = target_pid_to_str (pid_to_ptid (inf->pid));
+ const char *pidstr = target_pid_to_str (ptid_t (inf->pid));
annotate_exited (exitstatus);
if (exitstatus)