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/nat | |
parent | f2907e49910853edf3c1aec995b3c44b3bba8999 (diff) | |
download | gdb-e99b03dcf42606425eab8bd12eadb8aa4007f35a.zip gdb-e99b03dcf42606425eab8bd12eadb8aa4007f35a.tar.gz 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/nat')
-rw-r--r-- | gdb/nat/aarch64-linux-hw-point.c | 2 | ||||
-rw-r--r-- | gdb/nat/aarch64-linux.c | 2 | ||||
-rw-r--r-- | gdb/nat/linux-btrace.c | 4 | ||||
-rw-r--r-- | gdb/nat/linux-osdata.c | 2 | ||||
-rw-r--r-- | gdb/nat/linux-procfs.c | 4 | ||||
-rw-r--r-- | gdb/nat/x86-linux-dregs.c | 6 |
6 files changed, 10 insertions, 10 deletions
diff --git a/gdb/nat/aarch64-linux-hw-point.c b/gdb/nat/aarch64-linux-hw-point.c index 22b265e..3de3e5b 100644 --- a/gdb/nat/aarch64-linux-hw-point.c +++ b/gdb/nat/aarch64-linux-hw-point.c @@ -357,7 +357,7 @@ aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state, int is_watchpoint, unsigned int idx) { struct aarch64_dr_update_callback_param param; - ptid_t pid_ptid = ptid_t (ptid_get_pid (current_lwp_ptid ())); + ptid_t pid_ptid = ptid_t (current_lwp_ptid ().pid ()); param.is_watchpoint = is_watchpoint; param.idx = idx; diff --git a/gdb/nat/aarch64-linux.c b/gdb/nat/aarch64-linux.c index 35ecdc2..c3c29a0 100644 --- a/gdb/nat/aarch64-linux.c +++ b/gdb/nat/aarch64-linux.c @@ -47,7 +47,7 @@ aarch64_linux_prepare_to_resume (struct lwp_info *lwp) ptid_t ptid = ptid_of_lwp (lwp); int tid = ptid_get_lwp (ptid); struct aarch64_debug_reg_state *state - = aarch64_get_debug_reg_state (ptid_get_pid (ptid)); + = aarch64_get_debug_reg_state (ptid.pid ()); if (show_debug_regs) debug_printf ("prepare_to_resume thread %d\n", tid); diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c index 8eadf7a..b2c30b3 100644 --- a/gdb/nat/linux-btrace.c +++ b/gdb/nat/linux-btrace.c @@ -471,7 +471,7 @@ linux_enable_bts (ptid_t ptid, const struct btrace_config_bts *conf) pid = ptid_get_lwp (ptid); if (pid == 0) - pid = ptid_get_pid (ptid); + pid = ptid.pid (); errno = 0; scoped_fd fd (syscall (SYS_perf_event_open, &bts->attr, pid, -1, -1, 0)); @@ -587,7 +587,7 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf) pid = ptid_get_lwp (ptid); if (pid == 0) - pid = ptid_get_pid (ptid); + pid = ptid.pid (); gdb::unique_xmalloc_ptr<btrace_target_info> tinfo (XCNEW (btrace_target_info)); diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c index 1f3a911..358a89e 100644 --- a/gdb/nat/linux-osdata.c +++ b/gdb/nat/linux-osdata.c @@ -70,7 +70,7 @@ linux_common_core_of_thread (ptid_t ptid) int core; sprintf (filename, "/proc/%lld/task/%lld/stat", - (PID_T) ptid_get_pid (ptid), (PID_T) ptid_get_lwp (ptid)); + (PID_T) ptid.pid (), (PID_T) ptid_get_lwp (ptid)); gdb_file_up f = gdb_fopen_cloexec (filename, "r"); if (!f) return -1; diff --git a/gdb/nat/linux-procfs.c b/gdb/nat/linux-procfs.c index 5a94641..a672cdf 100644 --- a/gdb/nat/linux-procfs.c +++ b/gdb/nat/linux-procfs.c @@ -239,8 +239,8 @@ linux_proc_tid_get_name (ptid_t ptid) static char comm_buf[TASK_COMM_LEN]; char comm_path[100]; const char *comm_val; - pid_t pid = ptid_get_pid (ptid); - pid_t tid = ptid_lwp_p (ptid) ? ptid_get_lwp (ptid) : ptid_get_pid (ptid); + pid_t pid = ptid.pid (); + pid_t tid = ptid_lwp_p (ptid) ? ptid_get_lwp (ptid) : ptid.pid (); xsnprintf (comm_path, sizeof (comm_path), "/proc/%ld/task/%ld/comm", (long) pid, (long) tid); diff --git a/gdb/nat/x86-linux-dregs.c b/gdb/nat/x86-linux-dregs.c index 9865ac6..d362c30 100644 --- a/gdb/nat/x86-linux-dregs.c +++ b/gdb/nat/x86-linux-dregs.c @@ -102,7 +102,7 @@ x86_linux_dr_get_addr (int regnum) void x86_linux_dr_set_addr (int regnum, CORE_ADDR addr) { - ptid_t pid_ptid = ptid_t (ptid_get_pid (current_lwp_ptid ())); + ptid_t pid_ptid = ptid_t (current_lwp_ptid ().pid ()); gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR); @@ -122,7 +122,7 @@ x86_linux_dr_get_control (void) void x86_linux_dr_set_control (unsigned long control) { - ptid_t pid_ptid = ptid_t (ptid_get_pid (current_lwp_ptid ())); + ptid_t pid_ptid = ptid_t (current_lwp_ptid ().pid ()); iterate_over_lwps (pid_ptid, update_debug_registers_callback, NULL); } @@ -148,7 +148,7 @@ x86_linux_update_debug_registers (struct lwp_info *lwp) if (lwp_debug_registers_changed (lwp)) { struct x86_debug_reg_state *state - = x86_debug_reg_state (ptid_get_pid (ptid)); + = x86_debug_reg_state (ptid.pid ()); int i; /* Prior to Linux kernel 2.6.33 commit |