diff options
author | Tom Tromey <tom@tromey.com> | 2018-06-11 12:14:34 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-03 11:36:44 -0600 |
commit | cc6bcb548d67a5a0a7223d81bd43c299312320c8 (patch) | |
tree | 205be2c55d1a8f204d8e7d0b3d14a69b2253f0b1 /gdb/windows-nat.c | |
parent | e38504b39279fa86cbb2c4a45ab8ec34e3aef90b (diff) | |
download | gdb-cc6bcb548d67a5a0a7223d81bd43c299312320c8.zip gdb-cc6bcb548d67a5a0a7223d81bd43c299312320c8.tar.gz gdb-cc6bcb548d67a5a0a7223d81bd43c299312320c8.tar.bz2 |
Remove ptid_get_tid
This removes ptid_get_tid in favor of calling the ptid_t::tid method.
gdb/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* common/ptid.c (ptid_get_tid): Remove.
* common/ptid.h (ptid_get_tid): Don't declare.
* ada-tasks.c: Update.
* aix-thread.c: Update.
* bsd-uthread.c: Update.
* darwin-nat.c: Update.
* fbsd-nat.c: Update.
* i386-darwin-nat.c: Update.
* infrun.c: Update.
* linux-tdep.c: Update.
* nto-procfs.c: Update.
* ppc-ravenscar-thread.c: Update.
* python/py-infthread.c: Update.
* ravenscar-thread.c: Update.
* sol-thread.c: Update.
* sparc-ravenscar-thread.c: Update.
* windows-nat.c: Update.
gdb/gdbserver/ChangeLog
2018-07-03 Tom Tromey <tom@tromey.com>
* target.c: Update.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r-- | gdb/windows-nat.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 1befc3f..532d5fd 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -427,9 +427,9 @@ windows_add_thread (ptid_t ptid, HANDLE h, void *tlb) windows_thread_info *th; DWORD id; - gdb_assert (ptid_get_tid (ptid) != 0); + gdb_assert (ptid.tid () != 0); - id = ptid_get_tid (ptid); + id = ptid.tid (); if ((th = thread_rec (id, FALSE))) return th; @@ -484,9 +484,9 @@ windows_delete_thread (ptid_t ptid, DWORD exit_code) windows_thread_info *th; DWORD id; - gdb_assert (ptid_get_tid (ptid) != 0); + gdb_assert (ptid.tid () != 0); - id = ptid_get_tid (ptid); + id = ptid.tid (); if (info_verbose) printf_unfiltered ("[Deleting %s]\n", target_pid_to_str (ptid)); @@ -555,7 +555,7 @@ windows_fetch_one_register (struct regcache *regcache, void windows_nat_target::fetch_registers (struct regcache *regcache, int r) { - DWORD pid = ptid_get_tid (regcache->ptid ()); + DWORD pid = regcache->ptid ().tid (); windows_thread_info *th = thread_rec (pid, TRUE); /* Check if TH exists. Windows sometimes uses a non-existent @@ -625,7 +625,7 @@ windows_store_one_register (const struct regcache *regcache, void windows_nat_target::store_registers (struct regcache *regcache, int r) { - DWORD pid = ptid_get_tid (regcache->ptid ()); + DWORD pid = regcache->ptid ().tid (); windows_thread_info *th = thread_rec (pid, TRUE); /* Check if TH exists. Windows sometimes uses a non-existent @@ -1429,10 +1429,10 @@ windows_nat_target::resume (ptid_t ptid, int step, enum gdb_signal sig) last_sig = GDB_SIGNAL_0; DEBUG_EXEC (("gdb: windows_resume (pid=%d, tid=%ld, step=%d, sig=%d);\n", - ptid.pid (), ptid_get_tid (ptid), step, sig)); + ptid.pid (), ptid.tid (), step, sig)); /* Get context for currently selected thread. */ - th = thread_rec (ptid_get_tid (inferior_ptid), FALSE); + th = thread_rec (inferior_ptid.tid (), FALSE); if (th) { if (step) @@ -1466,7 +1466,7 @@ windows_nat_target::resume (ptid_t ptid, int step, enum gdb_signal sig) if (resume_all) windows_continue (continue_status, -1, 0); else - windows_continue (continue_status, ptid_get_tid (ptid), 0); + windows_continue (continue_status, ptid.tid (), 0); } /* Ctrl-C handler used when the inferior is not run in the same console. The @@ -2917,10 +2917,10 @@ windows_nat_target::pid_to_str (ptid_t ptid) { static char buf[80]; - if (ptid_get_tid (ptid) != 0) + if (ptid.tid () != 0) { snprintf (buf, sizeof (buf), "Thread %d.0x%lx", - ptid.pid (), ptid_get_tid (ptid)); + ptid.pid (), ptid.tid ()); return buf; } @@ -3007,7 +3007,7 @@ windows_nat_target::get_tib_address (ptid_t ptid, CORE_ADDR *addr) { windows_thread_info *th; - th = thread_rec (ptid_get_tid (ptid), 0); + th = thread_rec (ptid.tid (), 0); if (th == NULL) return false; @@ -3028,7 +3028,7 @@ windows_nat_target::get_ada_task_ptid (long lwp, long thread) const char * windows_nat_target::thread_name (struct thread_info *thr) { - return thread_rec (ptid_get_tid (thr->ptid), 0)->name; + return thread_rec (thr->ptid.tid (), 0)->name; } @@ -3188,8 +3188,8 @@ windows_nat_target::thread_alive (ptid_t ptid) { int tid; - gdb_assert (ptid_get_tid (ptid) != 0); - tid = ptid_get_tid (ptid); + gdb_assert (ptid.tid () != 0); + tid = ptid.tid (); return WaitForSingleObject (thread_rec (tid, FALSE)->h, 0) != WAIT_OBJECT_0; } |