Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Set unknown_syscall differently on arm linux
@ 2016-06-28  9:26 Yao Qi
  2016-06-29  9:53 ` Pedro Alves
  2016-06-29 17:41 ` Mike Frysinger
  0 siblings, 2 replies; 8+ messages in thread
From: Yao Qi @ 2016-06-28  9:26 UTC (permalink / raw)
  To: gdb-patches

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-28  Yao Qi  <yao.qi@linaro.org>

	* gdb.base/catch-syscall.c [__arm__]: Set unknown_syscall to
	0x0f07ff.
---
 gdb/testsuite/gdb.base/catch-syscall.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/gdb.base/catch-syscall.c b/gdb/testsuite/gdb.base/catch-syscall.c
index 98222fa..2e3c5d1 100644
--- a/gdb/testsuite/gdb.base/catch-syscall.c
+++ b/gdb/testsuite/gdb.base/catch-syscall.c
@@ -28,7 +28,11 @@ int pipe_syscall = SYS_pipe;
 int pipe2_syscall = SYS_pipe2;
 #endif
 int write_syscall = SYS_write;
+#if defined(__arm__)
+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.  */
-- 
1.9.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-04  2:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28  9:26 [PATCH] Set unknown_syscall differently on arm linux Yao Qi
2016-06-29  9:53 ` Pedro Alves
2016-06-29 13:56   ` Yao Qi
2016-06-29 17:41 ` Mike Frysinger
2016-06-30  7:52   ` Yao Qi
2016-06-30 12:58     ` Mike Frysinger
2016-06-30 14:48       ` Yao Qi
2016-07-04  2:20         ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox