manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1.3 Tracepoint Passcounts

passcount [n [num]]

Set the passcount of a tracepoint. The passcount is a way to automatically stop a trace experiment. If a tracepoint's passcount is n, then the trace experiment will be automatically stopped on the n'th time that tracepoint is hit. If the tracepoint number num is not specified, the passcount command sets the passcount of the most recently defined tracepoint. If no passcount is given, the trace experiment will run until stopped explicitly by the user.

Examples:

 
(No value for GDBP) passcount 5 2 // Stop on the 5th execution of
                                   // tracepoint 2

(No value for GDBP) passcount 12  // Stop on the 12th execution of the
                                   // most recently defined tracepoint.
(No value for GDBP) trace foo
(No value for GDBP) pass 3
(No value for GDBP) trace bar
(No value for GDBP) pass 2
(No value for GDBP) trace baz
(No value for GDBP) pass 1        // Stop tracing when foo has been
                                    // executed 3 times OR when bar has
                                    // been executed 2 times
                                    // OR when baz has been executed 1 time.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.