Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Konstantin Karganov <kostik@ispras.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb@sources.redhat.com
Subject: Re[2]: complete GDB MI specification
Date: Tue, 07 Dec 2004 18:42:00 -0000	[thread overview]
Message-ID: <429477215.20041207214436@ispras.ru> (raw)
In-Reply-To: <01c4dbd6$Blat.v2.2.2$0b225460@zahav.net.il>

Hello Eli,

>> I'm going to implement a GUI debugger over GDB and need a complete
>> description of MI commands and their result formats. Where can I find
>> it?
> In general, in the manual.
"Note that the current ``grammar'' in the MI documentation, at least as
far as I'm concerned, is meant to be an informal introduction of the
MI syntax, not a rigurous grammar description." (ñ) Eli Zaretskii :)

And this is the problem! MI is supposed to be a program-to-program
interface and thus needs a complete formal description (at least, to be
sure that all possible output is handled correctly).

> There was a long series of discussions about a month ago, either here
> or on gdb-patches.  Search for "MI" in the archives, and you will find
> a patch with a formal parser grammar for the MI interface.
Looked through several (a lot, actually!) discussions and didn't found
what I need. There were several syntax patches and grammar
transformations (mostly by Bob Rossi and Michael Chastain), but all of
them concern general syntax of MI output but don't go into details and
the output semantics.

> Please report all such unclear cases, and I will try to fix them.
Look at the structure of MI description: there are the command syntax
with explanation and the example of the output. Just an example
instead of complete output specification. Yes, it fits the general case
of " var=value (,var=value)* " syntax but the actual semantics and
possible value pairs are not specified. That is for all commands.

Another practical example: displaying the value of the array variable.
It turns out, that the value of the array fits the "c-string" grammar
terminal symbol. But the inner structure of this string is not
specified. I expected that there should be a list of values of the
array length, but it turned out that there is at least one
optimization in the form of "X <repeated N times>". What other tricks
are possible in value string? :)

Anyway, it looks weird if no rigorous specification of MI output
exist. IMHO it means (if it is) that no one uses MI in real systems
(except the tests and demo purposes)...


-- 
Best regards,
 Konstantin 




  reply	other threads:[~2004-12-07 18:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-29 14:06 (a?)synchronous stepping commands in gdb MI, a week later Konstantin Karganov
2004-11-29 16:08 ` Andrew Cagney
2004-11-29 19:59   ` Re[2]: " Konstantin Karganov
2004-12-06 16:19     ` complete GDB MI specification Konstantin Karganov
2004-12-06 20:55       ` Eli Zaretskii
2004-12-07 18:42         ` Konstantin Karganov [this message]
2004-12-07 18:58           ` Bob Rossi
2004-12-07 19:45             ` Eli Zaretskii
2004-12-07 19:50               ` Bob Rossi
2004-12-07 21:47                 ` Eli Zaretskii
2004-12-07 19:42           ` Eli Zaretskii
2004-12-08 16:42             ` Re[2]: " Konstantin Karganov
2004-12-08 16:53               ` Bob Rossi
2004-12-08 17:45                 ` Re[2]: " Konstantin Karganov
2004-12-08 18:30                   ` Bob Rossi
2004-12-08 18:34                     ` Bob Rossi
2004-12-08 18:39                     ` Re[2]: " Konstantin Karganov
2004-12-08 17:01               ` Dave Korn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=429477215.20041207214436@ispras.ru \
    --to=kostik@ispras.ru \
    --cc=eliz@gnu.org \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox