[patch] Fix a double collect of static tracepoint

Yao Qi yao@codesourcery.com
Tue Dec 20 16:38:00 GMT 2011


Hi,
This patch fixes a problem that static tracepoint's collect is performed
twice (one from gdbserver and the other one from IPA), when there is
another regular tracepoint setting at the same address.

When program hits a trap, gdbserver will iterate all tracepoints (in
tracepoint.c:tracepoint_was_hit) and call collect_data_at_tracepoint if
condition is null or result is true. In this iteration, static
tracepoint is in this list, so gdbserver will collect for this static
tracepoint, even the trap is caused by another regular tracepoint, which
is set at the same address.  The collect of static tracepoint is
performed for the first time.

Then, gdbserver resumes program, and UST marker/probe is executed.  In
gdb_probe, the collect of static tracepoint is performed for the 2nd
time.  So we have one static tracepoint, "hit" once, but get two trace
frames finally.

This patch is to fix this problem described above.  I'll send out
another patch for test case, and this patch fixes one fail in it.

-- 
Yao (齐尧)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Don-t-collect-for-static-tracepoint.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20111220/dfb2b703/attachment.bin>


More information about the Gdb-patches mailing list