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

Aktemur, Tankut Baris via Gdb-patches
2021-04-07T15:27:25Z

On Wednesday, April 7, 2021 5:18 PM, Eli Zaretskii wrote:
> > Date: Wed, 7 Apr 2021 16:55:59 +0200
> > From: Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org>
> >
> > diff --git a/gdb/NEWS b/gdb/NEWS
> > index 6cf76a14317..0232ab92419 100644
> > --- a/gdb/NEWS
> > +++ b/gdb/NEWS
> > @@ -31,6 +31,13 @@
> > equivalent of the CLI's "break -qualified" and "dprintf
> > -qualified".
> >
> > + ** '-break-insert -b' and '-dprintf-insert -b'
> > +
> > + 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.

Thanks
-Baris

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928