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 2/6] Iterate over ALL_TRACEPOINTS first.


On 12/04/2012 04:44 AM, Yao Qi wrote:
> Hi,
> The 'breakpoint-modified' observer is notified on the breakpoint
> level, in order to notify observer for a given tracepoint only once,
> we change to iterate over tracepoint first, and then iterate over
> locations of each tracepoint.  In the inner loop, when we find a
> tracepoint location is downloaded, we mark a flag, and notify the
> observer in outer loop (on tracepoints) if flag is true.  In short, we
> change the iteration from:
> 
>   ALL_BP_LOCATIONS (bl, blp_tmp)
>    {
>      if (!is_tracepoint (bl->owner))
>        continue;
>    }
> 
> to:
> 
>   ALL_TRACEPOINTS (b)
>    {
>       for (bl = b->loc; bl; bl = bl->next)
>         {}
>    }
> 
> download_tracepoint_locations is called after breakpoint re-setting,
> so I think this change has no functional affect.

Yes, I think so too, because tracepoint locations are never duplicates
(otherwise this would be a problem).

OK.

-- 
Pedro Alves


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