Re: [PATCH] Fix MI output for multi-location breakpoints

Tom Tromey
2019-01-12T17:01:24Z

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> In reality, it's included in all versions from 5.1 and up. So it
>> seems odd to list 5.2 and 5.3 specifically. Do you have a
>> suggestion to address this?

Eli> Say "used by" instead of "included in"?

Yeah, I think that would be clearer. The current text makes it sounds
as though MI1 were limited to just these releases, whereas it's actually
the case that these releases included MI1 but not anything later.

Speaking of, it seems like we could remove MI1.

Eli> That's not what bothered me. What bothered me was that we released a
Eli> GDB with this MI syntax without fixing it first. I'm wondering how to
Eli> prevent such mistakes in the future.

Yeah, this is unfortunate.

Also, I think it is hard to see a programmatic way around this, at least
given gdb's current ui-out approach. As I see it, the problem is that
at a given point, one can make either a tuple emitter or a list emitter,
but otherwise there's no distinction in the source. If you choose the
wrong one this is hard to see in review, and there's really nothing else
checking the grammar.

Maybe the MI ui-out object could somehow enforce the constraint, by
asserting if the wrong thing is done. Though it would need a bypass
anyhow because there are already bugs.

Tom