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] Add breakpoint_created observer to update tracepoint_count.


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


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