Centralize i386 linux target descriptions
authorYao Qi <yao.qi@linaro.org>
Wed, 26 Jul 2017 11:36:42 +0000 (12:36 +0100)
committerYao Qi <yao.qi@linaro.org>
Wed, 26 Jul 2017 11:36:42 +0000 (12:36 +0100)
commit35b4818d03e8d63a926afb235a21c2cb64b14b23
treed1a86883987c33bed2ba86552224a97e972f65ec
parent8e2141c6fba6daea1555e042da9de49ec8b1977d
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.
gdb/ChangeLog
gdb/i386-linux-tdep.c
gdb/i386-linux-tdep.h
gdb/x86-linux-nat.c