Add target method for converting thread handle to thread_info struct pointer
[deliverable/binutils-gdb.git] / gdb / thread.c
index 2539d4331469af6fd5918dbaae1b2fb2d0a31507..f447a9606ebb37dfa2b06c054acf267671d34081 100644 (file)
@@ -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.
  *
This page took 0.025138 seconds and 4 git commands to generate.