* [patch] MI: breakpoint "script" is a LIST
@ 2008-11-13 15:11 Jan Kratochvil
2008-11-13 15:35 ` Vladimir Prus
0 siblings, 1 reply; 8+ messages in thread
From: Jan Kratochvil @ 2008-11-13 15:11 UTC (permalink / raw)
To: gdb-patches; +Cc: Dodji Seketeli
[-- Attachment #1: Type: text/plain, Size: 110 bytes --]
Hi,
Nemiver could not parse the MI2 output. The list of commands is a `list', not
a `tuple'.
Regards,
Jan
[-- Attachment #2: gdb-script-list.patch --]
[-- Type: text/plain, Size: 598 bytes --]
2008-11-13 Jan Kratochvil <jan.kratochvil@redhat.com>
* breakpoint.c (print_one_breakpoint_location): "script" is a list.
--- ./gdb/breakpoint.c 3 Nov 2008 14:01:26 -0000 1.359
+++ ./gdb/breakpoint.c 13 Nov 2008 12:22:03 -0000
@@ -3766,7 +3782,7 @@ print_one_breakpoint_location (struct br
struct cleanup *script_chain;
annotate_field (9);
- script_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "script");
+ script_chain = make_cleanup_ui_out_list_begin_end (uiout, "script");
print_command_lines (uiout, l, 4);
do_cleanups (script_chain);
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] MI: breakpoint "script" is a LIST
2008-11-13 15:11 [patch] MI: breakpoint "script" is a LIST Jan Kratochvil
@ 2008-11-13 15:35 ` Vladimir Prus
2008-11-13 15:39 ` Jan Kratochvil
2008-11-16 8:23 ` André Pönitz
0 siblings, 2 replies; 8+ messages in thread
From: Vladimir Prus @ 2008-11-13 15:35 UTC (permalink / raw)
To: gdb-patches
Jan Kratochvil wrote:
> Hi,
>
> Nemiver could not parse the MI2 output. The list of commands is a `list', not
> a `tuple'.
For how long this bug is here? Is the risk that existing frontend break higher than
inconvenience to keep the code as is?
- Volodya
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] MI: breakpoint "script" is a LIST
2008-11-13 15:35 ` Vladimir Prus
@ 2008-11-13 15:39 ` Jan Kratochvil
2008-11-13 20:21 ` Vladimir Prus
2008-11-16 8:23 ` André Pönitz
1 sibling, 1 reply; 8+ messages in thread
From: Jan Kratochvil @ 2008-11-13 15:39 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches, Dodji Seketeli
On Thu, 13 Nov 2008 14:12:54 +0100, Vladimir Prus wrote:
> Jan Kratochvil wrote:
> > Nemiver could not parse the MI2 output. The list of commands is a `list', not
> > a `tuple'.
>
> For how long this bug is here? Is the risk that existing frontend break higher than
> inconvenience to keep the code as is?
The current code does not comply to any generic MI parser as it violates the
MI grammar http://sourceware.org/gdb/current/onlinedocs/gdb_26.html#SEC264 ,
as pointed out by Dodji.
It may be compliant only to some hacky buggy parsers written specifically for
each MI command.
If we want to keep -break-list "script" to produce tuples we have to change it
from current
script={"silent","return"}
to some
script={line0="silent",line1="return"}
which will IMO also break any existing buggy parsers.
And GDB is now between major releases 6.8->6.9 which IMO means it does not
have to keep bug-to-bug compatibility.
Regards,
Jan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] MI: breakpoint "script" is a LIST
2008-11-13 15:39 ` Jan Kratochvil
@ 2008-11-13 20:21 ` Vladimir Prus
2008-11-13 21:35 ` Tom Tromey
2008-11-13 21:55 ` Marc Khouzam
0 siblings, 2 replies; 8+ messages in thread
From: Vladimir Prus @ 2008-11-13 20:21 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches, Dodji Seketeli
[Adding list to CC]
On Thursday 13 November 2008 16:41:13 you wrote:
> On Thu, 13 Nov 2008 14:12:54 +0100, Vladimir Prus wrote:
> > Jan Kratochvil wrote:
> > > Nemiver could not parse the MI2 output. The list of commands is a `list', not
> > > a `tuple'.
> >
> > For how long this bug is here? Is the risk that existing frontend break higher than
> > inconvenience to keep the code as is?
>
> The current code does not comply to any generic MI parser as it violates the
> MI grammar http://sourceware.org/gdb/current/onlinedocs/gdb_26.html#SEC264 ,
> as pointed out by Dodji.
>
> It may be compliant only to some hacky buggy parsers written specifically for
> each MI command.
That's interesting statement -- are you saying all MI frontends out there have
"hacky buggy parsers"?
> If we want to keep -break-list "script" to produce tuples we have to change it
> from current
> script={"silent","return"}
> to some
> script={line0="silent",line1="return"}
> which will IMO also break any existing buggy parsers.
>
> And GDB is now between major releases 6.8->6.9 which IMO means it does not
> have to keep bug-to-bug compatibility.
This breakage is relatively new ;-)
commit b6953506f4d41d46e87650188520283158c37a51
Author: Andrew Cagney <cagney@redhat.com>
Date: Sat May 12 04:08:24 2001 +0000
s/ui_out_list/ui_out_tupple/
@@ -3490,9 +3490,9 @@ print_one_breakpoint (struct breakpoint *b,
{
annotate_field (9);
#ifdef UI_OUT
- ui_out_list_begin (uiout, "script");
+ ui_out_tuple_begin (uiout, "script");
print_command_lines (uiout, l, 4);
- ui_out_list_end (uiout);
+ ui_out_tuple_end (uiout);
But I'm sure all existing frontends handle this. I don't think I'm gonna test
Eclipse (both CDI and DSF), and KDevelop (3.3 and 4), to make sure the proposed
change does not break them. So, we probably get to wait till MI3.
- Volodya
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] MI: breakpoint "script" is a LIST
2008-11-13 20:21 ` Vladimir Prus
@ 2008-11-13 21:35 ` Tom Tromey
2008-11-13 21:55 ` Marc Khouzam
1 sibling, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2008-11-13 21:35 UTC (permalink / raw)
To: Vladimir Prus; +Cc: Jan Kratochvil, gdb-patches, Dodji Seketeli
>>>>> "Vladimir" == Vladimir Prus <vladimir@codesourcery.com> writes:
Jan> The current code does not comply to any generic MI parser as it
Jan> violates the MI grammar
Jan> http://sourceware.org/gdb/current/onlinedocs/gdb_26.html#SEC264 ,
Jan> as pointed out by Dodji.
Jan> It may be compliant only to some hacky buggy parsers written
Jan> specifically for each MI command.
Vladimir> That's interesting statement -- are you saying all MI
Vladimir> frontends out there have "hacky buggy parsers"?
I think he is saying that the MI output of gdb, in this case, does not
conform to the MI grammar as given in the manual. So, if an
implementer tries to write an MI parser relying strictly on the
grammar, it will not work in this case. From one point of view this
means having a hacky parser...
Vladimir> This breakage is relatively new ;-)
Vladimir> Date: Sat May 12 04:08:24 2001 +0000
Yuck. I guess options for fixing this are pretty limited.
How about documenting, in the "GDB/MI Output Syntax" node, that
sometimes lists are formatted like tuples? That may, at least,
prevent future MI implementers from having to rediscover this problem
on their own.
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [patch] MI: breakpoint "script" is a LIST
2008-11-13 20:21 ` Vladimir Prus
2008-11-13 21:35 ` Tom Tromey
@ 2008-11-13 21:55 ` Marc Khouzam
2008-11-13 21:59 ` Jan Kratochvil
1 sibling, 1 reply; 8+ messages in thread
From: Marc Khouzam @ 2008-11-13 21:55 UTC (permalink / raw)
To: Vladimir Prus, Jan Kratochvil; +Cc: gdb-patches, Dodji Seketeli
> From: Vladimir Prus
> Sent: Thursday, November 13, 2008 10:34 AM
> But I'm sure all existing frontends handle this. I don't
> think I'm gonna test
> Eclipse (both CDI and DSF), and KDevelop (3.3 and 4), to make
> sure the proposed
> change does not break them. So, we probably get to wait till MI3.
What is this "script" thing? I can't find it in the documentation.
From a quick look to CDI and DSF, it is not being parsed.
Probably because it is not in the doc :-)
Marc
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] MI: breakpoint "script" is a LIST
2008-11-13 21:55 ` Marc Khouzam
@ 2008-11-13 21:59 ` Jan Kratochvil
0 siblings, 0 replies; 8+ messages in thread
From: Jan Kratochvil @ 2008-11-13 21:59 UTC (permalink / raw)
To: Marc Khouzam; +Cc: Vladimir Prus, gdb-patches, Dodji Seketeli
On Thu, 13 Nov 2008 19:33:22 +0100, Marc Khouzam wrote:
> > But I'm sure all existing frontends handle this. I don't think I'm gonna
> > test Eclipse (both CDI and DSF), and KDevelop (3.3 and 4), to make sure
> > the proposed change does not break them. So, we probably get to wait till
> > MI3.
>
> What is this "script" thing? I can't find it in the documentation.
> From a quick look to CDI and DSF, it is not being parsed.
> Probably because it is not in the doc :-)
GDB .tar.gz contains gdb/.gdbinit with:
b info_command
commands
silent
return
end
$ info '(gdb)Break Commands'
If you run in the gdb/ directory:
$ ./gdb --interpreter=mi2 ./gdb
(gdb)
-break-list
^done ...,script={"silent","return"},...
which should have been:
^done ...,script=["silent","return"],...
Regards,
Jan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] MI: breakpoint "script" is a LIST
2008-11-13 15:35 ` Vladimir Prus
2008-11-13 15:39 ` Jan Kratochvil
@ 2008-11-16 8:23 ` André Pönitz
1 sibling, 0 replies; 8+ messages in thread
From: André Pönitz @ 2008-11-16 8:23 UTC (permalink / raw)
To: gdb-patches
On Thursday 13 November 2008 14:12:54 Vladimir Prus wrote:
> Jan Kratochvil wrote:
>
> > Hi,
> >
> > Nemiver could not parse the MI2 output. The list of commands is a `list', not
> > a `tuple'.
>
> For how long this bug is here? Is the risk that existing frontend break higher than
> inconvenience to keep the code as is?
To be honest, I'd expect existing "frontend implementors" to be able to parse
"MI" output that's not conforming to the specs rather well as problems like
the one mentioned here are not exactly unheard of ;-}
So I am personally all for rectifying the situation and produce "proper MI2
output" from now on, just for the sake of coming generations...
Andre'
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-11-15 22:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-13 15:11 [patch] MI: breakpoint "script" is a LIST Jan Kratochvil
2008-11-13 15:35 ` Vladimir Prus
2008-11-13 15:39 ` Jan Kratochvil
2008-11-13 20:21 ` Vladimir Prus
2008-11-13 21:35 ` Tom Tromey
2008-11-13 21:55 ` Marc Khouzam
2008-11-13 21:59 ` Jan Kratochvil
2008-11-16 8:23 ` André Pönitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox