diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-03-27 12:53:55 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-04-04 21:05:31 -0400 |
commit | 9213a6d79a64446de3c176773f123d1f8b9311b4 (patch) | |
tree | 6d7374a516e68130713eccfaf3ba60611809c104 /gdb/thread.c | |
parent | 3c8af02fa0b140edcde2a65d016f565aad1a699b (diff) | |
download | gdb-9213a6d79a64446de3c176773f123d1f8b9311b4.zip gdb-9213a6d79a64446de3c176773f123d1f8b9311b4.tar.gz gdb-9213a6d79a64446de3c176773f123d1f8b9311b4.tar.bz2 |
gdb: make find_thread_ptid a process_stratum_target method
Make find_thread_ptid (the overload that takes a process_stratum_target)
a method of process_stratum_target.
Change-Id: Ib190a925a83c6b93e9c585dc7c6ab65efbdd8629
Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 38afdff..1c664bc 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -515,17 +515,6 @@ find_thread_id (struct inferior *inf, int thr_num) /* See gdbthread.h. */ struct thread_info * -find_thread_ptid (process_stratum_target *targ, ptid_t ptid) -{ - inferior *inf = find_inferior_ptid (targ, ptid); - if (inf == NULL) - return NULL; - return inf->find_thread (ptid); -} - -/* See gdbthread.h. */ - -struct thread_info * find_thread_by_handle (gdb::array_view<const gdb_byte> handle, struct inferior *inf) { @@ -598,7 +587,7 @@ valid_global_thread_id (int global_id) bool in_thread_list (process_stratum_target *targ, ptid_t ptid) { - return find_thread_ptid (targ, ptid) != nullptr; + return targ->find_thread (ptid) != nullptr; } /* Finds the first thread of the inferior. */ @@ -1333,7 +1322,7 @@ switch_to_thread (thread_info *thr) void switch_to_thread (process_stratum_target *proc_target, ptid_t ptid) { - thread_info *thr = find_thread_ptid (proc_target, ptid); + thread_info *thr = proc_target->find_thread (ptid); switch_to_thread (thr); } |