diff options
author | Schimpe, Christina <christina.schimpe@intel.com> | 2024-03-06 11:22:49 +0000 |
---|---|---|
committer | Schimpe, Christina <christina.schimpe@intel.com> | 2024-09-25 11:06:57 +0000 |
commit | fc14343205d3a68db1fc139e4af9796be208fab4 (patch) | |
tree | c13cb1c8c2e826556e5a1a0352a87c53f20ea8d1 /gdb/testsuite/lib | |
parent | gdb, testsuite, python: Add missing imports. (diff) | |
download | binutils-gdb-fc14343205d3a68db1fc139e4af9796be208fab4.tar.gz binutils-gdb-fc14343205d3a68db1fc139e4af9796be208fab4.tar.bz2 binutils-gdb-fc14343205d3a68db1fc139e4af9796be208fab4.zip |
gdb, gdbserver, python, testsuite: Remove MPX.
GDB deprecated the commands "show/set mpx bound" in GDB 15.1, as Intel
listed Intel(R) Memory Protection Extensions (MPX) as removed in 2019.
MPX is also deprecated in gcc (since v9.1), the linux kernel (since v5.6)
and glibc (since v2.35). Let's now remove MPX support in GDB completely.
This includes the removal of:
- MPX functionality including register support
- deprecated mpx commands
- i386 and amd64 implementation of the hooks report_signal_info and
get_siginfo_type
- tests
- and pretty printer.
We keep MPX register numbers to not break compatibility with old gdbservers.
Approved-By: Felix Willgerodt <felix.willgerodt@intel.com>
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 9ea9c3bcb52..0475fb95161 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -9815,18 +9815,6 @@ gdb_caching_proc supports_statement_frontiers {} { } executable "additional_flags=-gstatement-frontiers"] } -# Return 1 if compiler supports -mmpx -fcheck-pointer-bounds. Otherwise, -# return 0. - -gdb_caching_proc supports_mpx_check_pointer_bounds {} { - set flags "additional_flags=-mmpx additional_flags=-fcheck-pointer-bounds" - return [gdb_can_simple_compile supports_mpx_check_pointer_bounds { - int main () { - return 0; - } - } executable $flags] -} - # Return 1 if compiler supports -fcf-protection=. Otherwise, # return 0. @@ -10255,83 +10243,6 @@ gdb_caching_proc supports_gnuc {} { return [gdb_simple_compile $me $src object ""] } -# Return 1 if target supports mpx, otherwise return 0. -gdb_caching_proc have_mpx {} { - global srcdir - - set me "have_mpx" - if { ![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"] } { - verbose "$me: target does not support mpx, returning 0" 2 - return 0 - } - - # Compile a test program. - set src { - #include "nat/x86-cpuid.h" - - int main() { - unsigned int eax, ebx, ecx, edx; - - if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) - return 0; - - if ((ecx & bit_OSXSAVE) == bit_OSXSAVE) - { - if (__get_cpuid_max (0, (void *)0) < 7) - return 0; - - __cpuid_count (7, 0, eax, ebx, ecx, edx); - - if ((ebx & bit_MPX) == bit_MPX) - return 1; - - } - return 0; - } - } - set compile_flags "incdir=${srcdir}/.." - if {![gdb_simple_compile $me $src executable $compile_flags]} { - return 0 - } - - set target_obj [gdb_remote_download target $obj] - set result [remote_exec target $target_obj] - set status [lindex $result 0] - set output [lindex $result 1] - if { $output != "" } { - set status 0 - } - - remote_file build delete $obj - - if { $status == 0 } { - verbose "$me: returning $status" 2 - return $status - } - - # Compile program with -mmpx -fcheck-pointer-bounds, try to trigger - # 'No MPX support', in other words, see if kernel supports mpx. - set src { int main (void) { return 0; } } - set comp_flags {} - append comp_flags " additional_flags=-mmpx" - append comp_flags " additional_flags=-fcheck-pointer-bounds" - if {![gdb_simple_compile $me-2 $src executable $comp_flags]} { - return 0 - } - - set target_obj [gdb_remote_download target $obj] - set result [remote_exec target $target_obj] - set status [lindex $result 0] - set output [lindex $result 1] - set status [expr ($status == 0) \ - && ![regexp "^No MPX support\r?\n" $output]] - - remote_file build delete $obj - - verbose "$me: returning $status" 2 - return $status -} - # Return 1 if target supports avx, otherwise return 0. gdb_caching_proc have_avx {} { global srcdir |