public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <gabriel@krisman.be>
To: gdb-patches@sourceware.org
Cc: Gabriel Krisman Bertazi <gabriel@krisman.be>
Subject: [PATCH 0/4] Catch syscall groups
Date: Sun, 02 Nov 2014 19:36:00 -0000	[thread overview]
Message-ID: <1414956944-8856-1-git-send-email-gabriel@krisman.be> (raw)

Hello,

This patch series implements the ability to catch a group of related
syscalls with the catch syscall command.  Basically, We separate
syscalls into syscall groups, such as 'network' and 'process' and let
users say something like "catch syscall group:<groupname>" to catch all
the system calls in the group at once.

For the record, I sent a RFC for this feature a few weeks ago.  It can
 be seen here
 <https://www.sourceware.org/ml/gdb-patches/2014-10/msg00130.html>.

I followed the suggestions presented on that thread, and now we are
using the prefixes "group:" and "g:" to specify group names. So, these
syntaxes are allowed:

/* Catches network and process groups.  */
$ catch syscall group:network group:process

$ catch syscall g:network g:process

Other than the usual word completion feature, this patch doesn't provide
a way to list all the groups available.  This was discussed in the RFC
but we couldn't reach a consensus about the syntax.  So, I am leaving it
to a future patch.

Right now, I created syscall groups only for the x86_64 architecture.  I
sorted the syscalls following the same scheme strace does.  I plan to
include support for other architectures as well, after getting this part
upstream.

This patch series is divided as follows: Part 1 updates the xml-syscall
interface to support the syscall group feature; Part 2 has the actual
catchpoint code; Part 3 has the updated x86_64 xml, which defines the
syscall groups for this architecture, and includes tests for this
feature on x86_64; Finally, Part 4 updates documentation and the NEWS
file.

This presented no regressions on Fedora 20 x86 and x86_64.

Gabriel Krisman Bertazi (4):
  Implemement support for groups of syscalls in the xml-syscall    
    interface.
  Add support to catch groups of syscalls.
  Create syscall groups for x86_64.
  Update documentation on catching a group of related syscalls.

 gdb/NEWS                                 |   5 +
 gdb/breakpoint.c                         | 114 ++++++++--
 gdb/doc/gdb.texinfo                      |   8 +-
 gdb/syscalls/amd64-linux.xml             | 362 +++++++++++++++----------------
 gdb/syscalls/gdb-syscalls.dtd            |   3 +-
 gdb/testsuite/gdb.base/catch-syscall.exp |  33 +++
 gdb/xml-syscall.c                        | 219 ++++++++++++++++++-
 gdb/xml-syscall.h                        |  12 +
 8 files changed, 557 insertions(+), 199 deletions(-)

-- 
1.9.3

         reply	other threads:[~2014-11-02 19:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 19:05 [PATCH v2 1/4] Implemement support for groups of syscalls in the xml-syscall interface Gabriel Krisman Bertazi
2014-11-02 19:36 ` Gabriel Krisman Bertazi [this message]
2014-11-02 19:36   ` [PATCH 2/4] Add support to catch groups of syscalls Gabriel Krisman Bertazi
2014-11-14 22:55     ` Sergio Durigan Junior
2014-11-02 19:36   ` [PATCH 1/4] Implemement support for groups of syscalls in the xml-syscall interface Gabriel Krisman Bertazi
2014-11-14 22:42     ` Sergio Durigan Junior
2014-11-02 19:37   ` [PATCH 4/4] Update documentation on catching a group of related syscalls Gabriel Krisman Bertazi
2014-11-02 19:45     ` Eli Zaretskii
2014-11-12  2:04       ` Gabriel Krisman Bertazi
2014-11-12  3:48         ` Eli Zaretskii
2014-11-14 18:52           ` Gabriel Krisman Bertazi
2014-11-14 20:38             ` Eli Zaretskii
2014-11-03 18:38     ` Sergio Durigan Junior
2014-11-02 19:37   ` [PATCH 3/4] Create syscall groups for x86_64 Gabriel Krisman Bertazi
2014-11-14 23:00     ` Sergio Durigan Junior
2014-11-20  2:11       ` Gabriel Krisman Bertazi
2014-11-20  3:08         ` Sergio Durigan Junior
2014-11-21 19:05   ` [PATCH v2 2/4] Add support to catch groups of syscalls Gabriel Krisman Bertazi
2014-11-21 21:34     ` Sergio Durigan Junior
2015-01-15  8:12     ` Doug Evans
2014-11-21 19:06   ` [PATCH v2 4/4] Update documentation on catching a group of related syscalls Gabriel Krisman Bertazi
2014-11-21 19:48     ` Eli Zaretskii
2014-11-26  3:58       ` Gabriel Krisman Bertazi
2014-11-21 19:06   ` [PATCH v2 3/4] Create syscall groups for x86_64 Gabriel Krisman Bertazi
2015-01-15  8:28     ` Doug Evans
2014-11-29  0:19 ` [ping PATCH v2 1/4] Implemement support for groups of syscalls in the xml-syscall interface Gabriel Krisman Bertazi
2014-12-08  0:09   ` [ping^2 " Gabriel Krisman Bertazi
2014-12-21 15:59     ` [ping^3 " Gabriel Krisman Bertazi
2015-01-12 20:47       ` Doug Evans
2015-01-15  8:03 ` [PATCH " Doug Evans
2015-01-29  4:43   ` Gabriel Krisman Bertazi
2015-01-29  7:42     ` Doug Evans

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=1414956944-8856-1-git-send-email-gabriel@krisman.be \
    --to=gabriel@krisman.be \
    --cc=gdb-patches@sourceware.org \
    /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).