Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb@sources.redhat.com
Subject: Re: -var-show-attributes response syntax
Date: Fri, 10 Nov 2006 21:06:00 -0000	[thread overview]
Message-ID: <200611110006.06389.vladimir@codesourcery.com> (raw)
In-Reply-To: <17748.58492.703620.633216@kahikatea.snap.net.nz>

On Friday 10 November 2006 23:43, Nick Roberts wrote:
>  > > I see no advantage in restricting the output but I've not used this
>  > > command. How do you want to use it?
>  >
>  > I want to add a new attribute there, actually, and I'd prefer to use
>  > more regular name=value syntax.
>
> That's still a bit vague.
>
> You say:
>
>    How about changing the above to "editable=0/1"?
>
> Are you suggesting
>
>   ^done,attr="editable=0",  ^done,attr="editable=1"
>
> or
>
>   ^done,editable="0",  ^done,editable="1"

The latter.

> Either case still requires the front end to do some string
> manipulation/comparison. 

I don't follow -- every syntax requires some string manipulation. In 
fact, "name=value" syntax is used in many other places so frontend already 
knows how to parse it.

> Can you state precisely how you would change the 
> format and precisely what the benefit would be?

The benefit is consistency with other MI response.

>  > >  >                                                 This sounds like
>  > >  >                                                 breaking
>  > >  > backward compatibility, but probably is not, because "editable" is
>  > >  > broken itself:
>  > >  >
>  > >  >      -var-create C * 1+1
>  > >  >      ^done,name="C",numchild="0",type="long"
>  > >  >      (gdb)
>  > >  >      -var-show-attributes C
>  > >  >      ^done,attr="editable"
>  > >  >      (gdb)
>  > >
>  > > Why do you think this is broken?
>  >
>  > Because you can't assign the value to "1+1" -- it's not lvalue. And
>  > trying to do so will result in error from gdb.
>
> I see, I missed that.  In fact it my example was also wrong too, constants
> in C appear to be editable.  Noneditables appear to be arrays, structures,
> unions etc.  However I think this a separate issue to changing the syntax.

I meant to say that this command does not seem to have useful semantic, so 
backward compatibility is not that important with it.

- Volodya


  reply	other threads:[~2006-11-10 21:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10 13:55 Vladimir Prus
2006-11-10 16:34 ` Nick Roberts
2006-11-10 16:53   ` Vladimir Prus
2006-11-10 20:47     ` Nick Roberts
2006-11-10 21:06       ` Vladimir Prus [this message]
2006-11-10 21:23         ` Nick Roberts
2006-11-10 17:02   ` Andreas Schwab
2006-11-10 21:46   ` Eli Zaretskii
2006-11-10 21:54     ` Nick Roberts
2006-11-10 23:10       ` Eli Zaretskii
2006-11-10 23:33         ` Nick Roberts
2006-11-11  9:26           ` Eli Zaretskii
2006-11-11 10:03             ` Nick Roberts

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=200611110006.06389.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=gdb@sources.redhat.com \
    --cc=nickrob@snap.net.nz \
    /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