summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-12-18 22:39:49 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-20 15:22:16 +0000
commit133aa828f506260a6b61490810b3542a6c18004a (patch)
treea0ecba5d92f6137755a300fec318fea4978c5ab5 /meta/recipes-devtools
parentaa1c50a32b029620c3940efd648261cd21bdc37c (diff)
downloadpoky-133aa828f506260a6b61490810b3542a6c18004a.tar.gz
gdb: Upgrade to 7.12
(From OE-Core rev: 59338b0bc2f8a5fe929d906769f5518ec67d6f3f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.12.inc (renamed from meta/recipes-devtools/gdb/gdb-7.11.1.inc)5
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.bb (renamed from meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.1.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb-cross_7.12.bb (renamed from meta/recipes-devtools/gdb/gdb-cross_7.11.1.bb)0
-rw-r--r--meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch6
-rw-r--r--meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch6
-rw-r--r--meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch6
-rw-r--r--meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch12
-rw-r--r--meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch42
-rw-r--r--meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch10
-rw-r--r--meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch6
-rw-r--r--meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch10
-rw-r--r--meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch6
-rw-r--r--meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch6
-rw-r--r--meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch2601
-rw-r--r--meta/recipes-devtools/gdb/gdb_7.12.bb (renamed from meta/recipes-devtools/gdb/gdb_7.11.1.bb)1
15 files changed, 58 insertions, 2659 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-7.11.1.inc b/meta/recipes-devtools/gdb/gdb-7.12.inc
index d9dfe6f3f3..2faddc58bf 100644
--- a/meta/recipes-devtools/gdb/gdb-7.11.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.12.inc
@@ -15,8 +15,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
15 file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \ 15 file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \
16 file://0009-Change-order-of-CFLAGS.patch \ 16 file://0009-Change-order-of-CFLAGS.patch \
17 file://0010-resolve-restrict-keyword-conflict.patch \ 17 file://0010-resolve-restrict-keyword-conflict.patch \
18 file://0011-avx_mpx.patch \
19" 18"
19SRC_URI[md5sum] = "a0a3a00f7499b0c5278ba8676745d180"
20SRC_URI[sha256sum] = "834ff3c5948b30718343ea57b11cbc3235d7995c6a4f3a5cecec8c8114164f94"
20 21
21SRC_URI[md5sum] = "5aa71522e488e358243917967db87476"
22SRC_URI[sha256sum] = "e9216da4e3755e9f414c1aa0026b626251dfc57ffe572a266e98da4f6988fc70"
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.1.bb b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.bb
index 301035940c..301035940c 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian_7.11.1.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian_7.12.bb
diff --git a/meta/recipes-devtools/gdb/gdb-cross_7.11.1.bb b/meta/recipes-devtools/gdb/gdb-cross_7.12.bb
index 50cf159fdb..50cf159fdb 100644
--- a/meta/recipes-devtools/gdb/gdb-cross_7.11.1.bb
+++ b/meta/recipes-devtools/gdb/gdb-cross_7.12.bb
diff --git a/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch b/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
index 0042c00634..fc6c92f186 100644
--- a/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
+++ b/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
@@ -1,4 +1,4 @@
1From fddd7178915968acf680814411b8b3cb137d0587 Mon Sep 17 00:00:00 2001 1From 2c81e17216b4e471a1ce0bddb50f374b0722a2ce Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 19 Jan 2016 18:18:52 -0800 3Date: Tue, 19 Jan 2016 18:18:52 -0800
4Subject: [PATCH 01/10] include sys/types.h for mode_t 4Subject: [PATCH 01/10] include sys/types.h for mode_t
@@ -14,7 +14,7 @@ Upstream-Status: Pending
14 1 file changed, 1 insertion(+) 14 1 file changed, 1 insertion(+)
15 15
16diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h 16diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
17index 5af2051..f42c510 100644 17index 4c14c204bb..bdab18f7f7 100644
18--- a/gdb/gdbserver/target.h 18--- a/gdb/gdbserver/target.h
19+++ b/gdb/gdbserver/target.h 19+++ b/gdb/gdbserver/target.h
20@@ -28,6 +28,7 @@ 20@@ -28,6 +28,7 @@
@@ -26,5 +26,5 @@ index 5af2051..f42c510 100644
26 struct emit_ops; 26 struct emit_ops;
27 struct buffer; 27 struct buffer;
28-- 28--
292.8.2 292.11.0
30 30
diff --git a/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch b/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
index defed621f4..9a9201b39c 100644
--- a/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
+++ b/meta/recipes-devtools/gdb/gdb/0002-make-man-install-relative-to-DESTDIR.patch
@@ -1,4 +1,4 @@
1From 3229cb09033eeb5003a08d91fa9d43be8ba4c86b Mon Sep 17 00:00:00 2001 1From f316d604b312bead78594f02e1355633eda9507b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 2 Mar 2015 02:27:55 +0000 3Date: Mon, 2 Mar 2015 02:27:55 +0000
4Subject: [PATCH 02/10] make man install relative to DESTDIR 4Subject: [PATCH 02/10] make man install relative to DESTDIR
@@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 1 file changed, 1 insertion(+), 1 deletion(-) 11 1 file changed, 1 insertion(+), 1 deletion(-)
12 12
13diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in 13diff --git a/sim/common/Makefile.in b/sim/common/Makefile.in
14index a05f507..8d0fa64 100644 14index a05f50767a..8d0fa64ea8 100644
15--- a/sim/common/Makefile.in 15--- a/sim/common/Makefile.in
16+++ b/sim/common/Makefile.in 16+++ b/sim/common/Makefile.in
17@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias) 17@@ -35,7 +35,7 @@ tooldir = $(libdir)/$(target_alias)
@@ -24,5 +24,5 @@ index a05f507..8d0fa64 100644
24 includedir = @includedir@ 24 includedir = @includedir@
25 25
26-- 26--
272.8.2 272.11.0
28 28
diff --git a/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
index bac793964a..74c00063e4 100644
--- a/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
+++ b/meta/recipes-devtools/gdb/gdb/0003-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
@@ -1,4 +1,4 @@
1From 88e67caed662d8344c8db56176c9f1221e6cd2a2 Mon Sep 17 00:00:00 2001 1From f2912b1d2e5c854a112176682903b696da33e003 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 23 Mar 2016 06:30:09 +0000 3Date: Wed, 23 Mar 2016 06:30:09 +0000
4Subject: [PATCH 03/10] mips-linux-nat: Define _ABIO32 if not defined 4Subject: [PATCH 03/10] mips-linux-nat: Define _ABIO32 if not defined
@@ -17,7 +17,7 @@ Upstream-Status: Pending
17 1 file changed, 5 insertions(+) 17 1 file changed, 5 insertions(+)
18 18
19diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c 19diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
20index bfe9fcb..449b43a 100644 20index 0f20f16814..722532bb6c 100644
21--- a/gdb/mips-linux-nat.c 21--- a/gdb/mips-linux-nat.c
22+++ b/gdb/mips-linux-nat.c 22+++ b/gdb/mips-linux-nat.c
23@@ -46,6 +46,11 @@ 23@@ -46,6 +46,11 @@
@@ -33,5 +33,5 @@ index bfe9fcb..449b43a 100644
33 we'll clear this and use PTRACE_PEEKUSER instead. */ 33 we'll clear this and use PTRACE_PEEKUSER instead. */
34 static int have_ptrace_regsets = 1; 34 static int have_ptrace_regsets = 1;
35-- 35--
362.8.2 362.11.0
37 37
diff --git a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
index a5fe2a2793..847f24f7fe 100644
--- a/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
+++ b/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
@@ -1,6 +1,6 @@
1From bec564eb454bc7fc6ecfcb573aa53040bf39c1d5 Mon Sep 17 00:00:00 2001 1From 7ef7b709885378279c424eab0510b93233400b24 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 16:46:03 +0000 3Date: Sat, 6 Aug 2016 17:32:50 -0700
4Subject: [PATCH 04/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC 4Subject: [PATCH 04/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC
5 systems 5 systems
6 6
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 2 files changed, 12 insertions(+) 13 2 files changed, 12 insertions(+)
14 14
15diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c 15diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
16index 2145c50..777905d 100644 16index 1d013f185f..68098b3db9 100644
17--- a/gdb/gdbserver/linux-ppc-low.c 17--- a/gdb/gdbserver/linux-ppc-low.c
18+++ b/gdb/gdbserver/linux-ppc-low.c 18+++ b/gdb/gdbserver/linux-ppc-low.c
19@@ -21,7 +21,13 @@ 19@@ -21,7 +21,13 @@
@@ -29,9 +29,9 @@ index 2145c50..777905d 100644
29+#endif 29+#endif
30 30
31 #include "nat/ppc-linux.h" 31 #include "nat/ppc-linux.h"
32 32 #include "linux-ppc-tdesc.h"
33diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h 33diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
34index 85fbcd8..cbec9c5 100644 34index 85fbcd84bb..cbec9c53b2 100644
35--- a/gdb/nat/ppc-linux.h 35--- a/gdb/nat/ppc-linux.h
36+++ b/gdb/nat/ppc-linux.h 36+++ b/gdb/nat/ppc-linux.h
37@@ -18,7 +18,13 @@ 37@@ -18,7 +18,13 @@
@@ -49,5 +49,5 @@ index 85fbcd8..cbec9c5 100644
49 49
50 /* This sometimes isn't defined. */ 50 /* This sometimes isn't defined. */
51-- 51--
522.8.2 522.11.0
53 53
diff --git a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
index 8809e6f8b2..d0c15f6289 100644
--- a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
+++ b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
@@ -1,4 +1,4 @@
1From 8c5fe58c5a0044ddb517a41b277ed27fb3d3bedc Mon Sep 17 00:00:00 2001 1From 6649e2cccfb11dec076abb02eae0afab95614829 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 2 Mar 2015 02:31:12 +0000 3Date: Mon, 2 Mar 2015 02:31:12 +0000
4Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture. 4Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture.
@@ -27,10 +27,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
27 11 files changed, 617 insertions(+), 29 deletions(-) 27 11 files changed, 617 insertions(+), 29 deletions(-)
28 28
29diff --git a/gdb/Makefile.in b/gdb/Makefile.in 29diff --git a/gdb/Makefile.in b/gdb/Makefile.in
30index ec2af52..df8e84d 100644 30index 7b2df86878..10f1266fe3 100644
31--- a/gdb/Makefile.in 31--- a/gdb/Makefile.in
32+++ b/gdb/Makefile.in 32+++ b/gdb/Makefile.in
33@@ -1736,6 +1736,7 @@ ALLDEPFILES = \ 33@@ -1750,6 +1750,7 @@ ALLDEPFILES = \
34 score-tdep.c \ 34 score-tdep.c \
35 ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \ 35 ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
36 sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ 36 sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
@@ -39,7 +39,7 @@ index ec2af52..df8e84d 100644
39 solib-svr4.c \ 39 solib-svr4.c \
40 sparc-linux-nat.c sparc-linux-tdep.c \ 40 sparc-linux-nat.c sparc-linux-tdep.c \
41diff --git a/gdb/configure.host b/gdb/configure.host 41diff --git a/gdb/configure.host b/gdb/configure.host
42index ef265eb..322a1e2 100644 42index ef265ebe29..322a1e2c67 100644
43--- a/gdb/configure.host 43--- a/gdb/configure.host
44+++ b/gdb/configure.host 44+++ b/gdb/configure.host
45@@ -149,6 +149,7 @@ powerpc*-*-linux*) gdb_host=linux ;; 45@@ -149,6 +149,7 @@ powerpc*-*-linux*) gdb_host=linux ;;
@@ -51,7 +51,7 @@ index ef265eb..322a1e2 100644
51 gdb_host=nbsd ;; 51 gdb_host=nbsd ;;
52 sh*-*-openbsd*) gdb_host=nbsd ;; 52 sh*-*-openbsd*) gdb_host=nbsd ;;
53diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c 53diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
54index 2418d25..ac8ea9e 100644 54index 2418d25010..ac8ea9e2a4 100644
55--- a/gdb/sh-linux-tdep.c 55--- a/gdb/sh-linux-tdep.c
56+++ b/gdb/sh-linux-tdep.c 56+++ b/gdb/sh-linux-tdep.c
57@@ -18,14 +18,37 @@ 57@@ -18,14 +18,37 @@
@@ -599,7 +599,7 @@ index 2418d25..ac8ea9e 100644
599 599
600 /* GNU/Linux uses SVR4-style shared libraries. */ 600 /* GNU/Linux uses SVR4-style shared libraries. */
601diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c 601diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
602index 336b48e..847b271 100644 602index 694f5f742d..8d54df7a1a 100644
603--- a/gdb/sh-tdep.c 603--- a/gdb/sh-tdep.c
604+++ b/gdb/sh-tdep.c 604+++ b/gdb/sh-tdep.c
605@@ -21,6 +21,9 @@ 605@@ -21,6 +21,9 @@
@@ -662,7 +662,7 @@ index 336b48e..847b271 100644
662 len = TYPE_LENGTH (type); 662 len = TYPE_LENGTH (type);
663 val = sh_justify_value_in_reg (gdbarch, args[argnum], len); 663 val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
664 664
665@@ -1821,7 +1808,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, 665@@ -1819,7 +1806,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
666 reg->how = DWARF2_FRAME_REG_UNDEFINED; 666 reg->how = DWARF2_FRAME_REG_UNDEFINED;
667 } 667 }
668 668
@@ -671,7 +671,7 @@ index 336b48e..847b271 100644
671 sh_alloc_frame_cache (void) 671 sh_alloc_frame_cache (void)
672 { 672 {
673 struct sh_frame_cache *cache; 673 struct sh_frame_cache *cache;
674@@ -1848,7 +1835,7 @@ sh_alloc_frame_cache (void) 674@@ -1846,7 +1833,7 @@ sh_alloc_frame_cache (void)
675 return cache; 675 return cache;
676 } 676 }
677 677
@@ -680,7 +680,7 @@ index 336b48e..847b271 100644
680 sh_frame_cache (struct frame_info *this_frame, void **this_cache) 680 sh_frame_cache (struct frame_info *this_frame, void **this_cache)
681 { 681 {
682 struct gdbarch *gdbarch = get_frame_arch (this_frame); 682 struct gdbarch *gdbarch = get_frame_arch (this_frame);
683@@ -1915,9 +1902,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache) 683@@ -1913,9 +1900,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
684 return cache; 684 return cache;
685 } 685 }
686 686
@@ -693,7 +693,7 @@ index 336b48e..847b271 100644
693 { 693 {
694 struct gdbarch *gdbarch = get_frame_arch (this_frame); 694 struct gdbarch *gdbarch = get_frame_arch (this_frame);
695 struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache); 695 struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
696@@ -1931,7 +1918,7 @@ sh_frame_prev_register (struct frame_info *this_frame, 696@@ -1929,7 +1916,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
697 the current frame. Frob regnum so that we pull the value from 697 the current frame. Frob regnum so that we pull the value from
698 the correct place. */ 698 the correct place. */
699 if (regnum == gdbarch_pc_regnum (gdbarch)) 699 if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -702,7 +702,7 @@ index 336b48e..847b271 100644
702 702
703 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1) 703 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
704 return frame_unwind_got_memory (this_frame, regnum, 704 return frame_unwind_got_memory (this_frame, regnum,
705@@ -2240,8 +2227,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch, 705@@ -2238,8 +2225,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
706 static struct gdbarch * 706 static struct gdbarch *
707 sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 707 sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
708 { 708 {
@@ -712,7 +712,7 @@ index 336b48e..847b271 100644
712 712
713 /* SH5 is handled entirely in sh64-tdep.c. */ 713 /* SH5 is handled entirely in sh64-tdep.c. */
714 if (info.bfd_arch_info->mach == bfd_mach_sh5) 714 if (info.bfd_arch_info->mach == bfd_mach_sh5)
715@@ -2257,6 +2244,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 715@@ -2255,6 +2242,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
716 tdep = XCNEW (struct gdbarch_tdep); 716 tdep = XCNEW (struct gdbarch_tdep);
717 gdbarch = gdbarch_alloc (&info, tdep); 717 gdbarch = gdbarch_alloc (&info, tdep);
718 718
@@ -731,7 +731,7 @@ index 336b48e..847b271 100644
731 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT); 731 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
732 set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT); 732 set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
733 set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); 733 set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
734@@ -2407,10 +2406,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 734@@ -2405,10 +2404,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
735 break; 735 break;
736 } 736 }
737 737
@@ -745,7 +745,7 @@ index 336b48e..847b271 100644
745 frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind); 745 frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
746 746
747diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h 747diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
748index 666968f..62c65b5 100644 748index 666968f787..62c65b55ea 100644
749--- a/gdb/sh-tdep.h 749--- a/gdb/sh-tdep.h
750+++ b/gdb/sh-tdep.h 750+++ b/gdb/sh-tdep.h
751@@ -21,6 +21,12 @@ 751@@ -21,6 +21,12 @@
@@ -828,7 +828,7 @@ index 666968f..62c65b5 100644
828 where each general-purpose register is stored inside the associated 828 where each general-purpose register is stored inside the associated
829 core file section. */ 829 core file section. */
830diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp 830diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
831index 6d9aef8..5b66b42 100644 831index 6d9aef81bb..5b66b429d1 100644
832--- a/gdb/testsuite/gdb.asm/asm-source.exp 832--- a/gdb/testsuite/gdb.asm/asm-source.exp
833+++ b/gdb/testsuite/gdb.asm/asm-source.exp 833+++ b/gdb/testsuite/gdb.asm/asm-source.exp
834@@ -116,6 +116,11 @@ switch -glob -- [istarget] { 834@@ -116,6 +116,11 @@ switch -glob -- [istarget] {
@@ -844,7 +844,7 @@ index 6d9aef8..5b66b42 100644
844 set asm-arch sh 844 set asm-arch sh
845 set debug-flags "-gdwarf-2" 845 set debug-flags "-gdwarf-2"
846diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc 846diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
847index a4a5fc5..89efed7 100644 847index a4a5fc545e..89efed7795 100644
848--- a/gdb/testsuite/gdb.asm/sh.inc 848--- a/gdb/testsuite/gdb.asm/sh.inc
849+++ b/gdb/testsuite/gdb.asm/sh.inc 849+++ b/gdb/testsuite/gdb.asm/sh.inc
850@@ -40,9 +40,8 @@ 850@@ -40,9 +40,8 @@
@@ -859,7 +859,7 @@ index a4a5fc5..89efed7 100644
859 .align 1 859 .align 1
860 .Lafterconst\@: 860 .Lafterconst\@:
861diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c 861diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
862index 424e1b8..0de2e7b 100644 862index 424e1b8327..0de2e7b633 100644
863--- a/gdb/testsuite/gdb.base/annota1.c 863--- a/gdb/testsuite/gdb.base/annota1.c
864+++ b/gdb/testsuite/gdb.base/annota1.c 864+++ b/gdb/testsuite/gdb.base/annota1.c
865@@ -1,6 +1,9 @@ 865@@ -1,6 +1,9 @@
@@ -873,7 +873,7 @@ index 424e1b8..0de2e7b 100644
873 void 873 void
874 handle_USR1 (int sig) 874 handle_USR1 (int sig)
875diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c 875diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
876index 424e1b8..952aaf21 100644 876index 424e1b8327..952aaf218a 100644
877--- a/gdb/testsuite/gdb.base/annota3.c 877--- a/gdb/testsuite/gdb.base/annota3.c
878+++ b/gdb/testsuite/gdb.base/annota3.c 878+++ b/gdb/testsuite/gdb.base/annota3.c
879@@ -1,6 +1,10 @@ 879@@ -1,6 +1,10 @@
@@ -888,7 +888,7 @@ index 424e1b8..952aaf21 100644
888 void 888 void
889 handle_USR1 (int sig) 889 handle_USR1 (int sig)
890diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c 890diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
891index 81f3b08..1574b2d 100644 891index 81f3b08d6b..1574b2d6cb 100644
892--- a/gdb/testsuite/gdb.base/sigall.c 892--- a/gdb/testsuite/gdb.base/sigall.c
893+++ b/gdb/testsuite/gdb.base/sigall.c 893+++ b/gdb/testsuite/gdb.base/sigall.c
894@@ -1,6 +1,9 @@ 894@@ -1,6 +1,9 @@
@@ -902,7 +902,7 @@ index 81f3b08..1574b2d 100644
902 /* Signal handlers, we set breakpoints in them to make sure that the 902 /* Signal handlers, we set breakpoints in them to make sure that the
903 signals really get delivered. */ 903 signals really get delivered. */
904diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c 904diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c
905index 7566068..1205a9b 100644 905index 756606880f..1205a9bc9c 100644
906--- a/gdb/testsuite/gdb.base/signals.c 906--- a/gdb/testsuite/gdb.base/signals.c
907+++ b/gdb/testsuite/gdb.base/signals.c 907+++ b/gdb/testsuite/gdb.base/signals.c
908@@ -3,6 +3,10 @@ 908@@ -3,6 +3,10 @@
@@ -917,5 +917,5 @@ index 7566068..1205a9b 100644
917 static int count = 0; 917 static int count = 0;
918 918
919-- 919--
9202.8.2 9202.11.0
921 921
diff --git a/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch b/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
index 394d26d063..5ed8e81e4a 100644
--- a/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
+++ b/meta/recipes-devtools/gdb/gdb/0006-Dont-disable-libreadline.a-when-using-disable-static.patch
@@ -1,4 +1,4 @@
1From f3932cb2960fd54655a448b13d5a5b80f356f8de Mon Sep 17 00:00:00 2001 1From 2a6e28ad5c0cad189a3697d96de031e4713052b8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 15:25:03 -0700 3Date: Sat, 30 Apr 2016 15:25:03 -0700
4Subject: [PATCH 06/10] Dont disable libreadline.a when using --disable-static 4Subject: [PATCH 06/10] Dont disable libreadline.a when using --disable-static
@@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
19 2 files changed, 3 insertions(+), 2 deletions(-) 19 2 files changed, 3 insertions(+), 2 deletions(-)
20 20
21diff --git a/Makefile.def b/Makefile.def 21diff --git a/Makefile.def b/Makefile.def
22index ea8453e..0fc66c6 100644 22index ea8453e851..0fc66c694b 100644
23--- a/Makefile.def 23--- a/Makefile.def
24+++ b/Makefile.def 24+++ b/Makefile.def
25@@ -104,7 +104,8 @@ host_modules= { module= libiconv; 25@@ -104,7 +104,8 @@ host_modules= { module= libiconv;
@@ -33,10 +33,10 @@ index ea8453e..0fc66c6 100644
33 host_modules= { module= sim; }; 33 host_modules= { module= sim; };
34 host_modules= { module= texinfo; no_install= true; }; 34 host_modules= { module= texinfo; no_install= true; };
35diff --git a/Makefile.in b/Makefile.in 35diff --git a/Makefile.in b/Makefile.in
36index 2733c4d..3e04e80 100644 36index cb0136e8f8..55f9085c16 100644
37--- a/Makefile.in 37--- a/Makefile.in
38+++ b/Makefile.in 38+++ b/Makefile.in
39@@ -25380,7 +25380,7 @@ configure-readline: 39@@ -25385,7 +25385,7 @@ configure-readline:
40 $$s/$$module_srcdir/configure \ 40 $$s/$$module_srcdir/configure \
41 --srcdir=$${topdir}/$$module_srcdir \ 41 --srcdir=$${topdir}/$$module_srcdir \
42 $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ 42 $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
@@ -46,5 +46,5 @@ index 2733c4d..3e04e80 100644
46 @endif readline 46 @endif readline
47 47
48-- 48--
492.8.2 492.11.0
50 50
diff --git a/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch b/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
index f32f8ee417..a42c9fd2a7 100644
--- a/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
+++ b/meta/recipes-devtools/gdb/gdb/0007-use-asm-sgidefs.h.patch
@@ -1,4 +1,4 @@
1From 048675a915a72989f2613386975730da016e7c5d Mon Sep 17 00:00:00 2001 1From d7543b44255da4ae71447d4e4d63e0b6aa4ed909 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <amccurdy@gmail.com> 2From: Andre McCurdy <amccurdy@gmail.com>
3Date: Sat, 30 Apr 2016 15:29:06 -0700 3Date: Sat, 30 Apr 2016 15:29:06 -0700
4Subject: [PATCH 07/10] use <asm/sgidefs.h> 4Subject: [PATCH 07/10] use <asm/sgidefs.h>
@@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c 21diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
22index 449b43a..09603da 100644 22index 722532bb6c..51d8fc8f66 100644
23--- a/gdb/mips-linux-nat.c 23--- a/gdb/mips-linux-nat.c
24+++ b/gdb/mips-linux-nat.c 24+++ b/gdb/mips-linux-nat.c
25@@ -31,7 +31,7 @@ 25@@ -31,7 +31,7 @@
@@ -32,5 +32,5 @@ index 449b43a..09603da 100644
32 #include <asm/ptrace.h> 32 #include <asm/ptrace.h>
33 33
34-- 34--
352.8.2 352.11.0
36 36
diff --git a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
index 7e58b617ad..ae9cb8c0e2 100644
--- a/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
+++ b/meta/recipes-devtools/gdb/gdb/0008-Use-exorted-definitions-of-SIGRTMIN.patch
@@ -1,4 +1,4 @@
1From e54ead9d81f4d38412751b815f909db3cb144bb1 Mon Sep 17 00:00:00 2001 1From aacd77184da1328908da41c9fdb55ad881fa0e99 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 15:31:40 -0700 3Date: Sat, 30 Apr 2016 15:31:40 -0700
4Subject: [PATCH 08/10] Use exorted definitions of SIGRTMIN 4Subject: [PATCH 08/10] Use exorted definitions of SIGRTMIN
@@ -20,10 +20,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
20 2 files changed, 6 insertions(+), 2 deletions(-) 20 2 files changed, 6 insertions(+), 2 deletions(-)
21 21
22diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c 22diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
23index 0829bcb..3b8a896 100644 23index 5d5efa0af4..e3420b49a0 100644
24--- a/gdb/linux-nat.c 24--- a/gdb/linux-nat.c
25+++ b/gdb/linux-nat.c 25+++ b/gdb/linux-nat.c
26@@ -4845,6 +4845,6 @@ lin_thread_get_thread_signals (sigset_t *set) 26@@ -5022,6 +5022,6 @@ lin_thread_get_thread_signals (sigset_t *set)
27 /* NPTL reserves the first two RT signals, but does not provide any 27 /* NPTL reserves the first two RT signals, but does not provide any
28 way for the debugger to query the signal numbers - fortunately 28 way for the debugger to query the signal numbers - fortunately
29 they don't change. */ 29 they don't change. */
@@ -33,7 +33,7 @@ index 0829bcb..3b8a896 100644
33+ sigaddset (set, SIGRTMIN + 1); 33+ sigaddset (set, SIGRTMIN + 1);
34 } 34 }
35diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h 35diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
36index 2b485db..d058afc 100644 36index 2b485db141..d058afcde8 100644
37--- a/gdb/nat/linux-nat.h 37--- a/gdb/nat/linux-nat.h
38+++ b/gdb/nat/linux-nat.h 38+++ b/gdb/nat/linux-nat.h
39@@ -85,4 +85,8 @@ extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp); 39@@ -85,4 +85,8 @@ extern enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp);
@@ -46,5 +46,5 @@ index 2b485db..d058afc 100644
46+ 46+
47 #endif /* LINUX_NAT_H */ 47 #endif /* LINUX_NAT_H */
48-- 48--
492.8.2 492.11.0
50 50
diff --git a/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch b/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
index a230047af6..ed6e0aeb7b 100644
--- a/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
+++ b/meta/recipes-devtools/gdb/gdb/0009-Change-order-of-CFLAGS.patch
@@ -1,4 +1,4 @@
1From ba0bbf887d4911ccee9df57cb13eafb1de34bb31 Mon Sep 17 00:00:00 2001 1From 8c35d5d1825ed017cc58ea91011412e54c002eeb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Apr 2016 15:35:39 -0700 3Date: Sat, 30 Apr 2016 15:35:39 -0700
4Subject: [PATCH 09/10] Change order of CFLAGS 4Subject: [PATCH 09/10] Change order of CFLAGS
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 1 file changed, 2 insertions(+), 2 deletions(-) 13 1 file changed, 2 insertions(+), 2 deletions(-)
14 14
15diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in 15diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
16index 1e874e3..91e8550 100644 16index f844ab8853..3f88db52e3 100644
17--- a/gdb/gdbserver/Makefile.in 17--- a/gdb/gdbserver/Makefile.in
18+++ b/gdb/gdbserver/Makefile.in 18+++ b/gdb/gdbserver/Makefile.in
19@@ -138,10 +138,10 @@ CXXFLAGS = @CXXFLAGS@ 19@@ -138,10 +138,10 @@ CXXFLAGS = @CXXFLAGS@
@@ -30,5 +30,5 @@ index 1e874e3..91e8550 100644
30 # LDFLAGS is specifically reserved for setting from the command line 30 # LDFLAGS is specifically reserved for setting from the command line
31 # when running make. 31 # when running make.
32-- 32--
332.8.2 332.11.0
34 34
diff --git a/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch b/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
index 16c34c7035..1938beb561 100644
--- a/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
+++ b/meta/recipes-devtools/gdb/gdb/0010-resolve-restrict-keyword-conflict.patch
@@ -1,4 +1,4 @@
1From 5a9ccb8c0728b658fc4f7f0f7b36873c64274f10 Mon Sep 17 00:00:00 2001 1From 7816d3497266e55c1c921d7cc1c8bf81c8ed0b4a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 10 May 2016 08:47:05 -0700 3Date: Tue, 10 May 2016 08:47:05 -0700
4Subject: [PATCH 10/10] resolve restrict keyword conflict 4Subject: [PATCH 10/10] resolve restrict keyword conflict
@@ -15,7 +15,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 1 file changed, 4 insertions(+), 4 deletions(-) 15 1 file changed, 4 insertions(+), 4 deletions(-)
16 16
17diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h 17diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h
18index c556c5d..2a6107f 100644 18index c556c5db23..2a6107fcf8 100644
19--- a/gdb/gnulib/import/sys_time.in.h 19--- a/gdb/gnulib/import/sys_time.in.h
20+++ b/gdb/gnulib/import/sys_time.in.h 20+++ b/gdb/gnulib/import/sys_time.in.h
21@@ -93,20 +93,20 @@ struct timeval 21@@ -93,20 +93,20 @@ struct timeval
@@ -44,5 +44,5 @@ index c556c5d..2a6107f 100644
44 _GL_CXXALIASWARN (gettimeofday); 44 _GL_CXXALIASWARN (gettimeofday);
45 #elif defined GNULIB_POSIXCHECK 45 #elif defined GNULIB_POSIXCHECK
46-- 46--
472.8.2 472.11.0
48 48
diff --git a/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch b/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch
deleted file mode 100644
index 209c4fcbdf..0000000000
--- a/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch
+++ /dev/null
@@ -1,2601 +0,0 @@
1gdb: Backport patch to support changes with AVX and MPX
2
3The current MPX target descriptions assume that MPX is always combined
4with AVX, however that's not correct. We can have machines with MPX
5and without AVX; or machines with AVX and without MPX.
6
7This patch adds new target descriptions for machines that support
8both MPX and AVX, as duplicates of the existing MPX descriptions.
9
10The following commit will remove AVX from the MPX-only descriptions.
11
12Upstream-Status: Backport
13
14Signed-off-by: bavery <brian.avery@intel.com>
15
16
17Orignal patch changelog and author attribution:
18
192016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
20
21gdb/ChangeLog:
22
23 * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
24 New include.
25 (amd64_linux_core_read_description): Add case for
26 X86_XSTATE_AVX_MPX_MASK.
27 (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
28 * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
29 * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
30 (amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
31 (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
32 * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
33 (X86_XSTATE_AVX_MPX_MASK): New case.
34 * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
35 (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
36 (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
37 (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
38 New expedites.
39 * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
40 include.
41 (i386_linux_core_read_description): Add case
42 X86_XSTATE_AVX_MPX_MASK.
43 (_initialize_i386_linux_tdep): Call
44 initialize_tdesc_i386_avx_mpx_linux.
45 * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
46 * i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
47 (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
48 * x86-linux-nat.c (x86_linux_read_description): Add case for
49 X86_XSTATE_AVX_MPX_MASK.
50 * features/i386/amd64-avx-mpx-linux.xml: New file.
51 * features/i386/i386-avx-mpx-linux.xml: New file.
52 * features/i386/i386-avx-mpx.xml: New file.
53 * features/i386/amd64-avx-mpx.xml: New file.
54 * features/i386/amd64-avx-mpx-linux.c: Generated.
55 * features/i386/amd64-avx-mpx.c: Generated.
56 * features/i386/i386-avx-mpx-linux.c: Generated.
57 * features/i386/i386-avx-mpx.c: Generated.
58 * regformats/i386/amd64-avx-mpx-linux.dat: Generated.
59 * regformats/i386/amd64-avx-mpx.dat: Generated.
60 * regformats/i386/i386-avx-mpx-linux.dat: Generated.
61 * regformats/i386/i386-avx-mpx.dat: Generated.
62
63gdb/gdbserver/ChangeLog:
64
65 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
66 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
67 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
68 (amd64-avx-mpx-linux.c): New rules.
69 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
70 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
71 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
72 (srv_amd64_regobj): Add amd64-avx-mpx.o.
73 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
74 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
75 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
76 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
77 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
78 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
79 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
80 * linux-x86-low.c (x86_linux_read_description): Add case for
81 X86_XSTATE_AVX_MPX_MASK.
82 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
83 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
84 init_registers_i386_avx_mpx_linux.
85 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
86 (initialize_low_tracepoint): Call
87 init_registers_i386_avx_mpx_linux.
88 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
89 (initialize_low_tracepoint): Call
90 init_registers_amd64_avx_mpx_linux.
91 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
92 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
93 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
94 declarations.
95
96
97
98
99diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
100index 21bcd99..5327f7c 100644
101--- a/gdb/amd64-linux-tdep.c
102+++ b/gdb/amd64-linux-tdep.c
103@@ -43,6 +43,7 @@
104 #include "features/i386/amd64-linux.c"
105 #include "features/i386/amd64-avx-linux.c"
106 #include "features/i386/amd64-mpx-linux.c"
107+#include "features/i386/amd64-avx-mpx-linux.c"
108 #include "features/i386/amd64-avx512-linux.c"
109
110 #include "features/i386/x32-linux.c"
111@@ -1590,6 +1591,11 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch,
112 return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
113 else
114 return tdesc_amd64_mpx_linux;
115+ case X86_XSTATE_AVX_MPX_MASK:
116+ if (gdbarch_ptr_bit (gdbarch) == 32)
117+ return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
118+ else
119+ return tdesc_amd64_avx_mpx_linux;
120 case X86_XSTATE_AVX_MASK:
121 if (gdbarch_ptr_bit (gdbarch) == 32)
122 return tdesc_x32_avx_linux;
123@@ -2285,6 +2291,7 @@ _initialize_amd64_linux_tdep (void)
124 initialize_tdesc_amd64_linux ();
125 initialize_tdesc_amd64_avx_linux ();
126 initialize_tdesc_amd64_mpx_linux ();
127+ initialize_tdesc_amd64_avx_mpx_linux ();
128 initialize_tdesc_amd64_avx512_linux ();
129
130 initialize_tdesc_x32_linux ();
131diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h
132index 8673442..d64d5d6 100644
133--- a/gdb/amd64-linux-tdep.h
134+++ b/gdb/amd64-linux-tdep.h
135@@ -35,6 +35,7 @@
136 extern struct target_desc *tdesc_amd64_linux;
137 extern struct target_desc *tdesc_amd64_avx_linux;
138 extern struct target_desc *tdesc_amd64_mpx_linux;
139+extern struct target_desc *tdesc_amd64_avx_mpx_linux;
140 extern struct target_desc *tdesc_amd64_avx512_linux;
141
142 extern struct target_desc *tdesc_x32_linux;
143diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
144index fae92b2..88e3bf8 100644
145--- a/gdb/amd64-tdep.c
146+++ b/gdb/amd64-tdep.c
147@@ -44,6 +44,7 @@
148 #include "features/i386/amd64.c"
149 #include "features/i386/amd64-avx.c"
150 #include "features/i386/amd64-mpx.c"
151+#include "features/i386/amd64-avx-mpx.c"
152 #include "features/i386/amd64-avx512.c"
153
154 #include "features/i386/x32.c"
155@@ -3132,6 +3133,8 @@ amd64_target_description (uint64_t xcr0)
156 return tdesc_amd64_avx512;
157 case X86_XSTATE_MPX_MASK:
158 return tdesc_amd64_mpx;
159+ case X86_XSTATE_AVX_MPX_MASK:
160+ return tdesc_amd64_avx_mpx;
161 case X86_XSTATE_AVX_MASK:
162 return tdesc_amd64_avx;
163 default:
164@@ -3148,6 +3151,7 @@ _initialize_amd64_tdep (void)
165 initialize_tdesc_amd64 ();
166 initialize_tdesc_amd64_avx ();
167 initialize_tdesc_amd64_mpx ();
168+ initialize_tdesc_amd64_avx_mpx ();
169 initialize_tdesc_amd64_avx512 ();
170
171 initialize_tdesc_x32 ();
172diff --git a/gdb/common/x86-xstate.h b/gdb/common/x86-xstate.h
173index 8386420..0aa9164 100644
174--- a/gdb/common/x86-xstate.h
175+++ b/gdb/common/x86-xstate.h
176@@ -39,9 +39,10 @@
177 #define X86_XSTATE_X87_MASK X86_XSTATE_X87
178 #define X86_XSTATE_SSE_MASK (X86_XSTATE_X87 | X86_XSTATE_SSE)
179 #define X86_XSTATE_AVX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_AVX)
180-#define X86_XSTATE_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
181+#define X86_XSTATE_MPX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_MPX)
182+#define X86_XSTATE_AVX_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
183 #define X86_XSTATE_AVX512_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512)
184-#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_MPX_MASK | X86_XSTATE_AVX512)
185+#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_AVX_MPX_MASK | X86_XSTATE_AVX512)
186
187 #define X86_XSTATE_ALL_MASK (X86_XSTATE_MPX_AVX512_MASK)
188
189diff --git a/gdb/features/Makefile b/gdb/features/Makefile
190index 10173cf..e5c5154 100644
191--- a/gdb/features/Makefile
192+++ b/gdb/features/Makefile
193@@ -50,9 +50,11 @@ WHICH = aarch64 \
194 i386/amd64 i386/amd64-linux \
195 i386/i386-avx i386/i386-avx-linux \
196 i386/i386-mpx i386/i386-mpx-linux \
197+ i386/i386-avx-mpx i386/i386-avx-mpx-linux \
198 i386/i386-avx512 i386/i386-avx512-linux \
199 i386/amd64-avx i386/amd64-avx-linux \
200 i386/amd64-mpx i386/amd64-mpx-linux \
201+ i386/amd64-avx-mpx i386/amd64-avx-mpx-linux \
202 i386/amd64-avx512 i386/amd64-avx512-linux \
203 i386/x32 i386/x32-linux \
204 i386/x32-avx i386/x32-avx-linux \
205@@ -83,7 +85,9 @@ i386/amd64-linux-expedite = rbp,rsp,rip
206 i386/i386-avx-expedite = ebp,esp,eip
207 i386/i386-avx-linux-expedite = ebp,esp,eip
208 i386/i386-mpx-expedite = ebp,esp,eip
209+i386/i386-avx-mpx-expedite = ebp,esp,eip
210 i386/i386-mpx-linux-expedite = ebp,esp,eip
211+i386/i386-avx-mpx-linux-expedite = ebp,esp,eip
212 i386/i386-avx512-expedite = ebp,esp,eip
213 i386/i386-avx512-linux-expedite = ebp,esp,eip
214 i386/i386-mmx-expedite = ebp,esp,eip
215@@ -91,7 +95,9 @@ i386/i386-mmx-linux-expedite = ebp,esp,eip
216 i386/amd64-avx-expedite = rbp,rsp,rip
217 i386/amd64-avx-linux-expedite = rbp,rsp,rip
218 i386/amd64-mpx-expedite = rbp,rsp,rip
219+i386/amd64-avx-mpx-expedite = rbp,rsp,rip
220 i386/amd64-mpx-linux-expedite = rbp,rsp,rip
221+i386/amd64-avx-mpx-linux-expedite = rbp,rsp,rip
222 i386/amd64-avx512-expedite = rbp,rsp,rip
223 i386/amd64-avx512-linux-expedite = rbp,rsp,rip
224 i386/x32-expedite = rbp,rsp,rip
225@@ -156,6 +162,8 @@ XMLTOC = \
226 i386/amd64-linux.xml \
227 i386/amd64-mpx-linux.xml \
228 i386/amd64-mpx.xml \
229+ i386/amd64-avx-mpx-linux.xml \
230+ i386/amd64-avx-mpx.xml \
231 i386/amd64.xml \
232 i386/i386-avx-linux.xml \
233 i386/i386-avx.xml \
234@@ -166,6 +174,8 @@ XMLTOC = \
235 i386/i386-mmx.xml \
236 i386/i386-mpx-linux.xml \
237 i386/i386-mpx.xml \
238+ i386/i386-avx-mpx-linux.xml \
239+ i386/i386-avx-mpx.xml \
240 i386/i386.xml \
241 i386/x32-avx-linux.xml \
242 i386/x32-avx.xml \
243@@ -271,6 +281,10 @@ $(outdir)/i386/i386-mpx.dat: i386/32bit-core.xml i386/32bit-avx.xml \
244 i386/32bit-mpx.xml
245 $(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
246 i386/32bit-linux.xml i386/32bit-mpx.xml
247+$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml \
248+ i386/32bit-linux.xml i386/32bit-mpx.xml
249+$(outdir)/i386/i386-avx-mpx-linux.dat: i386/32bit-core.xml \
250+ i386/32bit-linux.xml i386/32bit-mpx.xml
251 $(outdir)/i386/i386-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \
252 i386/32bit-mpx.xml i386/32bit-avx512.xml
253 $(outdir)/i386/i386-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
254@@ -282,8 +296,12 @@ $(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
255 i386/64bit-linux.xml
256 $(outdir)/i386/amd64-mpx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
257 i386/64bit-linux.xml i386/64bit-mpx.xml
258+$(outdir)/i386/amd64-avx-mpx-linux.dat: i386/64bit-core.xml \
259+ i386/64bit-linux.xml i386/64bit-mpx.xml
260 $(outdir)/i386/amd64-mpx.dat: i386/64bit-core.xml i386/64bit-avx.xml \
261 i386/64bit-mpx.xml
262+$(outdir)/i386/amd64-avx-mpx.dat: i386/64bit-core.xml \
263+ i386/64bit-mpx.xml
264 $(outdir)/i386/amd64-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \
265 i386/64bit-mpx.xml i386/64bit-avx512.xml
266 $(outdir)/i386/amd64-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
267diff --git a/gdb/features/i386/amd64-avx-mpx-linux.c b/gdb/features/i386/amd64-avx-mpx-linux.c
268new file mode 100644
269index 0000000..37b4c81
270--- /dev/null
271+++ b/gdb/features/i386/amd64-avx-mpx-linux.c
272@@ -0,0 +1,211 @@
273+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
274+ Original: amd64-avx-mpx-linux.xml */
275+
276+#include "defs.h"
277+#include "osabi.h"
278+#include "target-descriptions.h"
279+
280+struct target_desc *tdesc_amd64_avx_mpx_linux;
281+static void
282+initialize_tdesc_amd64_avx_mpx_linux (void)
283+{
284+ struct target_desc *result = allocate_target_description ();
285+ struct tdesc_feature *feature;
286+ struct tdesc_type *field_type;
287+ struct tdesc_type *type;
288+
289+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
290+
291+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
292+
293+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
294+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
295+ tdesc_add_flag (field_type, 0, "CF");
296+ tdesc_add_flag (field_type, 1, "");
297+ tdesc_add_flag (field_type, 2, "PF");
298+ tdesc_add_flag (field_type, 4, "AF");
299+ tdesc_add_flag (field_type, 6, "ZF");
300+ tdesc_add_flag (field_type, 7, "SF");
301+ tdesc_add_flag (field_type, 8, "TF");
302+ tdesc_add_flag (field_type, 9, "IF");
303+ tdesc_add_flag (field_type, 10, "DF");
304+ tdesc_add_flag (field_type, 11, "OF");
305+ tdesc_add_flag (field_type, 14, "NT");
306+ tdesc_add_flag (field_type, 16, "RF");
307+ tdesc_add_flag (field_type, 17, "VM");
308+ tdesc_add_flag (field_type, 18, "AC");
309+ tdesc_add_flag (field_type, 19, "VIF");
310+ tdesc_add_flag (field_type, 20, "VIP");
311+ tdesc_add_flag (field_type, 21, "ID");
312+
313+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
314+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
315+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
316+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
317+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
318+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
319+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
320+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
321+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
322+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
323+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
324+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
325+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
326+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
327+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
328+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
329+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
330+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
331+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
332+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
333+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
334+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
335+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
336+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
337+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
338+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
339+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
340+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
341+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
342+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
343+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
344+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
345+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
346+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
347+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
348+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
349+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
350+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
351+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
352+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
353+
354+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
355+ field_type = tdesc_named_type (feature, "ieee_single");
356+ tdesc_create_vector (feature, "v4f", field_type, 4);
357+
358+ field_type = tdesc_named_type (feature, "ieee_double");
359+ tdesc_create_vector (feature, "v2d", field_type, 2);
360+
361+ field_type = tdesc_named_type (feature, "int8");
362+ tdesc_create_vector (feature, "v16i8", field_type, 16);
363+
364+ field_type = tdesc_named_type (feature, "int16");
365+ tdesc_create_vector (feature, "v8i16", field_type, 8);
366+
367+ field_type = tdesc_named_type (feature, "int32");
368+ tdesc_create_vector (feature, "v4i32", field_type, 4);
369+
370+ field_type = tdesc_named_type (feature, "int64");
371+ tdesc_create_vector (feature, "v2i64", field_type, 2);
372+
373+ type = tdesc_create_union (feature, "vec128");
374+ field_type = tdesc_named_type (feature, "v4f");
375+ tdesc_add_field (type, "v4_float", field_type);
376+ field_type = tdesc_named_type (feature, "v2d");
377+ tdesc_add_field (type, "v2_double", field_type);
378+ field_type = tdesc_named_type (feature, "v16i8");
379+ tdesc_add_field (type, "v16_int8", field_type);
380+ field_type = tdesc_named_type (feature, "v8i16");
381+ tdesc_add_field (type, "v8_int16", field_type);
382+ field_type = tdesc_named_type (feature, "v4i32");
383+ tdesc_add_field (type, "v4_int32", field_type);
384+ field_type = tdesc_named_type (feature, "v2i64");
385+ tdesc_add_field (type, "v2_int64", field_type);
386+ field_type = tdesc_named_type (feature, "uint128");
387+ tdesc_add_field (type, "uint128", field_type);
388+
389+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
390+ tdesc_add_flag (field_type, 0, "IE");
391+ tdesc_add_flag (field_type, 1, "DE");
392+ tdesc_add_flag (field_type, 2, "ZE");
393+ tdesc_add_flag (field_type, 3, "OE");
394+ tdesc_add_flag (field_type, 4, "UE");
395+ tdesc_add_flag (field_type, 5, "PE");
396+ tdesc_add_flag (field_type, 6, "DAZ");
397+ tdesc_add_flag (field_type, 7, "IM");
398+ tdesc_add_flag (field_type, 8, "DM");
399+ tdesc_add_flag (field_type, 9, "ZM");
400+ tdesc_add_flag (field_type, 10, "OM");
401+ tdesc_add_flag (field_type, 11, "UM");
402+ tdesc_add_flag (field_type, 12, "PM");
403+ tdesc_add_flag (field_type, 15, "FZ");
404+
405+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
406+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
407+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
408+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
409+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
410+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
411+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
412+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
413+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
414+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
415+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
416+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
417+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
418+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
419+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
420+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
421+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
422+
423+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
424+ tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
425+
426+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
427+ tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
428+ tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
429+ tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
430+ tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
431+ tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
432+ tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
433+ tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
434+ tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
435+ tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
436+ tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
437+ tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
438+ tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
439+ tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
440+ tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
441+ tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
442+ tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
443+
444+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
445+ type = tdesc_create_struct (feature, "br128");
446+ field_type = tdesc_named_type (feature, "uint64");
447+ tdesc_add_field (type, "lbound", field_type);
448+ field_type = tdesc_named_type (feature, "uint64");
449+ tdesc_add_field (type, "ubound_raw", field_type);
450+
451+ type = tdesc_create_struct (feature, "_bndstatus");
452+ tdesc_set_struct_size (type, 8);
453+ tdesc_add_bitfield (type, "bde", 2, 63);
454+ tdesc_add_bitfield (type, "error", 0, 1);
455+
456+ type = tdesc_create_union (feature, "status");
457+ field_type = tdesc_named_type (feature, "data_ptr");
458+ tdesc_add_field (type, "raw", field_type);
459+ field_type = tdesc_named_type (feature, "_bndstatus");
460+ tdesc_add_field (type, "status", field_type);
461+
462+ type = tdesc_create_struct (feature, "_bndcfgu");
463+ tdesc_set_struct_size (type, 8);
464+ tdesc_add_bitfield (type, "base", 12, 63);
465+ tdesc_add_bitfield (type, "reserved", 2, 11);
466+ tdesc_add_bitfield (type, "preserved", 1, 1);
467+ tdesc_add_bitfield (type, "enabled", 0, 0);
468+
469+ type = tdesc_create_union (feature, "cfgu");
470+ field_type = tdesc_named_type (feature, "data_ptr");
471+ tdesc_add_field (type, "raw", field_type);
472+ field_type = tdesc_named_type (feature, "_bndcfgu");
473+ tdesc_add_field (type, "config", field_type);
474+
475+ tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
476+ tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
477+ tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
478+ tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
479+ tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
480+ tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
481+
482+ tdesc_amd64_avx_mpx_linux = result;
483+}
484diff --git a/gdb/features/i386/amd64-avx-mpx-linux.xml b/gdb/features/i386/amd64-avx-mpx-linux.xml
485new file mode 100644
486index 0000000..526c700
487--- /dev/null
488+++ b/gdb/features/i386/amd64-avx-mpx-linux.xml
489@@ -0,0 +1,19 @@
490+<?xml version="1.0"?>
491+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
492+
493+ Copying and distribution of this file, with or without modification,
494+ are permitted in any medium without royalty provided the copyright
495+ notice and this notice are preserved. -->
496+
497+<!-- AMD64 with AVX and MPX - Includes Linux-only special "register". -->
498+
499+<!DOCTYPE target SYSTEM "gdb-target.dtd">
500+<target>
501+ <architecture>i386:x86-64</architecture>
502+ <osabi>GNU/Linux</osabi>
503+ <xi:include href="64bit-core.xml"/>
504+ <xi:include href="64bit-sse.xml"/>
505+ <xi:include href="64bit-linux.xml"/>
506+ <xi:include href="64bit-avx.xml"/>
507+ <xi:include href="64bit-mpx.xml"/>
508+</target>
509diff --git a/gdb/features/i386/amd64-avx-mpx.c b/gdb/features/i386/amd64-avx-mpx.c
510new file mode 100644
511index 0000000..1279f73
512--- /dev/null
513+++ b/gdb/features/i386/amd64-avx-mpx.c
514@@ -0,0 +1,206 @@
515+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
516+ Original: amd64-avx-mpx.xml */
517+
518+#include "defs.h"
519+#include "osabi.h"
520+#include "target-descriptions.h"
521+
522+struct target_desc *tdesc_amd64_avx_mpx;
523+static void
524+initialize_tdesc_amd64_avx_mpx (void)
525+{
526+ struct target_desc *result = allocate_target_description ();
527+ struct tdesc_feature *feature;
528+ struct tdesc_type *field_type;
529+ struct tdesc_type *type;
530+
531+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
532+
533+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
534+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
535+ tdesc_add_flag (field_type, 0, "CF");
536+ tdesc_add_flag (field_type, 1, "");
537+ tdesc_add_flag (field_type, 2, "PF");
538+ tdesc_add_flag (field_type, 4, "AF");
539+ tdesc_add_flag (field_type, 6, "ZF");
540+ tdesc_add_flag (field_type, 7, "SF");
541+ tdesc_add_flag (field_type, 8, "TF");
542+ tdesc_add_flag (field_type, 9, "IF");
543+ tdesc_add_flag (field_type, 10, "DF");
544+ tdesc_add_flag (field_type, 11, "OF");
545+ tdesc_add_flag (field_type, 14, "NT");
546+ tdesc_add_flag (field_type, 16, "RF");
547+ tdesc_add_flag (field_type, 17, "VM");
548+ tdesc_add_flag (field_type, 18, "AC");
549+ tdesc_add_flag (field_type, 19, "VIF");
550+ tdesc_add_flag (field_type, 20, "VIP");
551+ tdesc_add_flag (field_type, 21, "ID");
552+
553+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
554+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
555+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
556+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
557+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
558+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
559+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
560+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
561+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
562+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
563+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
564+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
565+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
566+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
567+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
568+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
569+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
570+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
571+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
572+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
573+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
574+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
575+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
576+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
577+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
578+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
579+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
580+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
581+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
582+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
583+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
584+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
585+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
586+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
587+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
588+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
589+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
590+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
591+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
592+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
593+
594+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
595+ field_type = tdesc_named_type (feature, "ieee_single");
596+ tdesc_create_vector (feature, "v4f", field_type, 4);
597+
598+ field_type = tdesc_named_type (feature, "ieee_double");
599+ tdesc_create_vector (feature, "v2d", field_type, 2);
600+
601+ field_type = tdesc_named_type (feature, "int8");
602+ tdesc_create_vector (feature, "v16i8", field_type, 16);
603+
604+ field_type = tdesc_named_type (feature, "int16");
605+ tdesc_create_vector (feature, "v8i16", field_type, 8);
606+
607+ field_type = tdesc_named_type (feature, "int32");
608+ tdesc_create_vector (feature, "v4i32", field_type, 4);
609+
610+ field_type = tdesc_named_type (feature, "int64");
611+ tdesc_create_vector (feature, "v2i64", field_type, 2);
612+
613+ type = tdesc_create_union (feature, "vec128");
614+ field_type = tdesc_named_type (feature, "v4f");
615+ tdesc_add_field (type, "v4_float", field_type);
616+ field_type = tdesc_named_type (feature, "v2d");
617+ tdesc_add_field (type, "v2_double", field_type);
618+ field_type = tdesc_named_type (feature, "v16i8");
619+ tdesc_add_field (type, "v16_int8", field_type);
620+ field_type = tdesc_named_type (feature, "v8i16");
621+ tdesc_add_field (type, "v8_int16", field_type);
622+ field_type = tdesc_named_type (feature, "v4i32");
623+ tdesc_add_field (type, "v4_int32", field_type);
624+ field_type = tdesc_named_type (feature, "v2i64");
625+ tdesc_add_field (type, "v2_int64", field_type);
626+ field_type = tdesc_named_type (feature, "uint128");
627+ tdesc_add_field (type, "uint128", field_type);
628+
629+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
630+ tdesc_add_flag (field_type, 0, "IE");
631+ tdesc_add_flag (field_type, 1, "DE");
632+ tdesc_add_flag (field_type, 2, "ZE");
633+ tdesc_add_flag (field_type, 3, "OE");
634+ tdesc_add_flag (field_type, 4, "UE");
635+ tdesc_add_flag (field_type, 5, "PE");
636+ tdesc_add_flag (field_type, 6, "DAZ");
637+ tdesc_add_flag (field_type, 7, "IM");
638+ tdesc_add_flag (field_type, 8, "DM");
639+ tdesc_add_flag (field_type, 9, "ZM");
640+ tdesc_add_flag (field_type, 10, "OM");
641+ tdesc_add_flag (field_type, 11, "UM");
642+ tdesc_add_flag (field_type, 12, "PM");
643+ tdesc_add_flag (field_type, 15, "FZ");
644+
645+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
646+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
647+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
648+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
649+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
650+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
651+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
652+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
653+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
654+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
655+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
656+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
657+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
658+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
659+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
660+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
661+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
662+
663+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
664+ tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
665+ tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
666+ tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
667+ tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
668+ tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
669+ tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
670+ tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
671+ tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
672+ tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
673+ tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
674+ tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
675+ tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
676+ tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
677+ tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
678+ tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
679+ tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
680+
681+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
682+ type = tdesc_create_struct (feature, "br128");
683+ field_type = tdesc_named_type (feature, "uint64");
684+ tdesc_add_field (type, "lbound", field_type);
685+ field_type = tdesc_named_type (feature, "uint64");
686+ tdesc_add_field (type, "ubound_raw", field_type);
687+
688+ type = tdesc_create_struct (feature, "_bndstatus");
689+ tdesc_set_struct_size (type, 8);
690+ tdesc_add_bitfield (type, "bde", 2, 63);
691+ tdesc_add_bitfield (type, "error", 0, 1);
692+
693+ type = tdesc_create_union (feature, "status");
694+ field_type = tdesc_named_type (feature, "data_ptr");
695+ tdesc_add_field (type, "raw", field_type);
696+ field_type = tdesc_named_type (feature, "_bndstatus");
697+ tdesc_add_field (type, "status", field_type);
698+
699+ type = tdesc_create_struct (feature, "_bndcfgu");
700+ tdesc_set_struct_size (type, 8);
701+ tdesc_add_bitfield (type, "base", 12, 63);
702+ tdesc_add_bitfield (type, "reserved", 2, 11);
703+ tdesc_add_bitfield (type, "preserved", 1, 1);
704+ tdesc_add_bitfield (type, "enabled", 0, 0);
705+
706+ type = tdesc_create_union (feature, "cfgu");
707+ field_type = tdesc_named_type (feature, "data_ptr");
708+ tdesc_add_field (type, "raw", field_type);
709+ field_type = tdesc_named_type (feature, "_bndcfgu");
710+ tdesc_add_field (type, "config", field_type);
711+
712+ tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
713+ tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
714+ tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
715+ tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
716+ tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
717+ tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
718+
719+ tdesc_amd64_avx_mpx = result;
720+}
721diff --git a/gdb/features/i386/amd64-avx-mpx.xml b/gdb/features/i386/amd64-avx-mpx.xml
722new file mode 100644
723index 0000000..3eea6dd
724--- /dev/null
725+++ b/gdb/features/i386/amd64-avx-mpx.xml
726@@ -0,0 +1,17 @@
727+<?xml version="1.0"?>
728+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
729+
730+ Copying and distribution of this file, with or without modification,
731+ are permitted in any medium without royalty provided the copyright
732+ notice and this notice are preserved. -->
733+
734+<!-- AMD64 with AVX and MPX -->
735+
736+<!DOCTYPE target SYSTEM "gdb-target.dtd">
737+<target>
738+ <architecture>i386:x86-64</architecture>
739+ <xi:include href="64bit-core.xml"/>
740+ <xi:include href="64bit-sse.xml"/>
741+ <xi:include href="64bit-avx.xml"/>
742+ <xi:include href="64bit-mpx.xml"/>
743+</target>
744diff --git a/gdb/features/i386/amd64-mpx-linux.c b/gdb/features/i386/amd64-mpx-linux.c
745index 86a1774..5c1584b 100644
746--- a/gdb/features/i386/amd64-mpx-linux.c
747+++ b/gdb/features/i386/amd64-mpx-linux.c
748@@ -151,24 +151,6 @@ initialize_tdesc_amd64_mpx_linux (void)
749 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
750 tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
751
752- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
753- tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
754- tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
755- tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
756- tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
757- tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
758- tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
759- tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
760- tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
761- tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
762- tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
763- tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
764- tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
765- tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
766- tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
767- tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
768- tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
769-
770 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
771 type = tdesc_create_struct (feature, "br128");
772 field_type = tdesc_named_type (feature, "uint64");
773@@ -200,12 +182,12 @@ initialize_tdesc_amd64_mpx_linux (void)
774 field_type = tdesc_named_type (feature, "_bndcfgu");
775 tdesc_add_field (type, "config", field_type);
776
777- tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
778- tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
779- tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
780- tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
781- tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
782- tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
783+ tdesc_create_reg (feature, "bnd0raw", 58, 1, NULL, 128, "br128");
784+ tdesc_create_reg (feature, "bnd1raw", 59, 1, NULL, 128, "br128");
785+ tdesc_create_reg (feature, "bnd2raw", 60, 1, NULL, 128, "br128");
786+ tdesc_create_reg (feature, "bnd3raw", 61, 1, NULL, 128, "br128");
787+ tdesc_create_reg (feature, "bndcfgu", 62, 1, NULL, 64, "cfgu");
788+ tdesc_create_reg (feature, "bndstatus", 63, 1, NULL, 64, "status");
789
790 tdesc_amd64_mpx_linux = result;
791 }
792diff --git a/gdb/features/i386/amd64-mpx-linux.xml b/gdb/features/i386/amd64-mpx-linux.xml
793index 15e87b4..835126b 100644
794--- a/gdb/features/i386/amd64-mpx-linux.xml
795+++ b/gdb/features/i386/amd64-mpx-linux.xml
796@@ -14,6 +14,5 @@
797 <xi:include href="64bit-core.xml"/>
798 <xi:include href="64bit-sse.xml"/>
799 <xi:include href="64bit-linux.xml"/>
800- <xi:include href="64bit-avx.xml"/>
801 <xi:include href="64bit-mpx.xml"/>
802 </target>
803diff --git a/gdb/features/i386/amd64-mpx.c b/gdb/features/i386/amd64-mpx.c
804index 15ae5f7..4c852ef 100644
805--- a/gdb/features/i386/amd64-mpx.c
806+++ b/gdb/features/i386/amd64-mpx.c
807@@ -146,24 +146,6 @@ initialize_tdesc_amd64_mpx (void)
808 tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
809 tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
810
811- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
812- tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
813- tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
814- tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
815- tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
816- tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
817- tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
818- tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
819- tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
820- tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
821- tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
822- tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
823- tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
824- tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
825- tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
826- tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
827- tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
828-
829 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
830 type = tdesc_create_struct (feature, "br128");
831 field_type = tdesc_named_type (feature, "uint64");
832@@ -195,12 +177,12 @@ initialize_tdesc_amd64_mpx (void)
833 field_type = tdesc_named_type (feature, "_bndcfgu");
834 tdesc_add_field (type, "config", field_type);
835
836- tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
837- tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
838- tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
839- tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
840- tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
841- tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
842+ tdesc_create_reg (feature, "bnd0raw", 57, 1, NULL, 128, "br128");
843+ tdesc_create_reg (feature, "bnd1raw", 58, 1, NULL, 128, "br128");
844+ tdesc_create_reg (feature, "bnd2raw", 59, 1, NULL, 128, "br128");
845+ tdesc_create_reg (feature, "bnd3raw", 60, 1, NULL, 128, "br128");
846+ tdesc_create_reg (feature, "bndcfgu", 61, 1, NULL, 64, "cfgu");
847+ tdesc_create_reg (feature, "bndstatus", 62, 1, NULL, 64, "status");
848
849 tdesc_amd64_mpx = result;
850 }
851diff --git a/gdb/features/i386/amd64-mpx.xml b/gdb/features/i386/amd64-mpx.xml
852index 21b6df3..e458736 100644
853--- a/gdb/features/i386/amd64-mpx.xml
854+++ b/gdb/features/i386/amd64-mpx.xml
855@@ -12,6 +12,5 @@
856 <architecture>i386:x86-64</architecture>
857 <xi:include href="64bit-core.xml"/>
858 <xi:include href="64bit-sse.xml"/>
859- <xi:include href="64bit-avx.xml"/>
860 <xi:include href="64bit-mpx.xml"/>
861 </target>
862diff --git a/gdb/features/i386/i386-avx-mpx-linux.c b/gdb/features/i386/i386-avx-mpx-linux.c
863new file mode 100644
864index 0000000..dd75403
865--- /dev/null
866+++ b/gdb/features/i386/i386-avx-mpx-linux.c
867@@ -0,0 +1,187 @@
868+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
869+ Original: i386-avx-mpx-linux.xml */
870+
871+#include "defs.h"
872+#include "osabi.h"
873+#include "target-descriptions.h"
874+
875+struct target_desc *tdesc_i386_avx_mpx_linux;
876+static void
877+initialize_tdesc_i386_avx_mpx_linux (void)
878+{
879+ struct target_desc *result = allocate_target_description ();
880+ struct tdesc_feature *feature;
881+ struct tdesc_type *field_type;
882+ struct tdesc_type *type;
883+
884+ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
885+
886+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
887+
888+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
889+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
890+ tdesc_add_flag (field_type, 0, "CF");
891+ tdesc_add_flag (field_type, 1, "");
892+ tdesc_add_flag (field_type, 2, "PF");
893+ tdesc_add_flag (field_type, 4, "AF");
894+ tdesc_add_flag (field_type, 6, "ZF");
895+ tdesc_add_flag (field_type, 7, "SF");
896+ tdesc_add_flag (field_type, 8, "TF");
897+ tdesc_add_flag (field_type, 9, "IF");
898+ tdesc_add_flag (field_type, 10, "DF");
899+ tdesc_add_flag (field_type, 11, "OF");
900+ tdesc_add_flag (field_type, 14, "NT");
901+ tdesc_add_flag (field_type, 16, "RF");
902+ tdesc_add_flag (field_type, 17, "VM");
903+ tdesc_add_flag (field_type, 18, "AC");
904+ tdesc_add_flag (field_type, 19, "VIF");
905+ tdesc_add_flag (field_type, 20, "VIP");
906+ tdesc_add_flag (field_type, 21, "ID");
907+
908+ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
909+ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
910+ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
911+ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
912+ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
913+ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
914+ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
915+ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
916+ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
917+ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
918+ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
919+ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
920+ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
921+ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
922+ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
923+ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
924+ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
925+ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
926+ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
927+ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
928+ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
929+ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
930+ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
931+ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
932+ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
933+ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
934+ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
935+ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
936+ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
937+ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
938+ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
939+ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
940+
941+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
942+ field_type = tdesc_named_type (feature, "ieee_single");
943+ tdesc_create_vector (feature, "v4f", field_type, 4);
944+
945+ field_type = tdesc_named_type (feature, "ieee_double");
946+ tdesc_create_vector (feature, "v2d", field_type, 2);
947+
948+ field_type = tdesc_named_type (feature, "int8");
949+ tdesc_create_vector (feature, "v16i8", field_type, 16);
950+
951+ field_type = tdesc_named_type (feature, "int16");
952+ tdesc_create_vector (feature, "v8i16", field_type, 8);
953+
954+ field_type = tdesc_named_type (feature, "int32");
955+ tdesc_create_vector (feature, "v4i32", field_type, 4);
956+
957+ field_type = tdesc_named_type (feature, "int64");
958+ tdesc_create_vector (feature, "v2i64", field_type, 2);
959+
960+ type = tdesc_create_union (feature, "vec128");
961+ field_type = tdesc_named_type (feature, "v4f");
962+ tdesc_add_field (type, "v4_float", field_type);
963+ field_type = tdesc_named_type (feature, "v2d");
964+ tdesc_add_field (type, "v2_double", field_type);
965+ field_type = tdesc_named_type (feature, "v16i8");
966+ tdesc_add_field (type, "v16_int8", field_type);
967+ field_type = tdesc_named_type (feature, "v8i16");
968+ tdesc_add_field (type, "v8_int16", field_type);
969+ field_type = tdesc_named_type (feature, "v4i32");
970+ tdesc_add_field (type, "v4_int32", field_type);
971+ field_type = tdesc_named_type (feature, "v2i64");
972+ tdesc_add_field (type, "v2_int64", field_type);
973+ field_type = tdesc_named_type (feature, "uint128");
974+ tdesc_add_field (type, "uint128", field_type);
975+
976+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
977+ tdesc_add_flag (field_type, 0, "IE");
978+ tdesc_add_flag (field_type, 1, "DE");
979+ tdesc_add_flag (field_type, 2, "ZE");
980+ tdesc_add_flag (field_type, 3, "OE");
981+ tdesc_add_flag (field_type, 4, "UE");
982+ tdesc_add_flag (field_type, 5, "PE");
983+ tdesc_add_flag (field_type, 6, "DAZ");
984+ tdesc_add_flag (field_type, 7, "IM");
985+ tdesc_add_flag (field_type, 8, "DM");
986+ tdesc_add_flag (field_type, 9, "ZM");
987+ tdesc_add_flag (field_type, 10, "OM");
988+ tdesc_add_flag (field_type, 11, "UM");
989+ tdesc_add_flag (field_type, 12, "PM");
990+ tdesc_add_flag (field_type, 15, "FZ");
991+
992+ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
993+ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
994+ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
995+ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
996+ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
997+ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
998+ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
999+ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
1000+ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
1001+
1002+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
1003+ tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
1004+
1005+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1006+ tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
1007+ tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
1008+ tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
1009+ tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
1010+ tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
1011+ tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
1012+ tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
1013+ tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
1014+
1015+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1016+ type = tdesc_create_struct (feature, "br128");
1017+ field_type = tdesc_named_type (feature, "uint64");
1018+ tdesc_add_field (type, "lbound", field_type);
1019+ field_type = tdesc_named_type (feature, "uint64");
1020+ tdesc_add_field (type, "ubound_raw", field_type);
1021+
1022+ type = tdesc_create_struct (feature, "_bndstatus");
1023+ tdesc_set_struct_size (type, 8);
1024+ tdesc_add_bitfield (type, "bde", 2, 31);
1025+ tdesc_add_bitfield (type, "error", 0, 1);
1026+
1027+ type = tdesc_create_union (feature, "status");
1028+ field_type = tdesc_named_type (feature, "data_ptr");
1029+ tdesc_add_field (type, "raw", field_type);
1030+ field_type = tdesc_named_type (feature, "_bndstatus");
1031+ tdesc_add_field (type, "status", field_type);
1032+
1033+ type = tdesc_create_struct (feature, "_bndcfgu");
1034+ tdesc_set_struct_size (type, 8);
1035+ tdesc_add_bitfield (type, "base", 12, 31);
1036+ tdesc_add_bitfield (type, "reserved", 2, 11);
1037+ tdesc_add_bitfield (type, "preserved", 1, 1);
1038+ tdesc_add_bitfield (type, "enabled", 0, 1);
1039+
1040+ type = tdesc_create_union (feature, "cfgu");
1041+ field_type = tdesc_named_type (feature, "data_ptr");
1042+ tdesc_add_field (type, "raw", field_type);
1043+ field_type = tdesc_named_type (feature, "_bndcfgu");
1044+ tdesc_add_field (type, "config", field_type);
1045+
1046+ tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
1047+ tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
1048+ tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
1049+ tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
1050+ tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
1051+ tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
1052+
1053+ tdesc_i386_avx_mpx_linux = result;
1054+}
1055diff --git a/gdb/features/i386/i386-avx-mpx-linux.xml b/gdb/features/i386/i386-avx-mpx-linux.xml
1056new file mode 100644
1057index 0000000..c9a1a61
1058--- /dev/null
1059+++ b/gdb/features/i386/i386-avx-mpx-linux.xml
1060@@ -0,0 +1,19 @@
1061+<?xml version="1.0"?>
1062+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
1063+
1064+ Copying and distribution of this file, with or without modification,
1065+ are permitted in any medium without royalty provided the copyright
1066+ notice and this notice are preserved. -->
1067+
1068+<!-- I386 with AVX and MPX- Includes Linux-only special "register". -->
1069+
1070+<!DOCTYPE target SYSTEM "gdb-target.dtd">
1071+<target>
1072+ <architecture>i386</architecture>
1073+ <osabi>GNU/Linux</osabi>
1074+ <xi:include href="32bit-core.xml"/>
1075+ <xi:include href="32bit-sse.xml"/>
1076+ <xi:include href="32bit-linux.xml"/>
1077+ <xi:include href="32bit-avx.xml"/>
1078+ <xi:include href="32bit-mpx.xml"/>
1079+</target>
1080diff --git a/gdb/features/i386/i386-avx-mpx.c b/gdb/features/i386/i386-avx-mpx.c
1081new file mode 100644
1082index 0000000..f104e4b
1083--- /dev/null
1084+++ b/gdb/features/i386/i386-avx-mpx.c
1085@@ -0,0 +1,182 @@
1086+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
1087+ Original: i386-avx-mpx.xml */
1088+
1089+#include "defs.h"
1090+#include "osabi.h"
1091+#include "target-descriptions.h"
1092+
1093+struct target_desc *tdesc_i386_avx_mpx;
1094+static void
1095+initialize_tdesc_i386_avx_mpx (void)
1096+{
1097+ struct target_desc *result = allocate_target_description ();
1098+ struct tdesc_feature *feature;
1099+ struct tdesc_type *field_type;
1100+ struct tdesc_type *type;
1101+
1102+ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
1103+
1104+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
1105+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
1106+ tdesc_add_flag (field_type, 0, "CF");
1107+ tdesc_add_flag (field_type, 1, "");
1108+ tdesc_add_flag (field_type, 2, "PF");
1109+ tdesc_add_flag (field_type, 4, "AF");
1110+ tdesc_add_flag (field_type, 6, "ZF");
1111+ tdesc_add_flag (field_type, 7, "SF");
1112+ tdesc_add_flag (field_type, 8, "TF");
1113+ tdesc_add_flag (field_type, 9, "IF");
1114+ tdesc_add_flag (field_type, 10, "DF");
1115+ tdesc_add_flag (field_type, 11, "OF");
1116+ tdesc_add_flag (field_type, 14, "NT");
1117+ tdesc_add_flag (field_type, 16, "RF");
1118+ tdesc_add_flag (field_type, 17, "VM");
1119+ tdesc_add_flag (field_type, 18, "AC");
1120+ tdesc_add_flag (field_type, 19, "VIF");
1121+ tdesc_add_flag (field_type, 20, "VIP");
1122+ tdesc_add_flag (field_type, 21, "ID");
1123+
1124+ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
1125+ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
1126+ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
1127+ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
1128+ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
1129+ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
1130+ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
1131+ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
1132+ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
1133+ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
1134+ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
1135+ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
1136+ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
1137+ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
1138+ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
1139+ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
1140+ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
1141+ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
1142+ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
1143+ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
1144+ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
1145+ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
1146+ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
1147+ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
1148+ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
1149+ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
1150+ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
1151+ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
1152+ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
1153+ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
1154+ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
1155+ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
1156+
1157+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
1158+ field_type = tdesc_named_type (feature, "ieee_single");
1159+ tdesc_create_vector (feature, "v4f", field_type, 4);
1160+
1161+ field_type = tdesc_named_type (feature, "ieee_double");
1162+ tdesc_create_vector (feature, "v2d", field_type, 2);
1163+
1164+ field_type = tdesc_named_type (feature, "int8");
1165+ tdesc_create_vector (feature, "v16i8", field_type, 16);
1166+
1167+ field_type = tdesc_named_type (feature, "int16");
1168+ tdesc_create_vector (feature, "v8i16", field_type, 8);
1169+
1170+ field_type = tdesc_named_type (feature, "int32");
1171+ tdesc_create_vector (feature, "v4i32", field_type, 4);
1172+
1173+ field_type = tdesc_named_type (feature, "int64");
1174+ tdesc_create_vector (feature, "v2i64", field_type, 2);
1175+
1176+ type = tdesc_create_union (feature, "vec128");
1177+ field_type = tdesc_named_type (feature, "v4f");
1178+ tdesc_add_field (type, "v4_float", field_type);
1179+ field_type = tdesc_named_type (feature, "v2d");
1180+ tdesc_add_field (type, "v2_double", field_type);
1181+ field_type = tdesc_named_type (feature, "v16i8");
1182+ tdesc_add_field (type, "v16_int8", field_type);
1183+ field_type = tdesc_named_type (feature, "v8i16");
1184+ tdesc_add_field (type, "v8_int16", field_type);
1185+ field_type = tdesc_named_type (feature, "v4i32");
1186+ tdesc_add_field (type, "v4_int32", field_type);
1187+ field_type = tdesc_named_type (feature, "v2i64");
1188+ tdesc_add_field (type, "v2_int64", field_type);
1189+ field_type = tdesc_named_type (feature, "uint128");
1190+ tdesc_add_field (type, "uint128", field_type);
1191+
1192+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
1193+ tdesc_add_flag (field_type, 0, "IE");
1194+ tdesc_add_flag (field_type, 1, "DE");
1195+ tdesc_add_flag (field_type, 2, "ZE");
1196+ tdesc_add_flag (field_type, 3, "OE");
1197+ tdesc_add_flag (field_type, 4, "UE");
1198+ tdesc_add_flag (field_type, 5, "PE");
1199+ tdesc_add_flag (field_type, 6, "DAZ");
1200+ tdesc_add_flag (field_type, 7, "IM");
1201+ tdesc_add_flag (field_type, 8, "DM");
1202+ tdesc_add_flag (field_type, 9, "ZM");
1203+ tdesc_add_flag (field_type, 10, "OM");
1204+ tdesc_add_flag (field_type, 11, "UM");
1205+ tdesc_add_flag (field_type, 12, "PM");
1206+ tdesc_add_flag (field_type, 15, "FZ");
1207+
1208+ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
1209+ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
1210+ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
1211+ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
1212+ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
1213+ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
1214+ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
1215+ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
1216+ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
1217+
1218+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1219+ tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
1220+ tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
1221+ tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
1222+ tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
1223+ tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
1224+ tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
1225+ tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
1226+ tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
1227+
1228+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1229+ type = tdesc_create_struct (feature, "br128");
1230+ field_type = tdesc_named_type (feature, "uint64");
1231+ tdesc_add_field (type, "lbound", field_type);
1232+ field_type = tdesc_named_type (feature, "uint64");
1233+ tdesc_add_field (type, "ubound_raw", field_type);
1234+
1235+ type = tdesc_create_struct (feature, "_bndstatus");
1236+ tdesc_set_struct_size (type, 8);
1237+ tdesc_add_bitfield (type, "bde", 2, 31);
1238+ tdesc_add_bitfield (type, "error", 0, 1);
1239+
1240+ type = tdesc_create_union (feature, "status");
1241+ field_type = tdesc_named_type (feature, "data_ptr");
1242+ tdesc_add_field (type, "raw", field_type);
1243+ field_type = tdesc_named_type (feature, "_bndstatus");
1244+ tdesc_add_field (type, "status", field_type);
1245+
1246+ type = tdesc_create_struct (feature, "_bndcfgu");
1247+ tdesc_set_struct_size (type, 8);
1248+ tdesc_add_bitfield (type, "base", 12, 31);
1249+ tdesc_add_bitfield (type, "reserved", 2, 11);
1250+ tdesc_add_bitfield (type, "preserved", 1, 1);
1251+ tdesc_add_bitfield (type, "enabled", 0, 1);
1252+
1253+ type = tdesc_create_union (feature, "cfgu");
1254+ field_type = tdesc_named_type (feature, "data_ptr");
1255+ tdesc_add_field (type, "raw", field_type);
1256+ field_type = tdesc_named_type (feature, "_bndcfgu");
1257+ tdesc_add_field (type, "config", field_type);
1258+
1259+ tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
1260+ tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
1261+ tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
1262+ tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
1263+ tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
1264+ tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
1265+
1266+ tdesc_i386_avx_mpx = result;
1267+}
1268diff --git a/gdb/features/i386/i386-avx-mpx.xml b/gdb/features/i386/i386-avx-mpx.xml
1269new file mode 100644
1270index 0000000..ab97367
1271--- /dev/null
1272+++ b/gdb/features/i386/i386-avx-mpx.xml
1273@@ -0,0 +1,17 @@
1274+<?xml version="1.0"?>
1275+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
1276+
1277+ Copying and distribution of this file, with or without modification,
1278+ are permitted in any medium without royalty provided the copyright
1279+ notice and this notice are preserved. -->
1280+
1281+<!-- I386 with AVX and MPX -->
1282+
1283+<!DOCTYPE target SYSTEM "gdb-target.dtd">
1284+<target>
1285+ <architecture>i386</architecture>
1286+ <xi:include href="32bit-core.xml"/>
1287+ <xi:include href="32bit-sse.xml"/>
1288+ <xi:include href="32bit-avx.xml"/>
1289+ <xi:include href="32bit-mpx.xml"/>
1290+</target>
1291diff --git a/gdb/features/i386/i386-mpx-linux.c b/gdb/features/i386/i386-mpx-linux.c
1292index dbf8789..c6bafea 100644
1293--- a/gdb/features/i386/i386-mpx-linux.c
1294+++ b/gdb/features/i386/i386-mpx-linux.c
1295@@ -135,16 +135,6 @@ initialize_tdesc_i386_mpx_linux (void)
1296 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
1297 tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
1298
1299- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1300- tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
1301- tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
1302- tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
1303- tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
1304- tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
1305- tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
1306- tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
1307- tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
1308-
1309 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1310 type = tdesc_create_struct (feature, "br128");
1311 field_type = tdesc_named_type (feature, "uint64");
1312@@ -176,12 +166,12 @@ initialize_tdesc_i386_mpx_linux (void)
1313 field_type = tdesc_named_type (feature, "_bndcfgu");
1314 tdesc_add_field (type, "config", field_type);
1315
1316- tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
1317- tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
1318- tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
1319- tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
1320- tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
1321- tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
1322+ tdesc_create_reg (feature, "bnd0raw", 42, 1, NULL, 128, "br128");
1323+ tdesc_create_reg (feature, "bnd1raw", 43, 1, NULL, 128, "br128");
1324+ tdesc_create_reg (feature, "bnd2raw", 44, 1, NULL, 128, "br128");
1325+ tdesc_create_reg (feature, "bnd3raw", 45, 1, NULL, 128, "br128");
1326+ tdesc_create_reg (feature, "bndcfgu", 46, 1, NULL, 64, "cfgu");
1327+ tdesc_create_reg (feature, "bndstatus", 47, 1, NULL, 64, "status");
1328
1329 tdesc_i386_mpx_linux = result;
1330 }
1331diff --git a/gdb/features/i386/i386-mpx-linux.xml b/gdb/features/i386/i386-mpx-linux.xml
1332index c4004d6..4228cf5 100644
1333--- a/gdb/features/i386/i386-mpx-linux.xml
1334+++ b/gdb/features/i386/i386-mpx-linux.xml
1335@@ -14,6 +14,5 @@
1336 <xi:include href="32bit-core.xml"/>
1337 <xi:include href="32bit-sse.xml"/>
1338 <xi:include href="32bit-linux.xml"/>
1339- <xi:include href="32bit-avx.xml"/>
1340 <xi:include href="32bit-mpx.xml"/>
1341 </target>
1342diff --git a/gdb/features/i386/i386-mpx.c b/gdb/features/i386/i386-mpx.c
1343index 1e04afd..430db3f 100644
1344--- a/gdb/features/i386/i386-mpx.c
1345+++ b/gdb/features/i386/i386-mpx.c
1346@@ -130,16 +130,6 @@ initialize_tdesc_i386_mpx (void)
1347 tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
1348 tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
1349
1350- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1351- tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
1352- tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
1353- tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
1354- tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
1355- tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
1356- tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
1357- tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
1358- tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
1359-
1360 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1361 type = tdesc_create_struct (feature, "br128");
1362 field_type = tdesc_named_type (feature, "uint64");
1363@@ -171,12 +161,12 @@ initialize_tdesc_i386_mpx (void)
1364 field_type = tdesc_named_type (feature, "_bndcfgu");
1365 tdesc_add_field (type, "config", field_type);
1366
1367- tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
1368- tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
1369- tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
1370- tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
1371- tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
1372- tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
1373+ tdesc_create_reg (feature, "bnd0raw", 41, 1, NULL, 128, "br128");
1374+ tdesc_create_reg (feature, "bnd1raw", 42, 1, NULL, 128, "br128");
1375+ tdesc_create_reg (feature, "bnd2raw", 43, 1, NULL, 128, "br128");
1376+ tdesc_create_reg (feature, "bnd3raw", 44, 1, NULL, 128, "br128");
1377+ tdesc_create_reg (feature, "bndcfgu", 45, 1, NULL, 64, "cfgu");
1378+ tdesc_create_reg (feature, "bndstatus", 46, 1, NULL, 64, "status");
1379
1380 tdesc_i386_mpx = result;
1381 }
1382diff --git a/gdb/features/i386/i386-mpx.xml b/gdb/features/i386/i386-mpx.xml
1383index 52a68db..c1806cb 100644
1384--- a/gdb/features/i386/i386-mpx.xml
1385+++ b/gdb/features/i386/i386-mpx.xml
1386@@ -12,6 +12,5 @@
1387 <architecture>i386</architecture>
1388 <xi:include href="32bit-core.xml"/>
1389 <xi:include href="32bit-sse.xml"/>
1390- <xi:include href="32bit-avx.xml"/>
1391 <xi:include href="32bit-mpx.xml"/>
1392 </target>
1393diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
1394index 1e874e3..dee2ea1 100644
1395--- a/gdb/gdbserver/Makefile.in
1396+++ b/gdb/gdbserver/Makefile.in
1397@@ -376,9 +376,11 @@ clean:
1398 rm -f xml-builtin.c stamp-xml
1399 rm -f i386-avx.c i386-avx-linux.c
1400 rm -f i386-mpx.c i386-mpx-linux.c
1401+ rm -f i386-avx-mpx.c i386-avx-mpx-linux.c
1402 rm -f i386-avx512.c i386-avx512-linux.c
1403 rm -f amd64-avx.c amd64-avx-linux.c
1404 rm -f amd64-mpx.c amd64-mpx-linux.c
1405+ rm -f amd64-avx-mpx.c amd64-avx-mpx-linux.c
1406 rm -f amd64-avx512.c amd64-avx512-linux.c
1407 rm -f i386-mmx.c i386-mmx-linux.c
1408 rm -f x32.c x32-linux.c
1409@@ -495,6 +497,21 @@ regcache-ipa.o: regcache.c
1410 i386-linux-ipa.o: i386-linux.c
1411 $(IPAGENT_COMPILE) $<
1412 $(POSTCOMPILE)
1413+i386-mmx-linux-ipa.o: i386-mmx-linux.c
1414+ $(IPAGENT_COMPILE) $<
1415+ $(POSTCOMPILE)
1416+i386-avx-linux-ipa.o: i386-avx-linux.c
1417+ $(IPAGENT_COMPILE) $<
1418+ $(POSTCOMPILE)
1419+i386-mpx-linux-ipa.o: i386-mpx-linux.c
1420+ $(IPAGENT_COMPILE) $<
1421+ $(POSTCOMPILE)
1422+i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c
1423+ $(IPAGENT_COMPILE) $<
1424+ $(POSTCOMPILE)
1425+i386-avx512-linux-ipa.o: i386-avx512-linux.c
1426+ $(IPAGENT_COMPILE) $<
1427+ $(POSTCOMPILE)
1428 linux-i386-ipa.o: linux-i386-ipa.c
1429 $(IPAGENT_COMPILE) $<
1430 $(POSTCOMPILE)
1431@@ -504,6 +521,18 @@ linux-amd64-ipa.o: linux-amd64-ipa.c
1432 amd64-linux-ipa.o: amd64-linux.c
1433 $(IPAGENT_COMPILE) $<
1434 $(POSTCOMPILE)
1435+amd64-avx-linux-ipa.o: amd64-avx-linux.c
1436+ $(IPAGENT_COMPILE) $<
1437+ $(POSTCOMPILE)
1438+amd64-mpx-linux-ipa.o: amd64-mpx-linux.c
1439+ $(IPAGENT_COMPILE) $<
1440+ $(POSTCOMPILE)
1441+amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c
1442+ $(IPAGENT_COMPILE) $<
1443+ $(POSTCOMPILE)
1444+amd64-avx512-linux-ipa.o: amd64-avx512-linux.c
1445+ $(IPAGENT_COMPILE) $<
1446+ $(POSTCOMPILE)
1447 linux-aarch64-ipa.o: linux-aarch64-ipa.c
1448 $(IPAGENT_COMPILE) $<
1449 $(POSTCOMPILE)
1450@@ -694,6 +723,10 @@ i386-mpx.c : $(srcdir)/../regformats/i386/i386-mpx.dat $(regdat_sh)
1451 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx.dat i386-mpx.c
1452 i386-mpx-linux.c : $(srcdir)/../regformats/i386/i386-mpx-linux.dat $(regdat_sh)
1453 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx-linux.dat i386-mpx-linux.c
1454+i386-avx-mpx.c : $(srcdir)/../regformats/i386/i386-avx-mpx.dat $(regdat_sh)
1455+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx.dat i386-avx-mpx.c
1456+i386-avx-mpx-linux.c : $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat $(regdat_sh)
1457+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat i386-avx-mpx-linux.c
1458 i386-mmx.c : $(srcdir)/../regformats/i386/i386-mmx.dat $(regdat_sh)
1459 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx.dat i386-mmx.c
1460 i386-mmx-linux.c : $(srcdir)/../regformats/i386/i386-mmx-linux.dat $(regdat_sh)
1461@@ -808,6 +841,10 @@ amd64-mpx.c : $(srcdir)/../regformats/i386/amd64-mpx.dat $(regdat_sh)
1462 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx.dat amd64-mpx.c
1463 amd64-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-mpx-linux.dat $(regdat_sh)
1464 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx-linux.dat amd64-mpx-linux.c
1465+amd64-avx-mpx.c : $(srcdir)/../regformats/i386/amd64-avx-mpx.dat $(regdat_sh)
1466+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx.dat amd64-avx-mpx.c
1467+amd64-avx-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat $(regdat_sh)
1468+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat amd64-avx-mpx-linux.c
1469 x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh)
1470 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c
1471 x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh)
1472diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
1473index a54b9e7..4935a36 100644
1474--- a/gdb/gdbserver/configure.srv
1475+++ b/gdb/gdbserver/configure.srv
1476@@ -24,20 +24,23 @@
1477 # Default hostio_last_error implementation
1478 srv_hostio_err_objs="hostio-errno.o"
1479
1480-srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-mmx.o"
1481-srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-mmx-linux.o"
1482-srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o x32.o x32-avx.o x32-avx512.o"
1483-srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o"
1484+srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-avx-mpx.o i386-mmx.o"
1485+srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-avx-mpx-linux.o i386-mmx-linux.o"
1486+srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o amd64-avx-mpx.o x32.o x32-avx.o x32-avx512.o"
1487+srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o amd64-avx-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o"
1488+
1489+
1490+ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx512-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o"
1491+ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx512-linux-ipa.o amd64-mpx-linux-ipa.o"
1492
1493-ipa_i386_linux_regobj=i386-linux-ipa.o
1494-ipa_amd64_linux_regobj=amd64-linux-ipa.o
1495
1496 srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml"
1497 srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/64bit-avx512.xml i386/x32-core.xml i386/64bit-mpx.xml"
1498-srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
1499-srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml $srv_i386_64bit_xmlfiles"
1500-srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml $srv_i386_32bit_xmlfiles"
1501-srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles"
1502+srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-avx-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles"
1503+srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml i386/amd64-avx-mpx.xml $srv_i386_64bit_xmlfiles"
1504+srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml i386/i386-avx-mpx-linux.xml $srv_i386_32bit_xmlfiles"
1505+srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/amd64-avx-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles"
1506+
1507
1508
1509 # Linux object files. This is so we don't have to repeat
1510diff --git a/gdb/gdbserver/linux-aarch64-ipa.c b/gdb/gdbserver/linux-aarch64-ipa.c
1511index 758708d..f1eaa70 100644
1512--- a/gdb/gdbserver/linux-aarch64-ipa.c
1513+++ b/gdb/gdbserver/linux-aarch64-ipa.c
1514@@ -143,9 +143,18 @@ gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum)
1515 + aarch64_ft_collect_regmap[regnum] * FT_CR_SIZE);
1516 }
1517
1518+/* Return target_desc to use for IPA, given the tdesc index passed by
1519+ gdbserver. Index is ignored, since we have only one tdesc
1520+ at the moment. */
1521+
1522+const struct target_desc *
1523+get_ipa_tdesc (int idx)
1524+{
1525+ return tdesc_aarch64;
1526+}
1527+
1528 void
1529 initialize_low_tracepoint (void)
1530 {
1531 init_registers_aarch64 ();
1532- ipa_tdesc = tdesc_aarch64;
1533 }
1534diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c
1535index 2eeedcd..f9c72a0 100644
1536--- a/gdb/gdbserver/linux-amd64-ipa.c
1537+++ b/gdb/gdbserver/linux-amd64-ipa.c
1538@@ -20,6 +20,7 @@
1539
1540 #include "server.h"
1541 #include "tracepoint.h"
1542+#include "linux-x86-tdesc.h"
1543
1544 /* Defined in auto-generated file amd64-linux.c. */
1545 void init_registers_amd64_linux (void);
1546@@ -166,9 +167,37 @@ supply_static_tracepoint_registers (struct regcache *regcache,
1547
1548 #endif /* HAVE_UST */
1549
1550+/* Return target_desc to use for IPA, given the tdesc index passed by
1551+ gdbserver. */
1552+
1553+const struct target_desc *
1554+get_ipa_tdesc (int idx)
1555+{
1556+ switch (idx)
1557+ {
1558+ case X86_TDESC_SSE:
1559+ return tdesc_amd64_linux;
1560+ case X86_TDESC_AVX:
1561+ return tdesc_amd64_avx_linux;
1562+ case X86_TDESC_MPX:
1563+ return tdesc_amd64_mpx_linux;
1564+ case X86_TDESC_AVX_MPX:
1565+ return tdesc_amd64_avx_mpx_linux;
1566+ case X86_TDESC_AVX512:
1567+ return tdesc_amd64_avx512_linux;
1568+ default:
1569+ internal_error (__FILE__, __LINE__,
1570+ "unknown ipa tdesc index: %d", idx);
1571+ return tdesc_amd64_linux;
1572+ }
1573+}
1574+
1575 void
1576 initialize_low_tracepoint (void)
1577 {
1578 init_registers_amd64_linux ();
1579- ipa_tdesc = tdesc_amd64_linux;
1580+ init_registers_amd64_avx_linux ();
1581+ init_registers_amd64_avx_mpx_linux ();
1582+ init_registers_amd64_mpx_linux ();
1583+ init_registers_amd64_avx512_linux ();
1584 }
1585diff --git a/gdb/gdbserver/linux-i386-ipa.c b/gdb/gdbserver/linux-i386-ipa.c
1586index 11dc038..d7a8e7d 100644
1587--- a/gdb/gdbserver/linux-i386-ipa.c
1588+++ b/gdb/gdbserver/linux-i386-ipa.c
1589@@ -21,6 +21,7 @@
1590 #include "server.h"
1591 #include <sys/mman.h>
1592 #include "tracepoint.h"
1593+#include "linux-x86-tdesc.h"
1594
1595 /* GDB register numbers. */
1596
1597@@ -47,10 +48,6 @@ enum i386_gdb_regnum
1598
1599 #define i386_num_regs 16
1600
1601-/* Defined in auto-generated file i386-linux.c. */
1602-void init_registers_i386_linux (void);
1603-extern const struct target_desc *tdesc_i386_linux;
1604-
1605 #define FT_CR_EAX 15
1606 #define FT_CR_ECX 14
1607 #define FT_CR_EDX 13
1608@@ -247,10 +244,40 @@ initialize_fast_tracepoint_trampoline_buffer (void)
1609 }
1610 }
1611
1612+/* Return target_desc to use for IPA, given the tdesc index passed by
1613+ gdbserver. */
1614+
1615+const struct target_desc *
1616+get_ipa_tdesc (int idx)
1617+{
1618+ switch (idx)
1619+ {
1620+ case X86_TDESC_MMX:
1621+ return tdesc_i386_mmx_linux;
1622+ case X86_TDESC_SSE:
1623+ return tdesc_i386_linux;
1624+ case X86_TDESC_AVX:
1625+ return tdesc_i386_avx_linux;
1626+ case X86_TDESC_MPX:
1627+ return tdesc_i386_mpx_linux;
1628+ case X86_TDESC_AVX_MPX:
1629+ return tdesc_i386_avx_mpx_linux;
1630+ case X86_TDESC_AVX512:
1631+ return tdesc_i386_avx512_linux;
1632+ default:
1633+ internal_error (__FILE__, __LINE__,
1634+ "unknown ipa tdesc index: %d", idx);
1635+ return tdesc_i386_linux;
1636+ }
1637+}
1638+
1639 void
1640 initialize_low_tracepoint (void)
1641 {
1642+ init_registers_i386_mmx_linux ();
1643 init_registers_i386_linux ();
1644- ipa_tdesc = tdesc_i386_linux;
1645+ init_registers_i386_avx_linux ();
1646+ init_registers_i386_mpx_linux ();
1647+ init_registers_i386_avx512_linux ();
1648 initialize_fast_tracepoint_trampoline_buffer ();
1649 }
1650diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
1651index 8b025bd..a142c2c 100644
1652--- a/gdb/gdbserver/linux-low.c
1653+++ b/gdb/gdbserver/linux-low.c
1654@@ -6432,6 +6432,15 @@ linux_supports_catch_syscall (void)
1655 }
1656
1657 static int
1658+linux_get_ipa_tdesc_idx (void)
1659+{
1660+ if (the_low_target.get_ipa_tdesc_idx == NULL)
1661+ return 0;
1662+
1663+ return (*the_low_target.get_ipa_tdesc_idx) ();
1664+}
1665+
1666+static int
1667 linux_supports_tracepoints (void)
1668 {
1669 if (*the_low_target.supports_tracepoints == NULL)
1670@@ -7408,6 +7417,7 @@ static struct target_ops linux_target_ops = {
1671 linux_breakpoint_kind_from_current_state,
1672 linux_supports_software_single_step,
1673 linux_supports_catch_syscall,
1674+ linux_get_ipa_tdesc_idx,
1675 };
1676
1677 #ifdef HAVE_LINUX_REGSETS
1678diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
1679index 4ec8550..d4946c1 100644
1680--- a/gdb/gdbserver/linux-low.h
1681+++ b/gdb/gdbserver/linux-low.h
1682@@ -246,6 +246,9 @@ struct linux_target_ops
1683 due to SYSCALL_SIGTRAP. */
1684 void (*get_syscall_trapinfo) (struct regcache *regcache,
1685 int *sysno, int *sysret);
1686+
1687+ /* See target.h. */
1688+ int (*get_ipa_tdesc_idx) (void);
1689 };
1690
1691 extern struct linux_target_ops the_low_target;
1692diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
1693index 0c4954a..2535959 100644
1694--- a/gdb/gdbserver/linux-x86-low.c
1695+++ b/gdb/gdbserver/linux-x86-low.c
1696@@ -45,57 +45,7 @@
1697 #include "nat/linux-nat.h"
1698 #include "nat/x86-linux.h"
1699 #include "nat/x86-linux-dregs.h"
1700-
1701-#ifdef __x86_64__
1702-/* Defined in auto-generated file amd64-linux.c. */
1703-void init_registers_amd64_linux (void);
1704-extern const struct target_desc *tdesc_amd64_linux;
1705-
1706-/* Defined in auto-generated file amd64-avx-linux.c. */
1707-void init_registers_amd64_avx_linux (void);
1708-extern const struct target_desc *tdesc_amd64_avx_linux;
1709-
1710-/* Defined in auto-generated file amd64-avx512-linux.c. */
1711-void init_registers_amd64_avx512_linux (void);
1712-extern const struct target_desc *tdesc_amd64_avx512_linux;
1713-
1714-/* Defined in auto-generated file amd64-mpx-linux.c. */
1715-void init_registers_amd64_mpx_linux (void);
1716-extern const struct target_desc *tdesc_amd64_mpx_linux;
1717-
1718-/* Defined in auto-generated file x32-linux.c. */
1719-void init_registers_x32_linux (void);
1720-extern const struct target_desc *tdesc_x32_linux;
1721-
1722-/* Defined in auto-generated file x32-avx-linux.c. */
1723-void init_registers_x32_avx_linux (void);
1724-extern const struct target_desc *tdesc_x32_avx_linux;
1725-
1726-/* Defined in auto-generated file x32-avx512-linux.c. */
1727-void init_registers_x32_avx512_linux (void);
1728-extern const struct target_desc *tdesc_x32_avx512_linux;
1729-
1730-#endif
1731-
1732-/* Defined in auto-generated file i386-linux.c. */
1733-void init_registers_i386_linux (void);
1734-extern const struct target_desc *tdesc_i386_linux;
1735-
1736-/* Defined in auto-generated file i386-mmx-linux.c. */
1737-void init_registers_i386_mmx_linux (void);
1738-extern const struct target_desc *tdesc_i386_mmx_linux;
1739-
1740-/* Defined in auto-generated file i386-avx-linux.c. */
1741-void init_registers_i386_avx_linux (void);
1742-extern const struct target_desc *tdesc_i386_avx_linux;
1743-
1744-/* Defined in auto-generated file i386-avx512-linux.c. */
1745-void init_registers_i386_avx512_linux (void);
1746-extern const struct target_desc *tdesc_i386_avx512_linux;
1747-
1748-/* Defined in auto-generated file i386-mpx-linux.c. */
1749-void init_registers_i386_mpx_linux (void);
1750-extern const struct target_desc *tdesc_i386_mpx_linux;
1751+#include "linux-x86-tdesc.h"
1752
1753 #ifdef __x86_64__
1754 static struct target_desc *tdesc_amd64_linux_no_xml;
1755@@ -839,6 +789,9 @@ x86_linux_read_description (void)
1756 case X86_XSTATE_AVX512_MASK:
1757 return tdesc_amd64_avx512_linux;
1758
1759+ case X86_XSTATE_AVX_MPX_MASK:
1760+ return tdesc_amd64_avx_mpx_linux;
1761+
1762 case X86_XSTATE_MPX_MASK:
1763 return tdesc_amd64_mpx_linux;
1764
1765@@ -886,6 +839,9 @@ x86_linux_read_description (void)
1766 case (X86_XSTATE_MPX_MASK):
1767 return tdesc_i386_mpx_linux;
1768
1769+ case (X86_XSTATE_AVX_MPX_MASK):
1770+ return tdesc_i386_avx_mpx_linux;
1771+
1772 case (X86_XSTATE_AVX_MASK):
1773 return tdesc_i386_avx_linux;
1774
1775@@ -2891,6 +2847,42 @@ x86_supports_hardware_single_step (void)
1776 return 1;
1777 }
1778
1779+static int
1780+x86_get_ipa_tdesc_idx (void)
1781+{
1782+ struct regcache *regcache = get_thread_regcache (current_thread, 0);
1783+ const struct target_desc *tdesc = regcache->tdesc;
1784+
1785+#ifdef __x86_64__
1786+ if (tdesc == tdesc_amd64_linux || tdesc == tdesc_amd64_linux_no_xml
1787+ || tdesc == tdesc_x32_linux)
1788+ return X86_TDESC_SSE;
1789+ if (tdesc == tdesc_amd64_avx_linux || tdesc == tdesc_x32_avx_linux)
1790+ return X86_TDESC_AVX;
1791+ if (tdesc == tdesc_amd64_mpx_linux)
1792+ return X86_TDESC_MPX;
1793+ if (tdesc == tdesc_amd64_avx_mpx_linux)
1794+ return X86_TDESC_AVX_MPX;
1795+ if (tdesc == tdesc_amd64_avx512_linux || tdesc == tdesc_x32_avx512_linux)
1796+ return X86_TDESC_AVX512;
1797+#endif
1798+
1799+ if (tdesc == tdesc_i386_mmx_linux)
1800+ return X86_TDESC_MMX;
1801+ if (tdesc == tdesc_i386_linux || tdesc == tdesc_i386_linux_no_xml)
1802+ return X86_TDESC_SSE;
1803+ if (tdesc == tdesc_i386_avx_linux)
1804+ return X86_TDESC_AVX;
1805+ if (tdesc == tdesc_i386_mpx_linux)
1806+ return X86_TDESC_MPX;
1807+ if (tdesc == tdesc_i386_avx_mpx_linux)
1808+ return X86_TDESC_AVX_MPX;
1809+ if (tdesc == tdesc_i386_avx512_linux)
1810+ return X86_TDESC_AVX512;
1811+
1812+ return 0;
1813+}
1814+
1815 /* This is initialized assuming an amd64 target.
1816 x86_arch_setup will correct it for i386 or amd64 targets. */
1817
1818@@ -2934,6 +2926,7 @@ struct linux_target_ops the_low_target =
1819 NULL, /* breakpoint_kind_from_current_state */
1820 x86_supports_hardware_single_step,
1821 x86_get_syscall_trapinfo,
1822+ x86_get_ipa_tdesc_idx,
1823 };
1824
1825 void
1826@@ -2945,6 +2938,7 @@ initialize_low_arch (void)
1827 init_registers_amd64_avx_linux ();
1828 init_registers_amd64_avx512_linux ();
1829 init_registers_amd64_mpx_linux ();
1830+ init_registers_amd64_avx_mpx_linux ();
1831
1832 init_registers_x32_linux ();
1833 init_registers_x32_avx_linux ();
1834@@ -2959,6 +2953,7 @@ initialize_low_arch (void)
1835 init_registers_i386_avx_linux ();
1836 init_registers_i386_avx512_linux ();
1837 init_registers_i386_mpx_linux ();
1838+ init_registers_i386_avx_mpx_linux ();
1839
1840 tdesc_i386_linux_no_xml = XNEW (struct target_desc);
1841 copy_target_description (tdesc_i386_linux_no_xml, tdesc_i386_linux);
1842diff --git a/gdb/gdbserver/linux-x86-tdesc.h b/gdb/gdbserver/linux-x86-tdesc.h
1843new file mode 100644
1844index 0000000..720f50c
1845--- /dev/null
1846+++ b/gdb/gdbserver/linux-x86-tdesc.h
1847@@ -0,0 +1,98 @@
1848+/* Low level support for x86 (i386 and x86-64), shared between gdbserver
1849+ and IPA.
1850+
1851+ Copyright (C) 2016 Free Software Foundation, Inc.
1852+
1853+ This file is part of GDB.
1854+
1855+ This program is free software; you can redistribute it and/or modify
1856+ it under the terms of the GNU General Public License as published by
1857+ the Free Software Foundation; either version 3 of the License, or
1858+ (at your option) any later version.
1859+
1860+ This program is distributed in the hope that it will be useful,
1861+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1862+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1863+ GNU General Public License for more details.
1864+
1865+ You should have received a copy of the GNU General Public License
1866+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
1867+
1868+/* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64
1869+ vs x32), it's sufficient to pass only the register set here. This,
1870+ together with the ABI known at IPA compile time, maps to a tdesc. */
1871+
1872+enum x86_linux_tdesc {
1873+ X86_TDESC_MMX = 0,
1874+ X86_TDESC_SSE = 1,
1875+ X86_TDESC_AVX = 2,
1876+ X86_TDESC_MPX = 3,
1877+ X86_TDESC_AVX_MPX = 4,
1878+ X86_TDESC_AVX512 = 5,
1879+};
1880+
1881+#ifdef __x86_64__
1882+
1883+#if defined __LP64__ || !defined IN_PROCESS_AGENT
1884+/* Defined in auto-generated file amd64-linux.c. */
1885+void init_registers_amd64_linux (void);
1886+extern const struct target_desc *tdesc_amd64_linux;
1887+
1888+/* Defined in auto-generated file amd64-avx-linux.c. */
1889+void init_registers_amd64_avx_linux (void);
1890+extern const struct target_desc *tdesc_amd64_avx_linux;
1891+
1892+/* Defined in auto-generated file amd64-avx512-linux.c. */
1893+void init_registers_amd64_avx512_linux (void);
1894+extern const struct target_desc *tdesc_amd64_avx512_linux;
1895+
1896+/* Defined in auto-generated file amd64-avx-mpx-linux.c. */
1897+void init_registers_amd64_avx_mpx_linux (void);
1898+extern const struct target_desc *tdesc_amd64_avx_mpx_linux;
1899+
1900+/* Defined in auto-generated file amd64-mpx-linux.c. */
1901+void init_registers_amd64_mpx_linux (void);
1902+extern const struct target_desc *tdesc_amd64_mpx_linux;
1903+#endif
1904+
1905+#if defined __ILP32__ || !defined IN_PROCESS_AGENT
1906+/* Defined in auto-generated file x32-linux.c. */
1907+void init_registers_x32_linux (void);
1908+extern const struct target_desc *tdesc_x32_linux;
1909+
1910+/* Defined in auto-generated file x32-avx-linux.c. */
1911+void init_registers_x32_avx_linux (void);
1912+extern const struct target_desc *tdesc_x32_avx_linux;
1913+
1914+/* Defined in auto-generated file x32-avx512-linux.c. */
1915+void init_registers_x32_avx512_linux (void);
1916+extern const struct target_desc *tdesc_x32_avx512_linux;
1917+#endif
1918+
1919+#endif
1920+
1921+#if defined __i386__ || !defined IN_PROCESS_AGENT
1922+/* Defined in auto-generated file i386-linux.c. */
1923+void init_registers_i386_linux (void);
1924+extern const struct target_desc *tdesc_i386_linux;
1925+
1926+/* Defined in auto-generated file i386-mmx-linux.c. */
1927+void init_registers_i386_mmx_linux (void);
1928+extern const struct target_desc *tdesc_i386_mmx_linux;
1929+
1930+/* Defined in auto-generated file i386-avx-linux.c. */
1931+void init_registers_i386_avx_linux (void);
1932+extern const struct target_desc *tdesc_i386_avx_linux;
1933+
1934+/* Defined in auto-generated file i386-avx-mpx-linux.c. */
1935+void init_registers_i386_avx_mpx_linux (void);
1936+extern const struct target_desc *tdesc_i386_avx_mpx_linux;
1937+
1938+/* Defined in auto-generated file i386-avx512-linux.c. */
1939+void init_registers_i386_avx512_linux (void);
1940+extern const struct target_desc *tdesc_i386_avx512_linux;
1941+
1942+/* Defined in auto-generated file i386-mpx-linux.c. */
1943+void init_registers_i386_mpx_linux (void);
1944+extern const struct target_desc *tdesc_i386_mpx_linux;
1945+#endif
1946diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
1947index 5af2051..4c14c20 100644
1948--- a/gdb/gdbserver/target.h
1949+++ b/gdb/gdbserver/target.h
1950@@ -471,6 +471,9 @@ struct target_ops
1951 /* Return 1 if the target supports catch syscall, 0 (or leave the
1952 callback NULL) otherwise. */
1953 int (*supports_catch_syscall) (void);
1954+
1955+ /* Return tdesc index for IPA. */
1956+ int (*get_ipa_tdesc_idx) (void);
1957 };
1958
1959 extern struct target_ops *the_target;
1960@@ -550,6 +553,10 @@ int kill_inferior (int);
1961 (the_target->supports_catch_syscall ? \
1962 (*the_target->supports_catch_syscall) () : 0)
1963
1964+#define target_get_ipa_tdesc_idx() \
1965+ (the_target->get_ipa_tdesc_idx \
1966+ ? (*the_target->get_ipa_tdesc_idx) () : 0)
1967+
1968 #define target_supports_tracepoints() \
1969 (the_target->supports_tracepoints \
1970 ? (*the_target->supports_tracepoints) () : 0)
1971diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
1972index 0671999..cc86677 100644
1973--- a/gdb/gdbserver/tracepoint.c
1974+++ b/gdb/gdbserver/tracepoint.c
1975@@ -134,6 +134,7 @@ trace_vdebug (const char *fmt, ...)
1976 # define ust_loaded IPA_SYM_EXPORTED_NAME (ust_loaded)
1977 # define helper_thread_id IPA_SYM_EXPORTED_NAME (helper_thread_id)
1978 # define cmd_buf IPA_SYM_EXPORTED_NAME (cmd_buf)
1979+# define ipa_tdesc_idx IPA_SYM_EXPORTED_NAME (ipa_tdesc_idx)
1980 #endif
1981
1982 #ifndef IN_PROCESS_AGENT
1983@@ -171,6 +172,7 @@ struct ipa_sym_addresses
1984 CORE_ADDR addr_get_trace_state_variable_value;
1985 CORE_ADDR addr_set_trace_state_variable_value;
1986 CORE_ADDR addr_ust_loaded;
1987+ CORE_ADDR addr_ipa_tdesc_idx;
1988 };
1989
1990 static struct
1991@@ -207,6 +209,7 @@ static struct
1992 IPA_SYM(get_trace_state_variable_value),
1993 IPA_SYM(set_trace_state_variable_value),
1994 IPA_SYM(ust_loaded),
1995+ IPA_SYM(ipa_tdesc_idx),
1996 };
1997
1998 static struct ipa_sym_addresses ipa_sym_addrs;
1999@@ -3231,6 +3234,11 @@ cmd_qtstart (char *packet)
2000
2001 *packet = '\0';
2002
2003+ /* Tell IPA about the correct tdesc. */
2004+ if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx,
2005+ target_get_ipa_tdesc_idx ()))
2006+ error ("Error setting ipa_tdesc_idx variable in lib");
2007+
2008 /* Start out empty. */
2009 if (agent_loaded_p ())
2010 write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints, 0);
2011@@ -4714,19 +4722,20 @@ collect_data_at_step (struct tracepoint_hit_ctx *ctx,
2012 #endif
2013
2014 #ifdef IN_PROCESS_AGENT
2015-/* The target description used by the IPA. Given that the IPA library
2016- is built for a specific architecture that is loaded into the
2017- inferior, there only needs to be one such description per
2018- build. */
2019-const struct target_desc *ipa_tdesc;
2020+/* The target description index for IPA. Passed from gdbserver, used
2021+ to select ipa_tdesc. */
2022+EXTERN_C_PUSH
2023+IP_AGENT_EXPORT_VAR int ipa_tdesc_idx;
2024+EXTERN_C_POP
2025 #endif
2026
2027 static struct regcache *
2028 get_context_regcache (struct tracepoint_hit_ctx *ctx)
2029 {
2030 struct regcache *regcache = NULL;
2031-
2032 #ifdef IN_PROCESS_AGENT
2033+ const struct target_desc *ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
2034+
2035 if (ctx->type == fast_tracepoint)
2036 {
2037 struct fast_tracepoint_ctx *fctx = (struct fast_tracepoint_ctx *) ctx;
2038@@ -5799,11 +5808,13 @@ IP_AGENT_EXPORT_FUNC void
2039 gdb_collect (struct tracepoint *tpoint, unsigned char *regs)
2040 {
2041 struct fast_tracepoint_ctx ctx;
2042+ const struct target_desc *ipa_tdesc;
2043
2044 /* Don't do anything until the trace run is completely set up. */
2045 if (!tracing)
2046 return;
2047
2048+ ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
2049 ctx.base.type = fast_tracepoint;
2050 ctx.regs = regs;
2051 ctx.regcache_initted = 0;
2052@@ -6660,6 +6671,7 @@ gdb_probe (const struct marker *mdata, void *probe_private,
2053 {
2054 struct tracepoint *tpoint;
2055 struct static_tracepoint_ctx ctx;
2056+ const struct target_desc *ipa_tdesc;
2057
2058 /* Don't do anything until the trace run is completely set up. */
2059 if (!tracing)
2060@@ -6668,6 +6680,7 @@ gdb_probe (const struct marker *mdata, void *probe_private,
2061 return;
2062 }
2063
2064+ ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx);
2065 ctx.base.type = static_tracepoint;
2066 ctx.regcache_initted = 0;
2067 ctx.regs = regs;
2068diff --git a/gdb/gdbserver/tracepoint.h b/gdb/gdbserver/tracepoint.h
2069index cab89cf..e30f4f7 100644
2070--- a/gdb/gdbserver/tracepoint.h
2071+++ b/gdb/gdbserver/tracepoint.h
2072@@ -124,6 +124,7 @@ int handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc);
2073
2074 #ifdef IN_PROCESS_AGENT
2075 void initialize_low_tracepoint (void);
2076+const struct target_desc *get_ipa_tdesc (int idx);
2077 void supply_fast_tracepoint_registers (struct regcache *regcache,
2078 const unsigned char *regs);
2079 void supply_static_tracepoint_registers (struct regcache *regcache,
2080@@ -131,9 +132,6 @@ void supply_static_tracepoint_registers (struct regcache *regcache,
2081 CORE_ADDR pc);
2082 void set_trampoline_buffer_space (CORE_ADDR begin, CORE_ADDR end,
2083 char *errmsg);
2084-
2085-extern const struct target_desc *ipa_tdesc;
2086-
2087 #else
2088 void stop_tracing (void);
2089
2090diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
2091index af39e78..df47efd 100644
2092--- a/gdb/i386-linux-tdep.c
2093+++ b/gdb/i386-linux-tdep.c
2094@@ -47,6 +47,7 @@
2095 #include "features/i386/i386-linux.c"
2096 #include "features/i386/i386-mmx-linux.c"
2097 #include "features/i386/i386-mpx-linux.c"
2098+#include "features/i386/i386-avx-mpx-linux.c"
2099 #include "features/i386/i386-avx-linux.c"
2100 #include "features/i386/i386-avx512-linux.c"
2101
2102@@ -630,6 +631,8 @@ i386_linux_core_read_description (struct gdbarch *gdbarch,
2103 return tdesc_i386_avx512_linux;
2104 case X86_XSTATE_MPX_MASK:
2105 return tdesc_i386_mpx_linux;
2106+ case X86_XSTATE_AVX_MPX_MASK:
2107+ return tdesc_i386_avx_mpx_linux;
2108 case X86_XSTATE_AVX_MASK:
2109 return tdesc_i386_avx_linux;
2110 case X86_XSTATE_SSE_MASK:
2111@@ -1018,5 +1021,6 @@ _initialize_i386_linux_tdep (void)
2112 initialize_tdesc_i386_mmx_linux ();
2113 initialize_tdesc_i386_avx_linux ();
2114 initialize_tdesc_i386_mpx_linux ();
2115+ initialize_tdesc_i386_avx_mpx_linux ();
2116 initialize_tdesc_i386_avx512_linux ();
2117 }
2118diff --git a/gdb/i386-linux-tdep.h b/gdb/i386-linux-tdep.h
2119index ecc9e31..0cb0c4d 100644
2120--- a/gdb/i386-linux-tdep.h
2121+++ b/gdb/i386-linux-tdep.h
2122@@ -42,6 +42,7 @@ extern struct target_desc *tdesc_i386_linux;
2123 extern struct target_desc *tdesc_i386_mmx_linux;
2124 extern struct target_desc *tdesc_i386_avx_linux;
2125 extern struct target_desc *tdesc_i386_mpx_linux;
2126+extern struct target_desc *tdesc_i386_avx_mpx_linux;
2127 extern struct target_desc *tdesc_i386_avx512_linux;
2128
2129 /* Format of XSAVE extended state is:
2130diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
2131index b706463..1ec0a08 100644
2132--- a/gdb/i386-tdep.c
2133+++ b/gdb/i386-tdep.c
2134@@ -53,6 +53,7 @@
2135 #include "features/i386/i386.c"
2136 #include "features/i386/i386-avx.c"
2137 #include "features/i386/i386-mpx.c"
2138+#include "features/i386/i386-avx-mpx.c"
2139 #include "features/i386/i386-avx512.c"
2140 #include "features/i386/i386-mmx.c"
2141
2142@@ -8618,6 +8619,8 @@ i386_target_description (uint64_t xcr0)
2143 case X86_XSTATE_MPX_AVX512_MASK:
2144 case X86_XSTATE_AVX512_MASK:
2145 return tdesc_i386_avx512;
2146+ case X86_XSTATE_AVX_MPX_MASK:
2147+ return tdesc_i386_avx_mpx;
2148 case X86_XSTATE_MPX_MASK:
2149 return tdesc_i386_mpx;
2150 case X86_XSTATE_AVX_MASK:
2151@@ -8957,6 +8960,7 @@ Show Intel Memory Protection Extensions specific variables."),
2152 initialize_tdesc_i386_mmx ();
2153 initialize_tdesc_i386_avx ();
2154 initialize_tdesc_i386_mpx ();
2155+ initialize_tdesc_i386_avx_mpx ();
2156 initialize_tdesc_i386_avx512 ();
2157
2158 /* Tell remote stub that we support XML target description. */
2159diff --git a/gdb/regformats/i386/amd64-avx-mpx-linux.dat b/gdb/regformats/i386/amd64-avx-mpx-linux.dat
2160new file mode 100644
2161index 0000000..6d45324
2162--- /dev/null
2163+++ b/gdb/regformats/i386/amd64-avx-mpx-linux.dat
2164@@ -0,0 +1,85 @@
2165+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
2166+# Generated from: i386/amd64-avx-mpx-linux.xml
2167+name:amd64_avx_mpx_linux
2168+xmltarget:amd64-avx-mpx-linux.xml
2169+expedite:rbp,rsp,rip
2170+64:rax
2171+64:rbx
2172+64:rcx
2173+64:rdx
2174+64:rsi
2175+64:rdi
2176+64:rbp
2177+64:rsp
2178+64:r8
2179+64:r9
2180+64:r10
2181+64:r11
2182+64:r12
2183+64:r13
2184+64:r14
2185+64:r15
2186+64:rip
2187+32:eflags
2188+32:cs
2189+32:ss
2190+32:ds
2191+32:es
2192+32:fs
2193+32:gs
2194+80:st0
2195+80:st1
2196+80:st2
2197+80:st3
2198+80:st4
2199+80:st5
2200+80:st6
2201+80:st7
2202+32:fctrl
2203+32:fstat
2204+32:ftag
2205+32:fiseg
2206+32:fioff
2207+32:foseg
2208+32:fooff
2209+32:fop
2210+128:xmm0
2211+128:xmm1
2212+128:xmm2
2213+128:xmm3
2214+128:xmm4
2215+128:xmm5
2216+128:xmm6
2217+128:xmm7
2218+128:xmm8
2219+128:xmm9
2220+128:xmm10
2221+128:xmm11
2222+128:xmm12
2223+128:xmm13
2224+128:xmm14
2225+128:xmm15
2226+32:mxcsr
2227+64:orig_rax
2228+128:ymm0h
2229+128:ymm1h
2230+128:ymm2h
2231+128:ymm3h
2232+128:ymm4h
2233+128:ymm5h
2234+128:ymm6h
2235+128:ymm7h
2236+128:ymm8h
2237+128:ymm9h
2238+128:ymm10h
2239+128:ymm11h
2240+128:ymm12h
2241+128:ymm13h
2242+128:ymm14h
2243+128:ymm15h
2244+128:bnd0raw
2245+128:bnd1raw
2246+128:bnd2raw
2247+128:bnd3raw
2248+64:bndcfgu
2249+64:bndstatus
2250diff --git a/gdb/regformats/i386/amd64-avx-mpx.dat b/gdb/regformats/i386/amd64-avx-mpx.dat
2251new file mode 100644
2252index 0000000..d985641
2253--- /dev/null
2254+++ b/gdb/regformats/i386/amd64-avx-mpx.dat
2255@@ -0,0 +1,84 @@
2256+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
2257+# Generated from: i386/amd64-avx-mpx.xml
2258+name:amd64_avx_mpx
2259+xmltarget:amd64-avx-mpx.xml
2260+expedite:rbp,rsp,rip
2261+64:rax
2262+64:rbx
2263+64:rcx
2264+64:rdx
2265+64:rsi
2266+64:rdi
2267+64:rbp
2268+64:rsp
2269+64:r8
2270+64:r9
2271+64:r10
2272+64:r11
2273+64:r12
2274+64:r13
2275+64:r14
2276+64:r15
2277+64:rip
2278+32:eflags
2279+32:cs
2280+32:ss
2281+32:ds
2282+32:es
2283+32:fs
2284+32:gs
2285+80:st0
2286+80:st1
2287+80:st2
2288+80:st3
2289+80:st4
2290+80:st5
2291+80:st6
2292+80:st7
2293+32:fctrl
2294+32:fstat
2295+32:ftag
2296+32:fiseg
2297+32:fioff
2298+32:foseg
2299+32:fooff
2300+32:fop
2301+128:xmm0
2302+128:xmm1
2303+128:xmm2
2304+128:xmm3
2305+128:xmm4
2306+128:xmm5
2307+128:xmm6
2308+128:xmm7
2309+128:xmm8
2310+128:xmm9
2311+128:xmm10
2312+128:xmm11
2313+128:xmm12
2314+128:xmm13
2315+128:xmm14
2316+128:xmm15
2317+32:mxcsr
2318+128:ymm0h
2319+128:ymm1h
2320+128:ymm2h
2321+128:ymm3h
2322+128:ymm4h
2323+128:ymm5h
2324+128:ymm6h
2325+128:ymm7h
2326+128:ymm8h
2327+128:ymm9h
2328+128:ymm10h
2329+128:ymm11h
2330+128:ymm12h
2331+128:ymm13h
2332+128:ymm14h
2333+128:ymm15h
2334+128:bnd0raw
2335+128:bnd1raw
2336+128:bnd2raw
2337+128:bnd3raw
2338+64:bndcfgu
2339+64:bndstatus
2340diff --git a/gdb/regformats/i386/amd64-mpx-linux.dat b/gdb/regformats/i386/amd64-mpx-linux.dat
2341index 7a05cfe..523ae01 100644
2342--- a/gdb/regformats/i386/amd64-mpx-linux.dat
2343+++ b/gdb/regformats/i386/amd64-mpx-linux.dat
2344@@ -61,22 +61,6 @@ expedite:rbp,rsp,rip
2345 128:xmm15
2346 32:mxcsr
2347 64:orig_rax
2348-128:ymm0h
2349-128:ymm1h
2350-128:ymm2h
2351-128:ymm3h
2352-128:ymm4h
2353-128:ymm5h
2354-128:ymm6h
2355-128:ymm7h
2356-128:ymm8h
2357-128:ymm9h
2358-128:ymm10h
2359-128:ymm11h
2360-128:ymm12h
2361-128:ymm13h
2362-128:ymm14h
2363-128:ymm15h
2364 128:bnd0raw
2365 128:bnd1raw
2366 128:bnd2raw
2367diff --git a/gdb/regformats/i386/amd64-mpx.dat b/gdb/regformats/i386/amd64-mpx.dat
2368index 1b75f4d..43b8776 100644
2369--- a/gdb/regformats/i386/amd64-mpx.dat
2370+++ b/gdb/regformats/i386/amd64-mpx.dat
2371@@ -60,22 +60,6 @@ expedite:rbp,rsp,rip
2372 128:xmm14
2373 128:xmm15
2374 32:mxcsr
2375-128:ymm0h
2376-128:ymm1h
2377-128:ymm2h
2378-128:ymm3h
2379-128:ymm4h
2380-128:ymm5h
2381-128:ymm6h
2382-128:ymm7h
2383-128:ymm8h
2384-128:ymm9h
2385-128:ymm10h
2386-128:ymm11h
2387-128:ymm12h
2388-128:ymm13h
2389-128:ymm14h
2390-128:ymm15h
2391 128:bnd0raw
2392 128:bnd1raw
2393 128:bnd2raw
2394diff --git a/gdb/regformats/i386/i386-avx-mpx-linux.dat b/gdb/regformats/i386/i386-avx-mpx-linux.dat
2395new file mode 100644
2396index 0000000..831c476
2397--- /dev/null
2398+++ b/gdb/regformats/i386/i386-avx-mpx-linux.dat
2399@@ -0,0 +1,61 @@
2400+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
2401+# Generated from: i386/i386-avx-mpx-linux.xml
2402+name:i386_avx_mpx_linux
2403+xmltarget:i386-avx-mpx-linux.xml
2404+expedite:ebp,esp,eip
2405+32:eax
2406+32:ecx
2407+32:edx
2408+32:ebx
2409+32:esp
2410+32:ebp
2411+32:esi
2412+32:edi
2413+32:eip
2414+32:eflags
2415+32:cs
2416+32:ss
2417+32:ds
2418+32:es
2419+32:fs
2420+32:gs
2421+80:st0
2422+80:st1
2423+80:st2
2424+80:st3
2425+80:st4
2426+80:st5
2427+80:st6
2428+80:st7
2429+32:fctrl
2430+32:fstat
2431+32:ftag
2432+32:fiseg
2433+32:fioff
2434+32:foseg
2435+32:fooff
2436+32:fop
2437+128:xmm0
2438+128:xmm1
2439+128:xmm2
2440+128:xmm3
2441+128:xmm4
2442+128:xmm5
2443+128:xmm6
2444+128:xmm7
2445+32:mxcsr
2446+32:orig_eax
2447+128:ymm0h
2448+128:ymm1h
2449+128:ymm2h
2450+128:ymm3h
2451+128:ymm4h
2452+128:ymm5h
2453+128:ymm6h
2454+128:ymm7h
2455+128:bnd0raw
2456+128:bnd1raw
2457+128:bnd2raw
2458+128:bnd3raw
2459+64:bndcfgu
2460+64:bndstatus
2461diff --git a/gdb/regformats/i386/i386-avx-mpx.dat b/gdb/regformats/i386/i386-avx-mpx.dat
2462new file mode 100644
2463index 0000000..8caef75
2464--- /dev/null
2465+++ b/gdb/regformats/i386/i386-avx-mpx.dat
2466@@ -0,0 +1,60 @@
2467+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
2468+# Generated from: i386/i386-avx-mpx.xml
2469+name:i386_avx_mpx
2470+xmltarget:i386-avx-mpx.xml
2471+expedite:ebp,esp,eip
2472+32:eax
2473+32:ecx
2474+32:edx
2475+32:ebx
2476+32:esp
2477+32:ebp
2478+32:esi
2479+32:edi
2480+32:eip
2481+32:eflags
2482+32:cs
2483+32:ss
2484+32:ds
2485+32:es
2486+32:fs
2487+32:gs
2488+80:st0
2489+80:st1
2490+80:st2
2491+80:st3
2492+80:st4
2493+80:st5
2494+80:st6
2495+80:st7
2496+32:fctrl
2497+32:fstat
2498+32:ftag
2499+32:fiseg
2500+32:fioff
2501+32:foseg
2502+32:fooff
2503+32:fop
2504+128:xmm0
2505+128:xmm1
2506+128:xmm2
2507+128:xmm3
2508+128:xmm4
2509+128:xmm5
2510+128:xmm6
2511+128:xmm7
2512+32:mxcsr
2513+128:ymm0h
2514+128:ymm1h
2515+128:ymm2h
2516+128:ymm3h
2517+128:ymm4h
2518+128:ymm5h
2519+128:ymm6h
2520+128:ymm7h
2521+128:bnd0raw
2522+128:bnd1raw
2523+128:bnd2raw
2524+128:bnd3raw
2525+64:bndcfgu
2526+64:bndstatus
2527diff --git a/gdb/regformats/i386/i386-mpx-linux.dat b/gdb/regformats/i386/i386-mpx-linux.dat
2528index b52b68d..1dcdce9 100644
2529--- a/gdb/regformats/i386/i386-mpx-linux.dat
2530+++ b/gdb/regformats/i386/i386-mpx-linux.dat
2531@@ -45,14 +45,6 @@ expedite:ebp,esp,eip
2532 128:xmm7
2533 32:mxcsr
2534 32:orig_eax
2535-128:ymm0h
2536-128:ymm1h
2537-128:ymm2h
2538-128:ymm3h
2539-128:ymm4h
2540-128:ymm5h
2541-128:ymm6h
2542-128:ymm7h
2543 128:bnd0raw
2544 128:bnd1raw
2545 128:bnd2raw
2546diff --git a/gdb/regformats/i386/i386-mpx.dat b/gdb/regformats/i386/i386-mpx.dat
2547index 0ea420b..dda5164 100644
2548--- a/gdb/regformats/i386/i386-mpx.dat
2549+++ b/gdb/regformats/i386/i386-mpx.dat
2550@@ -44,14 +44,6 @@ expedite:ebp,esp,eip
2551 128:xmm6
2552 128:xmm7
2553 32:mxcsr
2554-128:ymm0h
2555-128:ymm1h
2556-128:ymm2h
2557-128:ymm3h
2558-128:ymm4h
2559-128:ymm5h
2560-128:ymm6h
2561-128:ymm7h
2562 128:bnd0raw
2563 128:bnd1raw
2564 128:bnd2raw
2565diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp
2566index 15ad7e7..3a94471 100644
2567--- a/gdb/testsuite/gdb.trace/ftrace.exp
2568+++ b/gdb/testsuite/gdb.trace/ftrace.exp
2569@@ -132,7 +132,6 @@ proc test_fast_tracepoints {} {
2570 gdb_test "tfind pc *set_point" "Found trace frame .*" \
2571 "tfind set_point frame, first time"
2572
2573- setup_kfail "gdb/13808" "x86_64-*-linux*"
2574 gdb_test "print globvar" " = 1"
2575
2576 gdb_test "tfind pc *set_point" "Found trace frame .*" \
2577diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c
2578index 3cc18c1..107576f 100644
2579--- a/gdb/x86-linux-nat.c
2580+++ b/gdb/x86-linux-nat.c
2581@@ -215,6 +215,11 @@ x86_linux_read_description (struct target_ops *ops)
2582 return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
2583 else
2584 return tdesc_amd64_mpx_linux;
2585+ case X86_XSTATE_AVX_MPX_MASK:
2586+ if (is_x32)
2587+ return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
2588+ else
2589+ return tdesc_amd64_avx_mpx_linux;
2590 case X86_XSTATE_AVX_MASK:
2591 if (is_x32)
2592 return tdesc_x32_avx_linux;
2593@@ -237,6 +242,8 @@ x86_linux_read_description (struct target_ops *ops)
2594 return tdesc_i386_avx512_linux;
2595 case X86_XSTATE_MPX_MASK:
2596 return tdesc_i386_mpx_linux;
2597+ case X86_XSTATE_AVX_MPX_MASK:
2598+ return tdesc_i386_avx_mpx_linux;
2599 case X86_XSTATE_AVX_MASK:
2600 return tdesc_i386_avx_linux;
2601 default:
diff --git a/meta/recipes-devtools/gdb/gdb_7.11.1.bb b/meta/recipes-devtools/gdb/gdb_7.12.bb
index 57cffc9983..4fddf81ffa 100644
--- a/meta/recipes-devtools/gdb/gdb_7.11.1.bb
+++ b/meta/recipes-devtools/gdb/gdb_7.12.bb
@@ -6,6 +6,7 @@ inherit python3-dir
6EXTRA_OEMAKE_append_libc-musl = "\ 6EXTRA_OEMAKE_append_libc-musl = "\
7 gt_cv_func_gnugettext1_libc=yes \ 7 gt_cv_func_gnugettext1_libc=yes \
8 gt_cv_func_gnugettext2_libc=yes \ 8 gt_cv_func_gnugettext2_libc=yes \
9 gl_cv_func_gettimeofday_clobber=no \
9 " 10 "
10 11
11do_configure_prepend() { 12do_configure_prepend() {