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] Improve and fix catch-syscall.exp


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


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