Fix gdbserver regression exposed by gdb.threads/multi-create-ns-info-thr.exp
[deliverable/binutils-gdb.git] / gdb / gdbserver / gdbthread.h
index 9785d67a52ca86d75e3da1c8be28778f59a7114b..a864f958848c801c5b4388f0ca8eb2d54c494a8f 100644 (file)
@@ -1,5 +1,5 @@
 /* Multi-thread control defs for remote server for GDB.
-   Copyright (C) 1993-2014 Free Software Foundation, Inc.
+   Copyright (C) 1993-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #ifndef GDB_THREAD_H
 #define GDB_THREAD_H
 
-#include "server.h"
+#include "common-gdbthread.h"
 #include "inferiors.h"
 
 struct btrace_target_info;
+struct regcache;
 
 struct thread_info
 {
@@ -31,7 +32,7 @@ struct thread_info
   struct inferior_list_entry entry;
 
   void *target_data;
-  void *regcache_data;
+  struct regcache *regcache_data;
 
   /* The last resume GDB requested on this thread.  */
   enum resume_kind last_resume_kind;
@@ -80,7 +81,14 @@ struct thread_info *get_first_thread (void);
 
 struct thread_info *find_thread_ptid (ptid_t ptid);
 
+/* Find any thread of the PID process.  Returns NULL if none is
+   found.  */
+struct thread_info *find_any_thread_of_pid (int pid);
+
 /* Get current thread ID (Linux task ID).  */
-#define current_ptid (current_inferior->entry.id)
+#define current_ptid (current_thread->entry.id)
+
+/* Create a cleanup to restore current_thread.  */
+struct cleanup *make_cleanup_restore_current_thread (void);
 
 #endif /* GDB_THREAD_H */
This page took 0.027107 seconds and 4 git commands to generate.