This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Set unknown_syscall differently on arm linux


On 06/28/2016 10:26 AM, Yao Qi wrote:
> 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.
> 

I think it'd be good if this was converted to a comment in the source.

> --- 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;
>  

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]