Re: [PATCH v4 2/2] gdb/breakpoint: add flags to 'condition' and 'break' commands to force condition

Tom Tromey
2020-12-10T20:30:34Z

>>>>> "Pedro" == Pedro Alves <pedro@palves.net> writes:

Pedro> Also, I find it hard to justify that this works:

Pedro> (gdb) break main -force-condition if foo

Pedro> while this doesn't:

Pedro> (gdb) break main -qualified

I wasn't really paying attention to this, but adding suffixes to
linespecs is generally a problem. For example this will also mis-parse,
I think, if one uses the '*' form:

break *whatever -force-condition

since this will parse as subtraction operators.

That is, adding a suffix ordinarily requires updating all the parsers
(really the lexers). Option-style prefixes are better for this reason.

Pedro> Anyhow, the patch is in, and I'm not going to ask to revert it. Onward.

IMO it should be fixed for the future.

Tom