aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2017-11-24 10:20:48 +0000
committerAlan Hayward <alan.hayward@arm.com>2017-11-24 11:18:19 +0000
commit49bdb7ee48a10581e9f7254782f2eb953c4a164b (patch)
treede07ebc398a624c7c8746550b504e176b75558e0 /gdb/arch
parentd6d7ce56231ca8c233e64b2ebcb910fe334d6ff8 (diff)
downloadgdb-49bdb7ee48a10581e9f7254782f2eb953c4a164b.zip
gdb-49bdb7ee48a10581e9f7254782f2eb953c4a164b.tar.gz
gdb-49bdb7ee48a10581e9f7254782f2eb953c4a164b.tar.bz2
Use flexible target descriptors for aarch64
gdb/ * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init. * arch/aarch64.c (aarch64_create_target_description): Create new target description. * features/Makefile: Add new files. * features/aarch64.c: Remove file. * features/aarch64-core.c: New autogenerated file. * features/aarch64-fpu.c: New autogenerated file. * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64. gdbserver/ * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init. * linux-aarch64-low.c (initialize_low_arch): Remove init. * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
Diffstat (limited to 'gdb/arch')
-rw-r--r--gdb/arch/aarch64.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gdb/arch/aarch64.c b/gdb/arch/aarch64.c
index 95d9906..0126215 100644
--- a/gdb/arch/aarch64.c
+++ b/gdb/arch/aarch64.c
@@ -17,14 +17,26 @@
#include "aarch64.h"
+#include <stdlib.h>
-extern struct target_desc *tdesc_aarch64;
+#include "../features/aarch64-core.c"
+#include "../features/aarch64-fpu.c"
/* Create the aarch64 target description. */
target_desc *
aarch64_create_target_description ()
{
- return tdesc_aarch64;
-}
+ target_desc *tdesc = allocate_target_description ();
+
+#ifndef IN_PROCESS_AGENT
+ set_tdesc_architecture (tdesc, "aarch64");
+#endif
+
+ long regnum = 0;
+ regnum = create_feature_aarch64_core (tdesc, regnum);
+ regnum = create_feature_aarch64_fpu (tdesc, regnum);
+
+ return tdesc;
+}