[PATCH] Add breakpoint_created observer to update tracepoint_count.

Pedro Alves palves@redhat.com
Wed Nov 7 18:13:00 GMT 2012


On 11/07/2012 12:49 AM, Yao Qi wrote:
> Hi,
> I noticed a bug that 'tracepoint_count' is out of date if tracepoint
> is created by MI command '-break-insert -a'.  This patch is to
> install 'update_tracepoint_count' to observer 'breakpoint_created',
> and 'update_tracepoint_count' can update 'tracepoint_count' if B
> is a tracepoint.
> 
> Regression tested on x86_64-linux.  Is it OK?
> 

No need to install an observer for a notification that is emitted in the same
module the new observer is in.  This is internals of the breakpoints module.
All set_breakpoint_count's calls are centralized in install_breakpoint, through
set_breakpoint_number.  All but break-range's, that is.  I don't recall why
that doesn't use install_breakpoint.  Maybe it should.

We should be able to put 'if (is_tracepoint) set_tracepoint_count()' in
install_breakpoint too.

-- 
Pedro Alves



More information about the Gdb-patches mailing list