aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-aarch64-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/linux-aarch64-low.c')
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c43
1 files changed, 38 insertions, 5 deletions
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index cdf9cfd..e37f602 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -32,6 +32,7 @@
/* Defined in auto-generated files. */
void init_registers_aarch64 (void);
+extern const struct target_desc *tdesc_aarch64;
#ifdef HAVE_SYS_REG_H
#include <sys/reg.h>
@@ -1188,7 +1189,7 @@ aarch64_arch_setup (void)
struct iovec iov;
struct user_hwdebug_state dreg_state;
- init_registers_aarch64 ();
+ current_process ()->tdesc = tdesc_aarch64;
pid = lwpid_of (get_thread_lwp (current_inferior));
iov.iov_base = &dreg_state;
@@ -1235,7 +1236,7 @@ aarch64_arch_setup (void)
}
}
-struct regset_info target_regsets[] =
+static struct regset_info aarch64_regsets[] =
{
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_PRSTATUS,
sizeof (struct user_pt_regs), GENERAL_REGS,
@@ -1247,12 +1248,36 @@ struct regset_info target_regsets[] =
{ 0, 0, 0, -1, -1, NULL, NULL }
};
+static struct regsets_info aarch64_regsets_info =
+ {
+ aarch64_regsets, /* regsets */
+ 0, /* num_regsets */
+ NULL, /* disabled_regsets */
+ };
+
+static struct usrregs_info aarch64_usrregs_info =
+ {
+ AARCH64_NUM_REGS,
+ aarch64_regmap,
+ };
+
+static struct regs_info regs_info =
+ {
+ NULL, /* regset_bitmap */
+ &aarch64_usrregs_info,
+ &aarch64_regsets_info,
+ };
+
+static const struct regs_info *
+aarch64_regs_info (void)
+{
+ return &regs_info;
+}
+
struct linux_target_ops the_low_target =
{
aarch64_arch_setup,
- AARCH64_NUM_REGS,
- aarch64_regmap,
- NULL,
+ aarch64_regs_info,
aarch64_cannot_fetch_register,
aarch64_cannot_store_register,
NULL,
@@ -1274,3 +1299,11 @@ struct linux_target_ops the_low_target =
aarch64_linux_new_thread,
aarch64_linux_prepare_to_resume,
};
+
+void
+initialize_low_arch (void)
+{
+ init_registers_aarch64 ();
+
+ initialize_regsets_info (&aarch64_regsets_info);
+}