[PATCH] Add teval tracepoint action

Stan Shebs stan@codesourcery.com
Thu Dec 31 02:40:00 GMT 2009

The use of trace state variables in a tracepoint's action list presents 
a problem; the only available action is "collect", which has the side 
effect of saving the variable's value into the trace buffer.  In some 
cases this might be useful; in others, the trace buffer might fill up 
with useless copies of variable values.  So this patch introduces a new 
action "teval" which has the same syntax as collect, but only evaluates 
its expressions and does not put anything into the trace buffer.

(Tracepoint fans may remember that this was originally proposed as "do", 
but that is ambiguous with "down", so I changed it to be "eval" - but 
that reserves a term that we may want for general evaluation, so Tom 
Tromey suggested "teval", analogously with other t-prefixed tracepoint 


2009-12-30  Stan Shebs  <stan@codesourcery.com>

    Add new tracepoint action teval.
    * tracepoint.c (teval_pseudocommand): New function.
    (validate_actionline): Add teval action case.
    (encode_actions): Ditto.
    (_initialize_tracepoint): Define teval pseudocommand.
    * NEWS: Mention teval.

    * tracepoint.c (trace_status_command): Add some status output.

    * gdb.texinfo (Tracepoint Actions): Describe teval.
    * gdb.trace/actions.exp: Test teval action.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: teval-patch-1
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20091231/77542766/attachment.ksh>

More information about the Gdb-patches mailing list