summaryrefslogtreecommitdiff
path: root/gdb/features
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-09-05 09:54:53 +0100
committerYao Qi <yao.qi@linaro.org>2017-09-05 09:54:53 +0100
commitf49ff00066929bf7c38f9c89ad640561bbb331f6 (patch)
treeb410bbcba3cb5b90d02547b31e4f9efd0c0a7a8f /gdb/features
parent2b68ef2f11daef3ab3c6941ebf53dfcd0fb79fbf (diff)
downloadbinutils-gdb-f49ff00066929bf7c38f9c89ad640561bbb331f6.tar.gz
[GDBserver] Centralize tdesc for i386-linux
tdesc_i386_XXX_linux is used in many places in linux-x86-low.c and this patch adds a new function i386_linux_read_description to return the right tdesc according to xcr0. i386_linux_read_description is quite similar to the counterpart in GDB, and the following patch will share the duplicated code, so this patch adds arch/tdesc.h includes the declarations of various tdesc apis which are used by the shared code. The generated c feature files can include arch/tdesc.h only. gdb/gdbserver: 2017-09-05 Yao Qi <yao.qi@linaro.org> * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o. (ipa_obj): Likewise. * linux-i386-ipa.c: Include common/x86-xstate.h (get_ipa_tdesc): Call i386_linux_read_description. (initialize_low_tracepoint): Don't call init_registers_XXX functions, call initialize_low_tdesc instead. * linux-x86-low.c (x86_linux_read_description): Call i386_linux_read_description. (initialize_low_arch): Don't call init_registers_i386_XXX functions, call initialize_low_tdesc. * linux-x86-tdesc.c: New file. * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST. (i386_get_ipa_tdesc_idx): Declare. (i386_get_ipa_tdesc): Declare. (initialize_low_tdesc): Declare. gdb: 2017-09-05 Yao Qi <yao.qi@linaro.org> * arch/tdesc.h: New file. * regformats/regdat.sh: Generate code using tdesc_create_reg. * target-descriptions.c: Update comments. * target-descriptions.h: Include "arch/tdesc.h". Remove the declarations. * features/i386/32bit-avx.c: Re-generated. * features/i386/32bit-avx512.c: Re-generated. * features/i386/32bit-core.c: Re-generated. * features/i386/32bit-linux.c: Re-generated. * features/i386/32bit-mpx.c: Re-generated. * features/i386/32bit-pkeys.c: Re-generated. * features/i386/32bit-sse.c: Re-generated.
Diffstat (limited to 'gdb/features')
-rw-r--r--gdb/features/i386/32bit-avx.c2
-rw-r--r--gdb/features/i386/32bit-avx512.c2
-rw-r--r--gdb/features/i386/32bit-core.c2
-rw-r--r--gdb/features/i386/32bit-linux.c2
-rw-r--r--gdb/features/i386/32bit-mpx.c2
-rw-r--r--gdb/features/i386/32bit-pkeys.c2
-rw-r--r--gdb/features/i386/32bit-sse.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/gdb/features/i386/32bit-avx.c b/gdb/features/i386/32bit-avx.c
index 0e715158658..3a98936a0c7 100644
--- a/gdb/features/i386/32bit-avx.c
+++ b/gdb/features/i386/32bit-avx.c
@@ -1,7 +1,7 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: 32bit-avx.xml */
-#include "target-descriptions.h"
+#include "arch/tdesc.h"
static int
create_feature_i386_32bit_avx (struct target_desc *result, long regnum)
diff --git a/gdb/features/i386/32bit-avx512.c b/gdb/features/i386/32bit-avx512.c
index 034f557094d..b13e1d33081 100644
--- a/gdb/features/i386/32bit-avx512.c
+++ b/gdb/features/i386/32bit-avx512.c
@@ -1,7 +1,7 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: 32bit-avx512.xml */
-#include "target-descriptions.h"
+#include "arch/tdesc.h"
static int
create_feature_i386_32bit_avx512 (struct target_desc *result, long regnum)
diff --git a/gdb/features/i386/32bit-core.c b/gdb/features/i386/32bit-core.c
index b43de4da82f..ea6db935c06 100644
--- a/gdb/features/i386/32bit-core.c
+++ b/gdb/features/i386/32bit-core.c
@@ -1,7 +1,7 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: 32bit-core.xml */
-#include "target-descriptions.h"
+#include "arch/tdesc.h"
static int
create_feature_i386_32bit_core (struct target_desc *result, long regnum)
diff --git a/gdb/features/i386/32bit-linux.c b/gdb/features/i386/32bit-linux.c
index 1b50882c6c8..1ba932d795a 100644
--- a/gdb/features/i386/32bit-linux.c
+++ b/gdb/features/i386/32bit-linux.c
@@ -1,7 +1,7 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: 32bit-linux.xml */
-#include "target-descriptions.h"
+#include "arch/tdesc.h"
static int
create_feature_i386_32bit_linux (struct target_desc *result, long regnum)
diff --git a/gdb/features/i386/32bit-mpx.c b/gdb/features/i386/32bit-mpx.c
index 6ed3b2ea202..f7d2ef052c5 100644
--- a/gdb/features/i386/32bit-mpx.c
+++ b/gdb/features/i386/32bit-mpx.c
@@ -1,7 +1,7 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: 32bit-mpx.xml */
-#include "target-descriptions.h"
+#include "arch/tdesc.h"
static int
create_feature_i386_32bit_mpx (struct target_desc *result, long regnum)
diff --git a/gdb/features/i386/32bit-pkeys.c b/gdb/features/i386/32bit-pkeys.c
index 24a40aa381e..89f1a5b3e06 100644
--- a/gdb/features/i386/32bit-pkeys.c
+++ b/gdb/features/i386/32bit-pkeys.c
@@ -1,7 +1,7 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: 32bit-pkeys.xml */
-#include "target-descriptions.h"
+#include "arch/tdesc.h"
static int
create_feature_i386_32bit_pkeys (struct target_desc *result, long regnum)
diff --git a/gdb/features/i386/32bit-sse.c b/gdb/features/i386/32bit-sse.c
index c0684fbdcce..98f4cd061c0 100644
--- a/gdb/features/i386/32bit-sse.c
+++ b/gdb/features/i386/32bit-sse.c
@@ -1,7 +1,7 @@
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: 32bit-sse.xml */
-#include "target-descriptions.h"
+#include "arch/tdesc.h"
static int
create_feature_i386_32bit_sse (struct target_desc *result, long regnum)