This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]tracepoint.c: Add conditionals num to find_matching_tracepoint


On 8/7/11 9:28 AM, Hui Zhu wrote:
Hi,

I found that when I set some tracepoint to a same address, and use
tsave.   And use "target tfile " to open it.  It will only one
tracepoint available.
And output some words like:
Created tracepoint 1 for target's tracepoint 1 at 0x40050a.
Assuming tracepoint 1 is same as target's tracepoint 2 at 0x40050a.
Assuming tracepoint 1 is same as target's tracepoint 3 at 0x40050a.

This is because find_matching_tracepoint didn't check the num.


The number is exactly the one property that tracepoint upload must never consider when looking for matching tracepoints, since the numbers vary depending on what the user has been doing during the current GDB session. Addressing the FIXME will help the multiple-tracepoint case, although it's kind of messy.

There is another useful heuristic that would be easy to add, which is to exclude matching on a tracepoint that has already been uploaded. Having created tracepoint 1 from the uploaded info, it's never going to be the case that uploaded tracepoints 2 and 3 are the same as 1. It might be as simple as testing number_on_target, but beware that it might be nonzero due to other trace runs or some such.

Stan
stan@codesourcery.com


And I think the tracepoint have the same address is really helpful for user. Because we can set different condition to make tracepoint more powerful. So I make following patch.

Please help me review it.

Thanks,
Hui


2011-08-08 Hui Zhu<teawater@gmail.com>


* tracepoint.c (find_matching_tracepoint): Add number check.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]