gdbserver: Add linux_get_hwcap
[deliverable/binutils-gdb.git] / gdb / gdbserver / linux-low.h
index be27c9229c88a7e575317b628828a32e7658bb72..d825184835d9965a629a1ad0294a8c5d3389a893 100644 (file)
@@ -1,5 +1,5 @@
 /* Internal interfaces for the GNU/Linux specific target code for gdbserver.
-   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+   Copyright (C) 2002-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,6 +16,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef GDBSERVER_LINUX_LOW_H
+#define GDBSERVER_LINUX_LOW_H
+
 #include "nat/linux-nat.h"
 #include "nat/gdb_thread_db.h"
 #include <signal.h>
@@ -37,6 +40,7 @@ enum regset_type {
   GENERAL_REGS,
   FP_REGS,
   EXTENDED_REGS,
+  OPTIONAL_REGS, /* Do not error if the regset cannot be accessed.  */
 };
 
 /* The arch's regsets array initializer must be terminated with a NULL
@@ -189,11 +193,19 @@ struct linux_target_ops
      allocate it here.  */
   struct arch_process_info * (*new_process) (void);
 
+  /* Hook to call when a process is being deleted.  If extra per-process
+     architecture-specific data is needed, delete it here.  */
+  void (*delete_process) (struct arch_process_info *info);
+
   /* Hook to call when a new thread is detected.
      If extra per-thread architecture-specific data is needed,
      allocate it here.  */
   void (*new_thread) (struct lwp_info *);
 
+  /* Hook to call when a thread is being deleted.  If extra per-thread
+     architecture-specific data is needed, delete it here.  */
+  void (*delete_thread) (struct arch_lwp_info *);
+
   /* Hook to call, if any, when a new fork is attached.  */
   void (*new_fork) (struct process_info *parent, struct process_info *child);
 
@@ -374,6 +386,9 @@ struct lwp_info
   /* The thread handle, used for e.g. TLS access.  Only valid if
      THREAD_KNOWN is set.  */
   td_thrhandle_t th;
+
+  /* The pthread_t handle.  */
+  thread_t thread_handle;
 #endif
 
   /* Arch-specific additions.  */
@@ -414,6 +429,20 @@ int thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp);
    both the clone and the parent should be stopped.  This function does
    whatever is required have the clone under thread_db's control.  */
 
-void thread_db_notice_clone (struct process_info *proc, ptid_t lwp);
+void thread_db_notice_clone (struct thread_info *parent_thr, ptid_t child_ptid);
+
+bool thread_db_thread_handle (ptid_t ptid, gdb_byte **handle, int *handle_len);
 
 extern int have_ptrace_getregset;
+
+/* Fetch the AT_HWCAP entry from the auxv vector, where entries are length
+   WORDSIZE.  If no entry was found, return zero.  */
+
+CORE_ADDR linux_get_hwcap (int wordsize);
+
+/* Fetch the AT_HWCAP2 entry from the auxv vector, where entries are length
+   WORDSIZE.  If no entry was found, return zero.  */
+
+CORE_ADDR linux_get_hwcap2 (int wordsize);
+
+#endif /* GDBSERVER_LINUX_LOW_H */
This page took 0.026348 seconds and 4 git commands to generate.