diff options
author | Tom Tromey <tom@tromey.com> | 2018-06-11 12:05:27 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-03 11:36:42 -0600 |
commit | e99b03dcf42606425eab8bd12eadb8aa4007f35a (patch) | |
tree | cce56508804d9ac552ebb678811b19008085fba7 /gdb/infrun.c | |
parent | f2907e49910853edf3c1aec995b3c44b3bba8999 (diff) | |
download | fsf-binutils-gdb-e99b03dcf42606425eab8bd12eadb8aa4007f35a.zip fsf-binutils-gdb-e99b03dcf42606425eab8bd12eadb8aa4007f35a.tar.gz fsf-binutils-gdb-e99b03dcf42606425eab8bd12eadb8aa4007f35a.tar.bz2 |
Remove ptid_get_pid
This removes ptid_get_pid in favor of calling the ptid_t::pid method.
gdb/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_get_pid): Remove.
* common/ptid.h (ptid_get_pid): Don't declare.
* aarch64-linux-nat.c: Update.
* ada-lang.c: Update.
* aix-thread.c: Update.
* alpha-bsd-nat.c: Update.
* amd64-fbsd-nat.c: Update.
* amd64-linux-nat.c: Update.
* arm-linux-nat.c: Update.
* arm-nbsd-nat.c: Update.
* auxv.c: Update.
* break-catch-syscall.c: Update.
* breakpoint.c: Update.
* bsd-uthread.c: Update.
* corelow.c: Update.
* ctf.c: Update.
* darwin-nat.c: Update.
* fbsd-nat.c: Update.
* fbsd-tdep.c: Update.
* gcore.c: Update.
* gnu-nat.c: Update.
* hppa-nbsd-nat.c: Update.
* hppa-obsd-nat.c: Update.
* i386-fbsd-nat.c: Update.
* ia64-linux-nat.c: Update.
* inf-ptrace.c: Update.
* infcmd.c: Update.
* inferior.c: Update.
* inferior.h: Update.
* inflow.c: Update.
* infrun.c: Update.
* linux-fork.c: Update.
* linux-nat.c: Update.
* linux-tdep.c: Update.
* linux-thread-db.c: Update.
* m68k-bsd-nat.c: Update.
* mi/mi-interp.c: Update.
* mi/mi-main.c: Update.
* mips-linux-nat.c: Update.
* mips-nbsd-nat.c: Update.
* mips64-obsd-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.
* nto-procfs.c: Update.
* obsd-nat.c: Update.
* ppc-linux-nat.c: Update.
* ppc-nbsd-nat.c: Update.
* ppc-obsd-nat.c: Update.
* proc-service.c: Update.
* procfs.c: Update.
* python/py-inferior.c: Update.
* python/py-infthread.c: Update.
* ravenscar-thread.c: Update.
* record.c: Update.
* remote-sim.c: Update.
* remote.c: Update.
* rs6000-nat.c: Update.
* s390-linux-nat.c: Update.
* sh-nbsd-nat.c: Update.
* sol-thread.c: Update.
* sparc-nat.c: Update.
* sparc64-tdep.c: Update.
* spu-linux-nat.c: Update.
* spu-tdep.c: Update.
* target-debug.h: Update.
* target.c: Update.
* thread.c: Update.
* tid-parse.c: Update.
* tracefile-tfile.c: Update.
* vax-bsd-nat.c: Update.
* windows-nat.c: Update.
* x86-linux-nat.c: Update.
* x86-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.
* mem-break.c: Update.
* nto-low.c: Update.
* remote-utils.c: Update.
* server.c: Update.
* spu-low.c: Update.
* target.c: Update.
* tracepoint.c: Update.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index b77e40d..f5c6ac3 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 = ptid_t (ptid_get_pid (child_ptid)); + ptid_t process_ptid = ptid_t (child_ptid.pid ()); target_terminal::ours_for_output (); fprintf_filtered (gdb_stdlog, @@ -476,7 +476,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \ struct inferior *parent_inf, *child_inf; /* Add process to GDB's tables. */ - child_inf = add_inferior (ptid_get_pid (child_ptid)); + child_inf = add_inferior (child_ptid.pid ()); parent_inf = current_inferior (); child_inf->attach_flag = parent_inf->attach_flag; @@ -563,7 +563,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \ /* Add the new inferior first, so that the target_detach below doesn't unpush the target. */ - child_inf = add_inferior (ptid_get_pid (child_ptid)); + child_inf = add_inferior (child_ptid.pid ()); parent_inf = current_inferior (); child_inf->attach_flag = parent_inf->attach_flag; @@ -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 = ptid_t (ptid_get_pid (parent_ptid)); + ptid_t process_ptid = ptid_t (parent_ptid.pid ()); target_terminal::ours_for_output (); fprintf_filtered (gdb_stdlog, @@ -1082,7 +1082,7 @@ follow_exec (ptid_t ptid, char *exec_file_target) { struct thread_info *th, *tmp; struct inferior *inf = current_inferior (); - int pid = ptid_get_pid (ptid); + int pid = ptid.pid (); ptid_t process_ptid; /* This is an exec event that we actually wish to pay attention to. @@ -1128,7 +1128,7 @@ follow_exec (ptid_t ptid, char *exec_file_target) stop provides a nicer sequence of events for user and MI notifications. */ ALL_THREADS_SAFE (th, tmp) - if (ptid_get_pid (th->ptid) == pid && !ptid_equal (th->ptid, ptid)) + if (th->ptid.pid () == pid && !ptid_equal (th->ptid, ptid)) delete_thread (th); /* We also need to clear any left over stale state for the @@ -2268,7 +2268,7 @@ user_visible_resume_ptid (int step) { /* Resume all threads of the current process (and none of other processes). */ - resume_ptid = ptid_t (ptid_get_pid (inferior_ptid)); + resume_ptid = ptid_t (inferior_ptid.pid ()); } else { @@ -3422,14 +3422,14 @@ print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid, is set. */ stb.printf ("infrun: target_wait (%d.%ld.%ld", - ptid_get_pid (waiton_ptid), + waiton_ptid.pid (), ptid_get_lwp (waiton_ptid), ptid_get_tid (waiton_ptid)); - if (ptid_get_pid (waiton_ptid) != -1) + if (waiton_ptid.pid () != -1) stb.printf (" [%s]", target_pid_to_str (waiton_ptid)); stb.printf (", status) =\n"); stb.printf ("infrun: %d.%ld.%ld [%s],\n", - ptid_get_pid (result_ptid), + result_ptid.pid (), ptid_get_lwp (result_ptid), ptid_get_tid (result_ptid), target_pid_to_str (result_ptid)); @@ -4376,7 +4376,7 @@ save_waitstatus (struct thread_info *tp, struct target_waitstatus *ws) fprintf_unfiltered (gdb_stdlog, "infrun: saving status %s for %d.%ld.%ld\n", statstr.c_str (), - ptid_get_pid (tp->ptid), + tp->ptid.pid (), ptid_get_lwp (tp->ptid), ptid_get_tid (tp->ptid)); } @@ -4613,7 +4613,7 @@ stop_all_threads (void) "infrun: target_wait %s, saving " "status for %d.%ld.%ld\n", statstr.c_str (), - ptid_get_pid (t->ptid), + t->ptid.pid (), ptid_get_lwp (t->ptid), ptid_get_tid (t->ptid)); } @@ -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 = ptid_t (ptid_get_pid (ecs->ptid)); + mark_ptid = ptid_t (ecs->ptid.pid ()); } else mark_ptid = ecs->ptid; @@ -7106,7 +7106,7 @@ switch_back_to_stepped_thread (struct execution_control_state *ecs) /* Ignore threads of processes the caller is not resuming. */ if (!sched_multi - && ptid_get_pid (tp->ptid) != ptid_get_pid (ecs->ptid)) + && tp->ptid.pid () != ecs->ptid.pid ()) continue; /* When stepping over a breakpoint, we lock all threads |