aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-aarch64-low.c
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2017-11-24 10:04:53 +0000
committerAlan Hayward <alan.hayward@arm.com>2017-11-24 11:18:19 +0000
commitd6d7ce56231ca8c233e64b2ebcb910fe334d6ff8 (patch)
treed2e3674fb8491400f19f656a63397f2691525649 /gdb/gdbserver/linux-aarch64-low.c
parentda434ccbc3e0ed843700790cd16c1d4bb5882460 (diff)
downloadgdb-d6d7ce56231ca8c233e64b2ebcb910fe334d6ff8.zip
gdb-d6d7ce56231ca8c233e64b2ebcb910fe334d6ff8.tar.gz
gdb-d6d7ce56231ca8c233e64b2ebcb910fe334d6ff8.tar.bz2
gdbserver: add aarch64_create_target_description
gdbserver/ * configure.srv: Add new files. * linux-aarch64-ipa.c (get_ipa_tdesc): Call aarch64_linux_read_description. * linux-aarch64-low.c (aarch64_linux_read_description): Merge with aarch64_arch_setup. (aarch64_arch_setup): Call aarch64_linux_read_description. * linux-aarch64-tdesc.c: New file. * linux-aarch64-tdesc.h: New file.
Diffstat (limited to 'gdb/gdbserver/linux-aarch64-low.c')
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index b00d5c5..dcce287 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -39,10 +39,10 @@
#include "gdb_proc_service.h"
#include "arch/aarch64.h"
+#include "linux-aarch64-tdesc.h"
/* 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>
@@ -467,11 +467,10 @@ aarch64_linux_new_fork (struct process_info *parent,
*child->priv->arch_private = *parent->priv->arch_private;
}
-/* Return the right target description according to the ELF file of
- current thread. */
+/* Implementation of linux_target_ops method "arch_setup". */
-static const struct target_desc *
-aarch64_linux_read_description (void)
+static void
+aarch64_arch_setup (void)
{
unsigned int machine;
int is_elf64;
@@ -482,17 +481,9 @@ aarch64_linux_read_description (void)
is_elf64 = linux_pid_exe_is_elf_64_file (tid, &machine);
if (is_elf64)
- return tdesc_aarch64;
+ current_process ()->tdesc = aarch64_linux_read_description ();
else
- return tdesc_arm_with_neon;
-}
-
-/* Implementation of linux_target_ops method "arch_setup". */
-
-static void
-aarch64_arch_setup (void)
-{
- current_process ()->tdesc = aarch64_linux_read_description ();
+ current_process ()->tdesc = tdesc_arm_with_neon;
aarch64_linux_get_debug_reg_capacity (lwpid_of (current_thread));
}