actions [num]
actions
without bothering 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 end
. So
far, the only defined actions are collect
and
while-stepping
.
To remove all actions from a tracepoint, type `actions num'
and follow it immediately with `end'.
() collect data // collect some data () while-stepping 5 // single-step 5 times and collect data () end // signals the end of actions.In the following example, the action list begins with
collect
commands indicating the things to be collected when the tracepoint is
hit. Then, in order to single-step and collect additional data
following the tracepoint, a while-stepping
command is used,
followed by the list of things to be collected while stepping. The
while-stepping
command is terminated by its own separate
end
command. Lastly, the action list is terminated by an
end
command.
() trace foo () 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, ...
$regs
$args
$locals
collect
commands, each one
with a single argument, or one collect
command with several
arguments separated by commas: the effect is the same.
The command info scope
(see section Examining the Symbol Table) is
particularly useful for figuring out what data to collect.
while-stepping n
while-stepping
command is
followed by the list of what to collect while stepping (followed by
its own end
command):
> while-stepping 12 > collect $regs, myglobal > end >You may abbreviate
while-stepping
as ws
or
stepping
.
Go to the first, previous, next, last section, table of contents.