This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add breakpoint_created observer to update tracepoint_count.
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 07 Nov 2012 18:13:26 +0000
- Subject: Re: [PATCH] Add breakpoint_created observer to update tracepoint_count.
- References: <1352249397-15044-1-git-send-email-yao@codesourcery.com>
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