aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-linux-tdep.h
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
commit9d3d478be5e21151d3755d7b2e6f1cd8ff92d726 (patch)
tree44f3a0e29a71150f3cb98813b26d67ec8cbcfd94 /gdb/amd64-linux-tdep.h
parentb9f1d50ffcac4c4b65cb05c2971106cb06e8774c (diff)
downloadgdb-9d3d478be5e21151d3755d7b2e6f1cd8ff92d726.zip
gdb-9d3d478be5e21151d3755d7b2e6f1cd8ff92d726.tar.gz
gdb-9d3d478be5e21151d3755d7b2e6f1cd8ff92d726.tar.bz2
Centralize amd64-linux target descriptions
This patch adds a new function amd64_linux_read_description, which creates amd64-linux target descriptions according to its two arguments, xcr0 and is_x32. gdb: 2017-09-05 Yao Qi <yao.qi@linaro.org> * amd64-linux-tdep.c (amd64_linux_read_description): New function. (amd64_linux_core_read_description): Call amd64_linux_read_description. (amd64_linux_init_abi): Likewise. (amd64_x32_linux_init_abi): Likewise. * amd64-linux-tdep.h (amd64_linux_read_description): Declare. * x86-linux-nat.c (x86_linux_read_description): Call amd64_linux_read_description.
Diffstat (limited to 'gdb/amd64-linux-tdep.h')
-rw-r--r--gdb/amd64-linux-tdep.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h
index 7453408..ab134a4 100644
--- a/gdb/amd64-linux-tdep.h
+++ b/gdb/amd64-linux-tdep.h
@@ -43,6 +43,12 @@ extern struct target_desc *tdesc_x32_linux;
extern struct target_desc *tdesc_x32_avx_linux;
extern struct target_desc *tdesc_x32_avx_avx512_linux;
+/* Return the right amd64-linux target descriptions according to
+ XCR0_FEATURES_BIT and IS_X32. */
+
+const target_desc *amd64_linux_read_description (uint64_t xcr0_features_bit,
+ bool is_x32);
+
/* Enum that defines the syscall identifiers for amd64 linux.
Used for process record/replay, these will be translated into
a gdb-canonical set of syscall ids in linux-record.c. */