aboutsummaryrefslogtreecommitdiff
path: root/gdb/features/tic6x-gp.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-11-24 09:29:43 +0000
committerYao Qi <yao.qi@linaro.org>2017-11-24 09:29:43 +0000
commit506fe5f4996738f25b7c26f126a84b231429ba95 (patch)
treef2fac3f4ca6c8ced4d56577f75022d6c0cba0b03 /gdb/features/tic6x-gp.c
parent6d2cd6b2084d980a4baf5b4bdce8499c2295a672 (diff)
downloadbinutils-506fe5f4996738f25b7c26f126a84b231429ba95.zip
binutils-506fe5f4996738f25b7c26f126a84b231429ba95.tar.gz
binutils-506fe5f4996738f25b7c26f126a84b231429ba95.tar.bz2
Change tic6x target descriptions
This patch changes tic6x target descriptions to be more flexible. Rebuild tic6x-uclinux GDBserver with my x86 g++, and the unit test passes. gdb: 2017-11-24 Yao Qi <yao.qi@linaro.org> * arch/tic6x.c: New file. * arch/tic6x.h: New file. * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml, tic6x-core.xml and tic6x-gp.xml. * features/tic6x-c6xp.c: Generated. * features/tic6x-core.c: Generated. * features/tic6x-gp.c: Generated. * target-descriptions.c (maint_print_c_tdesc_cmd): Match "tic6x-". gdb/gdbserver: 2017-11-24 Yao Qi <yao.qi@linaro.org> * configure.srv: Set $srv_regobj for tic6x-linux. * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h". (tic6x_read_description): Move some code to tic6x_arch_setup. (tic6x_tdesc_test): New function. (initialize_low_arch): Call selftests::register_test.
Diffstat (limited to 'gdb/features/tic6x-gp.c')
-rw-r--r--gdb/features/tic6x-gp.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/gdb/features/tic6x-gp.c b/gdb/features/tic6x-gp.c
new file mode 100644
index 0000000..df0d0e3
--- /dev/null
+++ b/gdb/features/tic6x-gp.c
@@ -0,0 +1,45 @@
+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
+ Original: tic6x-gp.xml */
+
+#include "arch/tdesc.h"
+
+static int
+create_feature_tic6x_gp (struct target_desc *result, long regnum)
+{
+ struct tdesc_feature *feature;
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.tic6x.gp", "tic6x-gp.xml");
+ tdesc_create_reg (feature, "A16", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A17", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A18", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A19", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A20", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A21", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A22", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A23", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A24", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A25", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A26", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A27", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A28", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A29", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A30", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "A31", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B16", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B17", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B18", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B19", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B20", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B21", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B22", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B23", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B24", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B25", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B26", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B27", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B28", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B29", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B30", regnum++, 1, NULL, 32, "uint32");
+ tdesc_create_reg (feature, "B31", regnum++, 1, NULL, 32, "uint32");
+ return regnum;
+}