* gdb-testsuite-detect-no-mpx-support.patch * gdb-testsuite-handle-init-errors-in-gdb.mi-user-selected-context-sync.exp.patch * gdb-add-gdb-syscalls-makefile.patch - Patches added (ml backport): * gdb-update-syscalls-amd64-i386-linux.xml.patch * gdb-record-handle-statx-system-call.patch - Patches added (to be upstreamed): * gdb-tdep-update-syscalls-ppc64-ppc-linux.xml.patch - Maintenance script qa.sh: * Add another KFAIL for PR27027. * Remove PR28461 KFAIL. OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=324
55 lines
1.7 KiB
Diff
55 lines
1.7 KiB
Diff
[gdb/testsuite] Detect 'No MPX support'
|
|
|
|
On openSUSE Leap 15.3, mpx support has been disabled for m32, so I run into:
|
|
...
|
|
(gdb) run ^M
|
|
Starting program: outputs/gdb.arch/i386-mpx/i386-mpx ^M
|
|
[Thread debugging using libthread_db enabled]^M
|
|
Using host libthread_db library "/lib64/libthread_db.so.1".^M
|
|
No MPX support^M
|
|
...
|
|
and eventually into all sort of fails in this and other mpx test-cases.
|
|
|
|
Fix this by detecting the "No MPX support" message in have_mpx.
|
|
|
|
Tested on x86_64-linux with target boards unix and unix/-m32.
|
|
|
|
---
|
|
gdb/testsuite/lib/gdb.exp | 23 +++++++++++++++++++++++
|
|
1 file changed, 23 insertions(+)
|
|
|
|
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
|
index 8b62d73ca9a..306e746168b 100644
|
|
--- a/gdb/testsuite/lib/gdb.exp
|
|
+++ b/gdb/testsuite/lib/gdb.exp
|
|
@@ -8089,6 +8089,29 @@ gdb_caching_proc have_mpx {
|
|
|
|
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 result [remote_exec target $obj]
|
|
+ set status [lindex $result 0]
|
|
+ set output [lindex $result 1]
|
|
+ set status [expr ($status == 0) \
|
|
+ && ![string equal $output "No MPX support\r\n"]]
|
|
+
|
|
+ remote_file build delete $obj
|
|
+
|
|
verbose "$me: returning $status" 2
|
|
return $status
|
|
}
|