This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mi/2554: -break-list can produce non MI compliant output

>Number:         2554
>Category:       mi
>Synopsis:       -break-list can produce non MI compliant output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 13 12:48:02 UTC 2008
>Release:        6.8
Suppose I am using gdb --interpreter=mi2 to debug a program with a .gdbinit that contains:
b info_command

Then I set a breakpoint in main, doing "-break-insert main".

When I do "-break-list", I get an MI output record that I believe is not MI compliant:


The part that is not MI compliant here is the result:
script={"silent", "return"}

I believe that is not a valid MI RESULT production, as defined by the grammar at

A RESULT has the form:

where VALUE is either a CONST, a LIST, or a TUPLE.

In our case, the VALUE is {"silent", "return"}. This looks like a TUPLE because it starts with a '{', but alas it's not a TUPLE because a TUPLE should have the form:
"{}" | "{" RESULT ( "," RESULT )* "}"

where, again, RESULT has the form: VARIABLE "=" VALUE.

So, I think we should have script = ["silent", "return"] instead, where ["silent", "return"] is a LIST, not a TUPLE.
That would be at least compliant with the MI grammar, and save clients from twistint their MI parsers to make those understand non MI compliant constructs.

>From a quick first glance, it seems to appear that the function print_one_breakpoint_location() reads at some point:
script_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "script");

That could suggests the deliberate generation of a tuple here, where I believe it should be a LIST generation instead. Maybe that could be a starting point of investigation.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]