[RFC] Fix the MI result of -break-insert with multiple locations

André Pönitz andre.poenitz@mathematik.tu-chemnitz.de
Tue Jan 29 19:45:00 GMT 2013


On Tue, Jan 29, 2013 at 03:36:04PM +0100, Mircea Gherzan wrote:
> The current MI output when printing a breakpoint with multiple locations
> is not conformant to the MI specification:
> 
>   bkpt={number="1", ...},{number="1.1", ...},{number="1.2", ...}
> 
> This patch fixes this issue by moving the locations to a list inside the
> first tuple:
> 
>   bkpt={number="1", ... , locations=[{number="1.1", ...}, ...]}

This seems more like an additional burden for frontends which cannot
rely on a specific gdb version being installed as they have to keep
code to parse both results, for years.

The fact that the current output might not conform to the documented
grammar has no impact to existing frontends as they have/had to cope
with this kind of slight deviations anyway.

An alternative approach would be to just make the documentation match
the actual output. This is not unprecedented.

Andre'



More information about the Gdb-patches mailing list