| <html lang="en"> |
| <head> |
| <title>Set Tracepoints - Debugging with GDB</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Debugging with GDB"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Tracepoints.html#Tracepoints" title="Tracepoints"> |
| <link rel="next" href="Analyze-Collected-Data.html#Analyze-Collected-Data" title="Analyze Collected Data"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <!-- |
| Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, |
| 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
| Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 or |
| any later version published by the Free Software Foundation; with the |
| Invariant Sections being ``Free Software'' and ``Free Software Needs |
| Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' |
| and with the Back-Cover Texts as in (a) below. |
| |
| (a) The FSF's Back-Cover Text is: ``You are free to copy and modify |
| this GNU Manual. Buying copies from GNU Press supports the FSF in |
| developing GNU and promoting software freedom.''--> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| <link rel="stylesheet" type="text/css" href="../cs.css"> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="Set-Tracepoints"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="Analyze-Collected-Data.html#Analyze-Collected-Data">Analyze Collected Data</a>, |
| Up: <a rel="up" accesskey="u" href="Tracepoints.html#Tracepoints">Tracepoints</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">13.1 Commands to Set Tracepoints</h3> |
| |
| <p>Before running such a <dfn>trace experiment</dfn>, an arbitrary number of |
| tracepoints can be set. A tracepoint is actually a special type of |
| breakpoint (see <a href="Set-Breaks.html#Set-Breaks">Set Breaks</a>), so you can manipulate it using |
| standard breakpoint commands. For instance, as with breakpoints, |
| tracepoint numbers are successive integers starting from one, and many |
| of the commands associated with tracepoints take the tracepoint number |
| as their argument, to identify which tracepoint to work on. |
| |
| <p>For each tracepoint, you can specify, in advance, some arbitrary set |
| of data that you want the target to collect in the trace buffer when |
| it hits that tracepoint. The collected data can include registers, |
| local variables, or global data. Later, you can use <span class="sc">gdb</span> |
| commands to examine the values these data had at the time the |
| tracepoint was hit. |
| |
| <p>Tracepoints do not support every breakpoint feature. Ignore counts on |
| tracepoints have no effect, and tracepoints cannot run <span class="sc">gdb</span> |
| commands when they are hit. Tracepoints may not be thread-specific |
| either. |
| |
| <p><a name="index-fast-tracepoints-681"></a>Some targets may support <dfn>fast tracepoints</dfn>, which are inserted in |
| a different way (such as with a jump instead of a trap), that is |
| faster but possibly restricted in where they may be installed. |
| |
| <p><a name="index-static-tracepoints-682"></a><a name="index-markers_002c-static-tracepoints-683"></a><a name="index-probing-markers_002c-static-tracepoints-684"></a>Regular and fast tracepoints are dynamic tracing facilities, meaning |
| that they can be used to insert tracepoints at (almost) any location |
| in the target. Some targets may also support controlling <dfn>static |
| tracepoints</dfn> from <span class="sc">gdb</span>. With static tracing, a set of |
| instrumentation points, also known as <dfn>markers</dfn>, are embedded in |
| the target program, and can be activated or deactivated by name or |
| address. These are usually placed at locations which facilitate |
| investigating what the target is actually doing. <span class="sc">gdb</span>'s |
| support for static tracing includes being able to list instrumentation |
| points, and attach them with <span class="sc">gdb</span> defined high level |
| tracepoints that expose the whole range of convenience of |
| <span class="sc">gdb</span>'s tracepoints support. Namelly, support for collecting |
| registers values and values of global or local (to the instrumentation |
| point) variables; tracepoint conditions and trace state variables. |
| The act of installing a <span class="sc">gdb</span> static tracepoint on an |
| instrumentation point, or marker, is referred to as <dfn>probing</dfn> a |
| static tracepoint marker. |
| |
| <p><code>gdbserver</code> supports tracepoints on some target systems. |
| See <a href="Server.html#Server">Tracepoints support in <code>gdbserver</code></a>. |
| |
| <p>This section describes commands to set tracepoints and associated |
| conditions and actions. |
| |
| <ul class="menu"> |
| <li><a accesskey="1" href="Create-and-Delete-Tracepoints.html#Create-and-Delete-Tracepoints">Create and Delete Tracepoints</a> |
| <li><a accesskey="2" href="Enable-and-Disable-Tracepoints.html#Enable-and-Disable-Tracepoints">Enable and Disable Tracepoints</a> |
| <li><a accesskey="3" href="Tracepoint-Passcounts.html#Tracepoint-Passcounts">Tracepoint Passcounts</a> |
| <li><a accesskey="4" href="Tracepoint-Conditions.html#Tracepoint-Conditions">Tracepoint Conditions</a> |
| <li><a accesskey="5" href="Trace-State-Variables.html#Trace-State-Variables">Trace State Variables</a> |
| <li><a accesskey="6" href="Tracepoint-Actions.html#Tracepoint-Actions">Tracepoint Actions</a> |
| <li><a accesskey="7" href="Listing-Tracepoints.html#Listing-Tracepoints">Listing Tracepoints</a> |
| <li><a accesskey="8" href="Listing-Static-Tracepoint-Markers.html#Listing-Static-Tracepoint-Markers">Listing Static Tracepoint Markers</a> |
| <li><a accesskey="9" href="Starting-and-Stopping-Trace-Experiments.html#Starting-and-Stopping-Trace-Experiments">Starting and Stopping Trace Experiments</a> |
| <li><a href="Tracepoint-Restrictions.html#Tracepoint-Restrictions">Tracepoint Restrictions</a> |
| </ul> |
| |
| </body></html> |
| |