Commit 28244707 authored by Yao Qi's avatar Yao Qi
Browse files

Set unknown_syscall differently on arm linux

Currently, we use 123456789 as unknown or illegal syscall number, and
expect program return ENOSYS.  Although 123456789 is an illegal syscall
number on arm linux, kernel sends SIGILL rather than returns -ENOSYS.
However, arm linux kernel returns -ENOSYS if syscall number is within
0xf0001..0xf07ff, so we can use 0xf07ff for unknown_syscall in test.

gdb/testsuite:

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

	* gdb.base/catch-syscall.c [__arm__]: Set unknown_syscall to
	0x0f07ff.
parent 042c94de
2016-06-29 Yao Qi <yao.qi@linaro.org>
* gdb.base/catch-syscall.c [__arm__]: Set unknown_syscall to
0x0f07ff.
2016-06-28 Yao Qi <yao.qi@linaro.org>
* gdb.base/catch-syscall.exp: Remove check on isnative and target
......
......@@ -28,7 +28,15 @@ int pipe_syscall = SYS_pipe;
int pipe2_syscall = SYS_pipe2;
#endif
int write_syscall = SYS_write;
#if defined(__arm__)
/* Although 123456789 is an illegal syscall umber on arm linux, kernel
sends SIGILL rather than returns -ENOSYS. However, arm linux kernel
returns -ENOSYS if syscall number is within 0xf0001..0xf07ff, so we
can use 0xf07ff for unknown_syscall in test. */
int unknown_syscall = 0x0f07ff;
#else
int unknown_syscall = 123456789;
#endif
int exit_group_syscall = SYS_exit_group;
/* Set by the test when it wants execve. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment