/* 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.
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>
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
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);
/* 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. */
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 */