This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix MI output for multi-location breakpoints
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:
Andrew> Instead of adding a flag for this specific issue, should we consider
Andrew> adding a generic mechanism that allows single commands to be run with
Andrew> a different MI version?
[...]
Andrew> -break-insert --mi 3 LOCATION
I tend to think the feature approach makes life easier for us and for
front end developers when bumping MI versions.
What I mean by this is that, if we ship MI3, then after some period of
time -- probably several years, given gdb's conservative approach --
we'd like to remove MI2. This would let us clean up various hacks.
But consider the current bug. The output is wrong in MI2, so a front
end developer would send:
-break-insert --mi 3 blah blah
Now, we ship a gdb with, say, MI4. Now we either have to support
backward compatibility here, and front ends will have to adapt whenever
MI3 is dropped.
With the feature flag, though, we can drop MI3 in this situation, but
keep accepting -fix-bug-NNN commands, and up-to-date front ends can just
keep working.
I think the difference is that a feature flag has a ratchet effect: you
can't go backward, only forward.
Tom