Re: [PATCH 4/4] gdb/mi: add a '-b' flag to the '-break-insert' cmd to force the condition

Eli Zaretskii via Gdb-patches
2021-04-07T15:53:50Z

> From: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>
> CC: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
> Date: Wed, 7 Apr 2021 15:27:13 +0000
>
> > > + The MI -break-insert and -dprintf-insert commands now support a
> > > + '-b' flag to forcibly define a condition even when the condition
> > > + is invalid at all locations of the breakpoint. This is equivalent
> > > + to the '--force-condition' flag of the CLI's "break" command.
> >
> > By "invalid at all locations" did you mean "invalid for some of the
> > locations"? IOW, does this flag handle the case when the condition is
> > valid for some locations and invalid for others, or is it specifically
> > for the case when the condition is invalid for _all_ the locations?
>
> It is specifically for all the locations. If there are some locations at
> which the condition is valid, the breakpoint is accepted. There is no need
> for the '-b' flag then. The locations at which the condition is valid are
> disabled.

Then how about simply accepting the condition by default in that case,
without any need for a special flag? IOW, it makes little sense to me
to accept the condition if it is _sometimes_ invalid, but not if it is
_always_ invalid. It sounds like a gratuitous limitation. Am I
missing something?