From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28451 invoked by alias); 27 Nov 2012 15:56:41 -0000 Received: (qmail 28438 invoked by uid 22791); 27 Nov 2012 15:56:39 -0000 X-SWARE-Spam-Status: No, hits=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Nov 2012 15:56:30 +0000 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 27 Nov 2012 07:56:17 -0800 X-ExtLoop1: 1 Received: from swsutil001.isw.intel.com ([10.237.237.11]) by AZSMGA002.ch.intel.com with ESMTP; 27 Nov 2012 07:56:15 -0800 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by swsutil001.isw.intel.com (8.13.6/8.13.6/MailSET/Hub) with ESMTP id qARFuEHo019974; Tue, 27 Nov 2012 15:56:14 GMT Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id qARFuE2X020480; Tue, 27 Nov 2012 16:56:14 +0100 Received: (from mgherza1@localhost) by ulslx001.iul.intel.com with id qARFuDU1020476; Tue, 27 Nov 2012 16:56:13 +0100 From: Mircea Gherzan To: gdb-patches@sourceware.org Cc: keven.boell@intel.com, mircea.gherzan@intel.com, marc.khouzam@ericsson.com, tromey@redhat.com, vladimir@codesourcery.com Subject: [PATCH v6 2/3] MI: document the -catch-load/-unload commands Date: Tue, 27 Nov 2012 15:56:00 -0000 Message-Id: <1354031591-20226-2-git-send-email-mircea.gherzan@intel.com> In-Reply-To: <1354031591-20226-1-git-send-email-mircea.gherzan@intel.com> References: <1354031591-20226-1-git-send-email-mircea.gherzan@intel.com> X-IsSubscribed: yes 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 X-SW-Source: 2012-11/txt/msg00749.txt.bz2 2012-11-16 Mircea Gherzan gdb/doc: * gdb.texinfo (GDB/MI Catchpoint Commands): New section. gdb/: * NEWS: mention the -catch-load/-catch-unload MI commands. Signed-off-by: Mircea Gherzan --- gdb/NEWS | 2 + gdb/doc/gdb.texinfo | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 0 deletions(-) diff --git a/gdb/NEWS b/gdb/NEWS index 3b09e5f..06ede52 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -99,6 +99,8 @@ show print type typedefs has been requested. ** New optional parameter COUNT added to the "-data-write-memory-bytes" command, to allow pattern filling of memory areas. + ** New commands "-catch-load"/"-catch-unload" added for intercepting + library load/unload events. * GDB now supports the "mini debuginfo" section, .gnu_debugdata. You must have the LZMA library available when configuring GDB for this diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index afe3845..cadbb34 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -27139,6 +27139,7 @@ may repeat one or more times. * GDB/MI Simple Examples:: * GDB/MI Command Description Format:: * GDB/MI Breakpoint Commands:: +* GDB/MI Catchpoint Commands:: * GDB/MI Program Context:: * GDB/MI Thread Commands:: * GDB/MI Ada Tasking Commands:: @@ -28713,6 +28714,75 @@ times="1"@}]@} (gdb) @end smallexample + +@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@node GDB/MI Catchpoint Commands +@section @sc{gdb/mi} Catchpoint Commands + +This section documents @sc{gdb/mi} commands for manipulating +catchpoints. + +@subheading The @code{-catch-load} Command +@findex -catch-load + +@subsubheading Synopsis + +@smallexample + -catch-load [ -t ] [ -d ] @var{regexp} +@end smallexample + +Add a catchpoint for library load events. If the @samp{-t} option is used, +the catchpoint is a temporary one (@pxref{Set Breaks, ,Setting +Breakpoints}). If the @samp{-d} option is used, the catchpoint is created +in a disabled state. The @samp{regexp} argument is a regular +expression used to match the name of the loaded library. + + +@subsubheading @value{GDBN} Command + +The corresponding @value{GDBN} command is @samp{catch load}. + +@subsubheading Example + +@smallexample +-catch-load -t foo.so +=breakpoint-created,bkpt=@{number="1",type="catchpoint",disp="del", +enabled="y",what="load of library matching foo.so",times="0"@} +^done +(gdb) +@end smallexample + + +@subheading The @code{-catch-unload} Command +@findex -catch-unload + +@subsubheading Synopsis + +@smallexample + -catch-unload [ -t ] [ -d ] @var{regexp} +@end smallexample + +Add a catchpoint for library unload events. If the @samp{-t} option is +used, the catchpoint is a temporary one (@pxref{Set Breaks, ,Setting +Breakpoints}). If the @samp{-d} option is used, the catchpoint is +created in a disabled state. The @samp{regexp} argument is a regular +expression used to match the name of the unloaded library. + +@subsubheading @value{GDBN} Command + +The corresponding @value{GDBN} command is @samp{catch unload}. + +@subsubheading Example + +@smallexample +-catch-unload -d bar.so +=breakpoint-created,bkpt=@{number="1",type="catchpoint",disp="keep", +enabled="n",what="unload of library matching bar.so",times="0"@} +^done +(gdb) +@end smallexample + + @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Program Context @section @sc{gdb/mi} Program Context -- 1.7.1