Skip to content
Snippets Groups Projects
Commit a31d2f06 authored by Yao Qi's avatar Yao Qi
Browse files

Probe catch syscall support

In 82075af2 (Implement 'catch syscall'
for gdbserver), only x86 is supported, but the test can still be run
on other linux targets, like aarch64 and ppc, with native-gdbserver.
This causes many new fails.

This patch removes the check on isnative and on target triplets.
Instead, we can insert catch point, and resume the program to see whether
catch syscall is supported or not.

gdb/testsuite:

2016-06-28  Yao Qi  <yao.qi@linaro.org>

	* gdb.base/catch-syscall.exp: Remove check on isnative and target
	triplets.  Start gdb, execute catch syscall, and continue.  Check
	gdb's output to determine catch syscall is supported.
parent 7160c10d
No related branches found
No related tags found
No related merge requests found
2016-06-28 Yao Qi <yao.qi@linaro.org>
* gdb.base/catch-syscall.exp: Remove check on isnative and target
triplets. Start gdb, execute catch syscall, and continue. Check
gdb's output to determine catch syscall is supported.
2016-06-27 Manish Goregaokar <manish@mozilla.com> 2016-06-27 Manish Goregaokar <manish@mozilla.com>
* gdb.rust/simple.rs: Add test for returning unit in a function * gdb.rust/simple.rs: Add test for returning unit in a function
......
...@@ -19,26 +19,41 @@ ...@@ -19,26 +19,41 @@
# It was written by Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com> # It was written by Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
# on September/2008. # on September/2008.
if { ![isnative] } then { standard_testfile
continue
if { [prepare_for_testing ${testfile}.exp $testfile ${testfile}.c] } {
untested catch-syscall.exp
return -1
} }
# This shall be updated whenever 'catch syscall' is implemented # Check target supports catch syscall or not.
# on some architecture. clean_restart $binfile
if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"] if ![runto_main] then {
&& ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"] fail "Can't run to main"
&& ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"] return
&& ![istarget "mips*-linux*"] && ![istarget "arm*-linux*"]
&& ![istarget "s390*-linux*"] && ![istarget "aarch64*-*-linux*"] } {
continue
} }
standard_testfile set test "catch syscall"
gdb_test_multiple $test $test {
-re "The feature \'catch syscall\' is not supported.*\r\n$gdb_prompt $" {
unsupported "catch syscall isn't supported"
return -1
}
-re ".*$gdb_prompt $" {
pass $test
}
}
if { [prepare_for_testing ${testfile}.exp $testfile ${testfile}.c] } { set test "check catch syscall"
untested catch-syscall.exp gdb_test_multiple "continue" $test {
-re ".*Your system does not support this type\r\nof catchpoint.*$gdb_prompt $" {
unsupported "catch syscall isn't supported"
return -1 return -1
} }
-re ".*Catchpoint.*$gdb_prompt $" {
pass $test
}
}
# All (but the last) syscalls from the example code. It is filled in # All (but the last) syscalls from the example code. It is filled in
# proc setup_all_syscalls. # proc setup_all_syscalls.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment