[PATCH v3] gdb: Improve syscall entry/return tracking on Linux
Pedro Alves
palves@redhat.com
Mon Oct 19 08:48:00 GMT 2015
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
More information about the Gdb-patches
mailing list