This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/4] Catch syscall groups
- From: Gabriel Krisman Bertazi <gabriel at krisman dot be>
- To: gdb-patches at sourceware dot org
- Cc: Gabriel Krisman Bertazi <gabriel at krisman dot be>
- Date: Sun, 2 Nov 2014 17:35:40 -0200
- Subject: [PATCH 0/4] Catch syscall groups
- Authentication-results: sourceware.org; auth=none
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