Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: GDB Discussion <gdb@sources.redhat.com>
Subject: Re: [5.1/mi] SYNTAX CHANGE? - List ``[ ]'' vs ``{  }''
Date: Wed, 21 Mar 2001 15:59:00 -0000	[thread overview]
Message-ID: <3AA3C38C.5F326859@redhat.com> (raw)
In-Reply-To: <3AA2F6D0.2691743C@cygnus.com>

Andrew,

I strongly object to the use of "[]".  This will add another special
character and make things more difficult.

The output like {"1","2","4"} can easily be considered as a list value
by the parser.  The parser will need to have some description of the
expected result, even if in a lose way so it should still be able to
identify that this is a list value and not a list of values.

The {bp="1",bp="2",bp="4"} result should not be generated.  As we
currently have to share the output producing code with the CLI, we end
up generating things like this.  But I guess we should fix the source of
such anachronisms instead of changing the output format because of it.

It may be better to leave the output as is for 5.1 and see what the
parser implementers say.  If they complain, we can discuss the best
alternative and patch both the branch and the trunk.  As you said, it is
a simple change to the mi-out code.

Fernando



Andrew Cagney wrote:
> 
> Hello,
> 
> The MI documentation currently contains:
> 
> GDB/MI Draft Changes to Output Syntax
> =====================================
> 
>    One problem identified in the existing GDB/MI output syntax was the
> difficulty in differentiating between a tuple such as:
> 
>      {number="1",type="breakpoint",disp="keep",enabled="y"}
> 
>    where each value has a unique label, and a list such as:
> 
>      {"1","2","4"}
>      {bp="1",bp="2",bp="4"}
> 
>    where values are un-labeled or the label is duplicated.
> 
> [....]
> 
> `RESULT ==>'
>      STRING "=" VALUE
> 
> `VALUE ==>'
>      C-STRING `|' TUPPLE `|' LIST
> 
> `TUPPLE ==>'
>      "{}" `|' "{" RESULT { "," RESULT } "}"
> 
> `LIST ==>'
>      "`[]'" `|' "`['" VALUE { "," VALUE } "`]'"
> 
> --
> 
> Which would change the above examples to:
> 
>      ["1","2","4"]
>      [bp="1",bp="2",bp="4"]
> 
> This should look familar if you've used erlang or maranda(?).
> 
> I'd like to propose that this change be adopted before MI is enabled
> (before 5.1 is released).  The code change is trivial.
> 
> My concern is with people that might currently be using MI.  While the
> opening section reads:
> 
>      Note that GDB/MI is still under construction, so some of the
>   features described below are incomplete and subject to change.
> 
> I'm very very open to feedback.  Given that MI currently involves a
> custom GDB, I suspect that no one is using it in a production
> environment (Apple?).
> 
> --
> 
> Should my proposal to ``correctly fix'' the problem fail, I'll fix the
> problem by deleting that section of the MI spec :-)
> 
> I might also add a note warning implementors of the ambigious syntax :-)
> 
> enjoy,
>         Andrew

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


  reply	other threads:[~2001-03-21 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21 15:59 Andrew Cagney
2001-03-21 15:59 ` Fernando Nasser [this message]
2001-03-21 15:59   ` Andrew Cagney
     [not found] <983824932.9190.ezmlm@sources.redhat.com>
2001-03-21 15:59 ` Jim Ingham
2001-03-21 15:59 ` Jim Ingham
2001-03-21 15:59   ` Fernando Nasser

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=3AA3C38C.5F326859@redhat.com \
    --to=fnasser@redhat.com \
    --cc=ac131313@cygnus.com \
    --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