This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3] gdb: Improve syscall entry/return tracking on Linux
- From: Pedro Alves <palves at redhat dot com>
- To: Josh Stone <jistone at redhat dot com>, gdb-patches at sourceware dot org
- Cc: sergiodj at redhat dot com
- Date: Mon, 19 Oct 2015 09:48:08 +0100
- Subject: Re: [PATCH v3] gdb: Improve syscall entry/return tracking on Linux
- Authentication-results: sourceware.org; auth=none
- References: <5619260C dot 9060801 at redhat dot com> <1445044608-23715-1-git-send-email-jistone at redhat dot com>
On 10/17/2015 02:16 AM, Josh Stone wrote:
> gdb/ChangeLog:
>
> 2015-10-16 Josh Stone <jistone@redhat.com>
>
> * linux-nat.c (linux_handle_syscall_trap): Always update entry/
> return state, even when not actively catching syscalls at all.
> (linux_handle_extended_wait): Mark syscall_state like an entry.
> (wait_lwp): Set syscall_state ignored for other traps.
> (linux_nat_filter_event): Likewise.
>
> gdb/testsuite/ChangeLog:
>
> 2015-10-16 Josh Stone <jistone@redhat.com>
>
> * gdb.base/catch-syscall.c: Include <sched.h>.
> (unknown_syscall): New variable.
> (main): Trigger a vfork and an unknown syscall.
> * gdb.base/catch-syscall.exp (vfork_syscalls): New variable.
> (unknown_syscall_number): Likewise.
> (check_call_to_syscall): Accept an optional syscall pattern.
> (check_return_from_syscall): Likewise.
> (check_continue): Likewise.
> (test_catch_syscall_without_args): Check for vfork and ENOSYS.
> (test_catch_syscall_skipping_return): New test toggling off 'catch
> syscall' to step over the syscall return, then toggling back on.
> (test_catch_syscall_mid_vfork): New test turning on 'catch syscall'
> during a PTRACE_EVENT_VFORK stop, in the middle of a vfork syscall.
> (do_syscall_tests): Call test_catch_syscall_without_args and
> test_catch_syscall_mid_vfork.
> (test_catch_syscall_without_args_noxml): Check for vfork and ENOSYS.
> (fill_all_syscalls_numbers): Initialize unknown_syscall_number.
OK. Please push.
Thanks,
Pedro Alves