Tracepoint Action Lists - Red Hat ENTERPRISE LINUX 3 - DEBUGGING WITH GDB Manual

Debugging with gdb
Hide thumbs Also See for ENTERPRISE LINUX 3 - DEBUGGING WITH GDB:
Table of Contents

Advertisement

Chapter 12. Tracepoints
(gdb) pass 1

12.1.4. Tracepoint Action Lists

actions [
]
num
This command will prompt for a list of actions to be taken when the tracepoint is hit. If the
tracepoint number
recently defined (so that you can define a tracepoint and then say
about its number). You specify the actions themselves on the following lines, one action at a
time, and terminate the actions list with a line containing just
actions are
collect
To remove all actions from a tracepoint, type
(gdb) collect data // collect some data
(gdb) while-stepping 5 // single-step 5 times, collect data
(gdb) end
In the following example, the action list begins with
to be collected when the tracepoint is hit. Then, in order to single-step and collect additional data
following the tracepoint, a
be collected while stepping. The
command. Lastly, the action list is terminated by an
end
(gdb) trace foo
(gdb) actions
Enter actions for tracepoint 1, one per line:
collect bar,baz
collect $regs
while-stepping 12
collect $fp, $sp
end
end
collect
,
expr1
expr2
Collect values of the given expressions when the tracepoint is hit. This command accepts a
comma-separated list of any valid expressions. In addition to global, static, or local variables,
the following special arguments are supported:
$regs
collect all registers
$args
collect all function arguments
// Stop tracing when foo has been
is not specified, this command sets the actions for the one that was most
num
and
while-stepping
// signals the end of actions.
while-stepping
while-stepping
, ...
// executed 3 times OR when bar has
// been executed 2 times
// OR when baz has been executed 1 time.
end
.
and follow it immediately with
actions
num
commands indicating the things
collect
command is used, followed by the list of things to
command is terminated by its own separate
command.
end
without bothering
actions
. So far, the only defined
95
.
end

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 3 - DEBUGGING WITH GDB and is the answer not in the manual?

Questions and answers

Table of Contents