This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Improve and fix catch-syscall.exp
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: Doug Evans <xdje42 at gmail dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Tue, 17 Dec 2013 10:23:49 +0000
- Subject: Re: [PATCH] Improve and fix catch-syscall.exp
- Authentication-results: sourceware.org; auth=none
- References: <m37gb85p2o dot fsf at redhat dot com> <m3a9g27yr8 dot fsf at sspiff dot org> <m38uvkxuiy dot fsf at redhat dot com>
On 12/16/2013 11:09 PM, Sergio Durigan Junior wrote:
> + set close_syscall [get_integer_valueof "close_syscall" 0]
> + set chroot_syscall [get_integer_valueof "chroot_syscall" 0]
> + set all_syscalls_numbers [list $close_syscall $chroot_syscall]
> + set last_syscall_number [get_integer_valueof "exit_group_syscall" 0]
Minor nit:
As we saw in the other patch, using 0 for invalid syscall
number isn't a good idea. It shouldn't really matter much in
practice but for code clarity I suggest defaulting to -1 instead.
--
Pedro Alves