From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25135 invoked by alias); 7 Feb 2011 16:55:11 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 25125 invoked by uid 22791); 7 Feb 2011 16:55:10 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org From: Tom Tromey To: Roland McGrath Cc: Project Archer Subject: Re: systemtap markers and gdb References: <20110113171524.143B7403EB@magilla.sf.frob.com> Date: Mon, 07 Feb 2011 16:55:00 -0000 In-Reply-To: (Tom Tromey's message of "Fri, 04 Feb 2011 15:00:21 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2011-q1/txt/msg00032.txt.bz2 Tom> I didn't rewrite the docs yet, but here is the new proposal. Here's my new doc patch. Tom diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 7f8c785..a93ddf3 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -3304,6 +3304,7 @@ all breakpoints in that range are operated on. * Conditions:: Break conditions * Break Commands:: Breakpoint command lists * Save Breakpoints:: How to save breakpoints in a file +* Static Probe Points:: Listing static probe points * Error in Breakpoints:: ``Cannot insert breakpoints'' * Breakpoint-related Warnings:: ``Breakpoint address adjusted...'' @end menu @@ -4517,6 +4518,49 @@ and remove the breakpoint definitions you're not interested in, or that can no longer be recreated. @end table +@node Static Probe Points +@subsection Static Probe Points + +@cindex SystemTap static probe point +The @sc{gnu}/Linux tool @code{SystemTap} provides a way for +applications to embed static probes. @value{GDBN} can list the +available probes, and you can put breakpoints at the probe points +(@pxref{Specify Location}). + +You can examine the available @code{SystemTap} static probes using +@code{info probes}: + +@table @code +@kindex info probes +@item info probes [@var{provider} [@var{name} [@var{objfile}]]] +List the available @code{SystemTap} static probes. + +If given, @var{provider} is a regular expression used to select which +providers to list. If omitted, all providers are listed. + +If given, @var{name} is a regular expression used to select which +probes to list. If omitted, all probes are listed. + +If given, @var{objfile} is a regular expression used to select which +object files (executable or shared libraries) to examine. If not +given, all object files are considered. +@end table + +@vindex $_probe_arg@r{, convenience variable} +A probe may specify up to ten arguments. These are available at the +point at which the probe is defined---that is, when the current PC is +at the probe's location. The arguments are available using the +convenience variables (@pxref{Convenience Vars}) +@code{$_probe_arg0}@dots{}@code{$_probe_arg9}. Each probe argument is +an integer of the appropriate size; types are not preserved. The +convenience variable @code{$_probe_argc} holds the number of arguments +at the current probe point. + +These variable are always available, but attempts to access them at +any location other than a probe point will cause @value{GDBN} to give +an error. + + @c @ifclear BARETARGET @node Error in Breakpoints @subsection ``Cannot insert breakpoints'' @@ -6429,6 +6473,21 @@ specify the function unambiguously, e.g., if there are several functions with identical names in different source files. @end table +@cindex SystemTap static probe point +@item probe:@r{[}@var{objfile}:@r{]}@r{[}@var{provider}:@r{]}@var{name} +The @sc{gnu}/Linux tool @code{SystemTap} provides a way for +applications to embed static probes. This form of linespec specifies +the location of such a static probe. See +@uref{http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps} +for more information on static probes. + +If @var{objfile} is given, only probes coming from that shared library +or executable are considered. If @var{provider} is given, then only +probes from that provider are considered. + +@xref{Static Probe Points}, for more information on finding and using +static probes. + @end table @@ -8503,6 +8562,10 @@ to match the format in which the data was printed. The variable @code{$_exitcode} is automatically set to the exit code when the program being debugged terminates. +@item $_probe_argc +@itemx $_probe_arg0@dots{}$_probe_arg9 +Arguments to a SystemTap static probe. @xref{Static Probe Points}. + @item $_sdata @vindex $_sdata@r{, inspect, convenience variable} The variable @code{$_sdata} contains extra collected static tracepoint