diff options
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 2539d43..f447a96 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -519,6 +519,7 @@ find_thread_id (struct inferior *inf, int thr_num) } /* Find a thread_info by matching PTID. */ + struct thread_info * find_thread_ptid (ptid_t ptid) { @@ -531,6 +532,17 @@ find_thread_ptid (ptid_t ptid) return NULL; } +/* See gdbthread.h. */ + +struct thread_info * +find_thread_by_handle (struct value *thread_handle, struct inferior *inf) +{ + return target_thread_handle_to_thread_info + (value_contents_all (thread_handle), + TYPE_LENGTH (value_type (thread_handle)), + inf); +} + /* * Thread iterator function. * |