[PATCH v4 2/2] gdb/mi: add a '--force' flag to the '-break-condition' command
Aktemur, Tankut Baris
tankut.baris.aktemur@intel.com
Mon Jul 12 08:33:02 GMT 2021
On Sunday, July 11, 2021 8:52 PM, Jonah Graham wrote:
> > On Wed, 5 May 2021 at 22:46, Simon Marchi <mailto:simon.marchi@polymtl.ca> wrote:
> > > + /* There must be at least two more args: a bpnum and a condition
> > > + expression. */
> > > + if (oind + 1 >= argc)
> > > + error (_("-break-condition: Missing arguments"));
> >
> > I don't know what the standard is for MI commands, but it would be handy
> > for somebody trying this by hand to say what are the expected arguments
> > in the error message.
>
> Hi Baris and Simon,
>
> Sorry I didn't catch this earlier, but this change breaks removing conditions from MI. "-break-condition 2" should remove the condition for breakpoint 2, same as "condition 2" at CLI does\
. Instead an error message is returned:
>
> ^error,msg="-break-condition: Missing the <number> and/or <expr> argument"
>
> which corresponds to the updated error message that was actually committed.
>
> I raised https://sourceware.org/bugzilla/show_bug.cgi?id=28076 to track this.
>
> Jonah
Hi Jonah,
Sorry about this breakage. I had implemented the behavior according to
the document, where the command was specified as
-break-condition @var{number} @var{expr}
The 'expr' argument had seemed mandatory together with 'number'. I conclude
that this is an oversight in the documentation because otherwise there is no
way to clear an existing breakpoint condition, as far as I know. The
-break-condition command was originally delegating all the arguments to the
CLI's "cond" command. So, erasing a condition simply worked back then.
I submitted a patch to address the problem:
https://sourceware.org/pipermail/gdb-patches/2021-July/180818.html
Would you have a chance to test it?
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
More information about the Gdb-patches
mailing list