public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Josh Stone <jistone@redhat.com>
Cc: gdb-patches@sourceware.org, sergiodj@redhat.com,
	palves@redhat.com, philippe.waroquiers@skynet.be,
	jistone@redhat.com
Subject: Re: [PATCH] Implement 'catch syscall' for gdbserver
Date: Fri, 30 Oct 2015 13:26:00 -0000	[thread overview]
Message-ID: <83d1vw22sb.fsf@gnu.org> (raw)
In-Reply-To: <1446169946-28117-1-git-send-email-jistone@redhat.com>

> From: Josh Stone <jistone@redhat.com>
> Cc: sergiodj@redhat.com, palves@redhat.com, philippe.waroquiers@skynet.be,        Josh Stone <jistone@redhat.com>
> Date: Thu, 29 Oct 2015 18:52:26 -0700
> 
> gdb/ChangeLog:
> 
> 2015-10-29  Josh Stone  <jistone@redhat.com>
> 
> 	* NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and new
> 	GDBserver support for catch syscall.
> 	* remote.c (PACKET_QCatchSyscalls): New enum.
> 	(remote_set_syscall_catchpoint): New function.
> 	(remote_protocol_features): New element for QCatchSyscalls.
> 	(remote_parse_stop_reply): Parse syscall_entry/return stops.
> 	(init_remote_ops): Install remote_set_syscall_catchpoint.
> 	(_initialize_remote): Config QCatchSyscalls.
> 
> gdb/doc/ChangeLog:
> 
> 2015-10-29  Josh Stone  <jistone@redhat.com>
> 
> 	* gdb.texinfo (Remote Configuration): List the QCatchSyscalls packet.
> 	(Stop Reply Packets): List the syscall entry and return stop reasons.
> 	(General Query Packets): Describe QCatchSyscalls, and add it to the
> 	table and detailed list of stub features.
> 
> gdb/gdbserver/ChangeLog:
> 
> 2015-10-29  Josh Stone  <jistone@redhat.com>
> 
> 	* inferiors.h: Include "gdb_vecs.h".
> 	(struct process_info): Add syscalls_to_catch.
> 	* inferiors.c (remove_process): Free syscalls_to_catch.
> 	* remote-utils.c (prepare_resume_reply): Report syscall_entry and
> 	syscall_resume stops.
> 	* server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
> 	* server.c (handle_general_set): Handle QCatchSyscalls.
> 	(handle_query): Report support for QCatchSyscalls.
> 	* target.h (struct target_ops): Add supports_catch_syscall.
> 	(target_supports_catch_syscall): New macro.
> 	* linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
> 	(struct lwp_info): Add syscall_state.
> 	* linux-low.c (SYSCALL_SIGTRAP): Define.
> 	(handle_extended_wait): Mark syscall_state like an entry.
> 	(get_syscall_trapinfo): New function, proxy to the_low_target.
> 	(linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
> 	(linux_low_filter_event): Set ptrace options even before arch-specific
> 	setup.  Either toggle syscall_state entry/return or set ignored.
> 	(gdb_catching_syscalls_p): New function.
> 	(gdb_catch_this_syscall_p): New function.
> 	(linux_wait_1): Handle SYSCALL_SIGTRAP.
> 	(linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
> 	(linux_supports_catch_syscall): New function.
> 	(linux_target_ops): Install it.
> 	* linux-x86-low.c (x86_get_syscall_trapinfo): New function.
> 	(the_low_target): Install it.
> 	* nto-low.c (nto_target_ops): Install NULL supports_catch_syscall.
> 	* spu-low.c (spu_target_ops): Likewise.
> 	* win32-low.c (win32_target_ops): Likewise.
> 
> gdb/testsuite/ChangeLog:
> 
> 2015-10-29  Josh Stone  <jistone@redhat.com>
> 
> 	* gdb.base/catch-syscall.exp: Enable testing for x86 and x86_64 linux
> 	remote targets.
> 	(do_syscall_tests): Only test mid-vfork on local or extended-remote.

The documentation parts are OK, with this minor comment and one
question.  Here's the comment:

> +Note that if a syscall not member of the list is reported, @value{GDBN}
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"a syscall not in the list" sounds simpler and more clear, and doesn't
change the meaning.

> +will filter it if this syscall is not caught.  It is however more efficient
> +to only report the needed syscalls.

The question is about the same sentence: maybe because I don't really
use this stuff, I'm not sure I understand the distinction between
"reported" and "caught" here: what does it mean for a syscall to be
reported, but not caught?  Perhaps this text should be clarified to
not cause such confusion.

Thanks.

  reply	other threads:[~2015-10-30  8:12 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 11:02 Josh Stone
2015-10-30 13:26 ` Eli Zaretskii [this message]
2015-11-01 22:15 ` Doug Evans
2015-11-02 18:24   ` Josh Stone
2015-11-21 10:29     ` Philippe Waroquiers
2015-11-23  4:20       ` Doug Evans
2015-11-23  4:20 ` Doug Evans
2015-11-25  2:37   ` Josh Stone
2015-11-26  2:53 ` [PATCH v2 1/2] gdbserver: Set Linux ptrace options ASAP Josh Stone
2015-11-26  2:54   ` [PATCH v2 2/2] Implement 'catch syscall' for gdbserver Josh Stone
2015-11-26 10:34   ` [PATCH v2 1/2] gdbserver: Set Linux ptrace options ASAP Pedro Alves
2015-11-30 18:50     ` Josh Stone
2015-12-01 20:17       ` Josh Stone
2015-12-02 14:01         ` Pedro Alves
2015-12-04  2:26   ` [PATCH v3 1/2] gdbserver: set ptrace flags after creating inferiors Josh Stone
2015-12-04  2:27     ` [PATCH v3 2/2] Implement 'catch syscall' for gdbserver Josh Stone
2015-12-04  8:45       ` Eli Zaretskii
2015-12-05  2:14         ` Josh Stone
2015-12-05  8:02           ` Eli Zaretskii
2015-12-07 16:50             ` Josh Stone
2015-12-07 17:15               ` Eli Zaretskii
2015-12-04 13:18       ` Pedro Alves
2015-12-05  2:16         ` Josh Stone
2015-12-08 13:31           ` Pedro Alves
2015-12-08 19:02             ` Josh Stone
2015-12-08 13:37           ` Pedro Alves
2015-12-11 21:19           ` Josh Stone
2015-12-16 15:42             ` Pedro Alves
2016-01-09  3:09       ` [PATCH v4] " Josh Stone
2016-01-09  7:37         ` Eli Zaretskii
2016-01-11 17:44         ` Philippe Waroquiers
2016-01-12 12:05         ` Pedro Alves
2016-01-12 19:10           ` Josh Stone
2016-01-12 19:22             ` Pedro Alves
2016-01-12 20:01               ` Josh Stone
2016-03-29 14:27                 ` Yao Qi
2016-03-29 18:12                   ` Josh Stone
2016-03-29 23:49                     ` Josh Stone
2016-03-30 12:23                       ` Yao Qi
2016-03-31  1:10                         ` Josh Stone
2016-04-01 13:05                           ` Yao Qi
2016-04-01 16:38                             ` Josh Stone
2016-05-29 16:47         ` [doc] NEWS: QCatchSyscalls: simplify Jan Kratochvil
2016-05-29 17:29           ` Eli Zaretskii
2016-05-29 17:50             ` Jan Kratochvil
2016-05-29 18:19               ` Eli Zaretskii
2016-05-29 18:47                 ` [commit] " Jan Kratochvil
2015-12-04 12:16     ` [PATCH v3 1/2] gdbserver: set ptrace flags after creating inferiors Pedro Alves
2015-12-05  2:14       ` Josh Stone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d1vw22sb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jistone@redhat.com \
    --cc=palves@redhat.com \
    --cc=philippe.waroquiers@skynet.be \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).