This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH] Enable count for breakpoints
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org
> [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Stan Shebs
> Sent: Tuesday, February 14, 2012 3:12 PM
> To: gdb-patches@sourceware.org
> Subject: Re: [PATCH] Enable count for breakpoints
>
> On 2/10/12 10:29 AM, Tom Tromey wrote:
> >>>>>> "Stan" == Stan Shebs<stanshebs@earthlink.net> writes:
> > Stan> This patch implements a request from Ericsson GDB
> users, to generalize
> > Stan> "enable once" so that breakpoints can be disabled
> after a given number
> > Stan> of hits instead of the first one.
> >
> > I looked at the patch and it all looked fine to me.
> >
> > I wondered what happened if a user did 'enable once 500' and 'ignore
> > 500' for the same breakpoint. From reading the code, I
> think 'ignore'
> > takes precedence (first the ignores are done, then the
> enable once is
> > handled). I think this should either be documented, or one setting
> > should zero out the other.
> >
>
> Yes, ignore takes precedence. Thinking through the permutations, I
> think the two counts should remain decoupled, otherwise the
> user ends up trying to second-guess GDB's arithmetic.
For what it is worth, I agree on this point.
An ignore count of 10 and an enable count of 5
should cause that GDB only stop 5 times on the breakpoint,
after ignoring the first 10 hits.
> Looking at "info break" output
> though, it looks like I should fine-tune the wording (and tweak the
> manual) to make it clear that's what is going on.
>
> Stan
>
>