From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13514 invoked by alias); 2 Nov 2014 19:36:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 13502 invoked by uid 89); 2 Nov 2014 19:36:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: layla.krisman.be Received: from layla.krisman.be (HELO layla.krisman.be) (176.31.208.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 02 Nov 2014 19:36:12 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (envelope-from ) id 1Xl0rH-0008Mc-3N; Sun, 02 Nov 2014 20:30:40 +0100 From: Gabriel Krisman Bertazi To: gdb-patches@sourceware.org Cc: Gabriel Krisman Bertazi Subject: [PATCH 0/4] Catch syscall groups Date: Sun, 02 Nov 2014 19:36:00 -0000 Message-Id: <1414956944-8856-1-git-send-email-gabriel@krisman.be> X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00024.txt.bz2 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:" 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 . 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