mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
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>
This commit is contained in:
committed by
Simon Marchi
parent
3c8af02fa0
commit
9213a6d79a
15
gdb/thread.c
15
gdb/thread.c
@@ -514,17 +514,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user