From patchwork Sun Nov 2 19:35:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 3558 Received: (qmail 16149 invoked by alias); 2 Nov 2014 19:37:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 16096 invoked by uid 89); 2 Nov 2014 19:37:03 -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:37:02 +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 1Xl0s5-0008NM-CJ; Sun, 02 Nov 2014 20:31:29 +0100 From: Gabriel Krisman Bertazi To: gdb-patches@sourceware.org Cc: Gabriel Krisman Bertazi Subject: [PATCH 4/4] Update documentation on catching a group of related syscalls. Date: Sun, 2 Nov 2014 17:35:44 -0200 Message-Id: <1414956944-8856-5-git-send-email-gabriel@krisman.be> In-Reply-To: <1414956944-8856-1-git-send-email-gabriel@krisman.be> References: <1414956944-8856-1-git-send-email-gabriel@krisman.be> X-IsSubscribed: yes gdb/ * breakpoint.c (_initialize_breakpoint): Update catch syscall command documentation. * NEWS: Include section about catching groups of syscalls. gdb/doc/ * gdb.texinfo (Set Catchpoints): Add 'group' argument to catch syscall. --- gdb/NEWS | 5 +++++ gdb/breakpoint.c | 10 +++++----- gdb/doc/gdb.texinfo | 8 +++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS index 649c29e..edea1ff 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -60,6 +60,11 @@ SGI Irix-6.x mips-*-irix6* VAX running (4.2 - 4.3 Reno) BSD vax-*-bsd* VAX running Ultrix vax-*-ultrix* +* Catch syscall catches groups of related syscalls. + + Catch syscall command supports catching a group of related + syscalls using the 'group:' or 'g:' prefix. + *** Changes in GDB 7.8 * New command line options diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8520361..9bd3519 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -16736,11 +16736,11 @@ If REGEX is given, only stop for libraries matching the regular expression."), CATCH_PERMANENT, CATCH_TEMPORARY); add_catch_command ("syscall", _("\ -Catch system calls by their names and/or numbers.\n\ -Arguments say which system calls to catch. If no arguments\n\ -are given, every system call will be caught.\n\ -Arguments, if given, should be one or more system call names\n\ -(if your system supports that), or system call numbers."), +Catch system calls by their names, groups and/or numbers. Arguments\n\ +say which system calls to catch. If no arguments are given, every\n\ +system call will be caught. Arguments, if given, should be one or\n\ +more system call names (if your system supports that), system call\n\ +groups or system call numbers."), catch_syscall_command_1, catch_syscall_completer, CATCH_PERMANENT, diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 15c2908..ca16e11 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -4254,7 +4254,7 @@ A call to @code{exec}. This is currently only available for HP-UX and @sc{gnu}/Linux. @item syscall -@itemx syscall @r{[}@var{name} @r{|} @var{number}@r{]} @dots{} +@itemx syscall @r{[}@var{name} @r{|} @var{number} @r{|} @var{group:groupname} @r{|} @var{g:groupname}@r{]} @dots{} @kindex catch syscall @cindex break on a system call. A call to or return from a system call, a.k.a.@: @dfn{syscall}. A @@ -4289,6 +4289,12 @@ may be useful if @value{GDBN}'s database does not have the complete list of syscalls on your system (e.g., because @value{GDBN} lags behind the OS upgrades). +You may specify a group of related syscalls to be caught at once +using the @code{group:} syntax (@code{g:} is a shorter equivalent.). +For instance, on some platforms GDB allows you to catch all network +related syscalls, by passing the argument @code{group:network} to +@code{catch syscall}. + The example below illustrates how this command works if you don't provide arguments to it: