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: Inconsistency between cli and python breakpoints for ignore count tracking


On 11/13/2013 08:10 AM, Doug Evans wrote:

> Does anyone have a reasonable explanation for why we do ignore_count
> tracking for python breakpoints (even with a "stop" method) but not
> for breakpoints that have a cli condition that doesn't trigger?  The
> inconsistency doesn't feel right to me.

I agree.

> ref: breakpoint.c:bpstat_check_breakpoint_conditions
> 
>   if (cond && value_is_zero)
>     {
>       bs->stop = 0;
>     }
>   else if (b->thread != -1 && b->thread != thread_id)
>     {
>       bs->stop = 0;
>     }
>   else if (b->ignore_count > 0)
>     {

I think this should be:

-  else if (b->ignore_count > 0)
+
+  if (bs->stop && b->ignore_count > 0)

Or whatever equivalent.  IOW, "ignore" only comes into play
if otherwise the breakpoint would cause a stop.

>       b->ignore_count--;
>       bs->stop = 0;
>       /* Increase the hit count even though we don't stop.  */
>       ++(b->hit_count);
>       observer_notify_breakpoint_modified (b);
>     }

-- 
Pedro Alves


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