diff options
author | Yao Qi <yao.qi@linaro.org> | 2017-07-26 12:36:42 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2017-07-26 12:36:42 +0100 |
commit | 35b4818d03e8d63a926afb235a21c2cb64b14b23 (patch) | |
tree | d1a86883987c33bed2ba86552224a97e972f65ec /gdb/i386-linux-tdep.h | |
parent | Add optional argument to command "maint prints c-tdesc" (diff) | |
download | binutils-gdb-35b4818d03e8d63a926afb235a21c2cb64b14b23.tar.gz binutils-gdb-35b4818d03e8d63a926afb235a21c2cb64b14b23.tar.bz2 binutils-gdb-35b4818d03e8d63a926afb235a21c2cb64b14b23.zip |
Centralize i386 linux target descriptions
This patch moves all the tdesc_i386*_linux target descriptions to a
function i386_linux_read_description, which returns the right target
description according to xcr0. This also remove the duplication in
getting target descriptions in corefile and native target.
gdb:
2017-07-26 Yao Qi <yao.qi@linaro.org>
* i386-linux-tdep.c (i386_linux_read_description): New function.
(i386_linux_core_read_description): Call
i386_linux_read_description.
* i386-linux-tdep.h (i386_linux_read_description): Declare.
(tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
(tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
(tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
(tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
* x86-linux-nat.c (x86_linux_read_description): Call
i386_linux_read_description.
Diffstat (limited to 'gdb/i386-linux-tdep.h')
-rw-r--r-- | gdb/i386-linux-tdep.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gdb/i386-linux-tdep.h b/gdb/i386-linux-tdep.h index 8d4c7caa5a3..1ca8d6b8156 100644 --- a/gdb/i386-linux-tdep.h +++ b/gdb/i386-linux-tdep.h @@ -42,14 +42,8 @@ extern uint64_t i386_linux_core_read_xcr0 (bfd *abfd); extern void i386_linux_handle_segmentation_fault (struct gdbarch *gdbarch, struct ui_out *uiout); -/* Linux target description. */ -extern struct target_desc *tdesc_i386_linux; -extern struct target_desc *tdesc_i386_mmx_linux; -extern struct target_desc *tdesc_i386_avx_linux; -extern struct target_desc *tdesc_i386_mpx_linux; -extern struct target_desc *tdesc_i386_avx_mpx_linux; -extern struct target_desc *tdesc_i386_avx_avx512_linux; -extern struct target_desc *tdesc_i386_avx_mpx_avx512_pku_linux; +/* Return the target description according to XCR0. */ +extern const struct target_desc *i386_linux_read_description (uint64_t xcr0); /* Format of XSAVE extended state is: struct |