Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "André Pönitz" <andre.poenitz@nokia.com>
To: gdb-patches@sourceware.org
Subject: Re: [MI RFC] entryval: MI access to entry values
Date: Wed, 14 Sep 2011 10:45:00 -0000	[thread overview]
Message-ID: <201109141225.56344.andre.poenitz@nokia.com> (raw)
In-Reply-To: <20110914091233.GA1328@host1.jankratochvil.net>

On Wednesday 14 September 2011 11:12:33 ext Jan Kratochvil wrote:
> On Wed, 14 Sep 2011 10:49:51 +0200, André Pönitz wrote:
> > In that generality I am afraid I disagree. MI has the ability to transfer data
> > in a structured way, there's no reason to pass the "@entry" marker in-channel
> > in the "name" field, and there's no reason to assume that a frontend would
> > want to present the entry value to the user as a "normal" value, just with a 
> > fancy name.
> > 
> > This is certainly an acceptable way to do it, but why should that needlessly
> > be steered by gdb?
> > 
> > From my point of view, something like 
> > 
> >    ^done,variables=[{name="lost",arg="1",value="<optimized out>",
> >         atentry="5"},{name="born",arg="1",value="10"}]
> 
> "atentry" looks exactly like my "entry_value" proposed as variant (2) in (and
> implemented in a local patch branch):
> 	[MI RFC] entryval: MI access to entry values
> 	http://sourceware.org/ml/gdb-patches/2011-09/msg00036.html
> 
> 
> > would be more in the "spirit" of MI,
> 
> The problem is the "spirit" of MI is not there.  

I was assuming it at least partially was, and when there are two possible
ways to add new stuff, there could be a bias to the one that's more
"in the spirit".

> There should be already instead of:
> 	{name="lost",arg="1",value="<optimized out>"}
> rather:
> 	{name="lost",arg="1",optimized_out="1"}

That's actually what I'd prefer, too. No magic in-channel strings that need
to be recognized and handled/translated separately, but different kinds
of data transferred in different channels.

I actually had already a stanza like that in the previous mail but removed
it before sending, as I did not want to trigger a compatibilty discussion.

> and for value retrieval error messages
> 	../gdb -nx -i=mi gdb.dwarf2/dw2-param-error
> 	-break-insert f
> 	-exec-run
> 	*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",
> time before)
> 
> So exactly in this spirit I chose rather more the front ends simplicity than
> hypothetical MI protocol ideals.

After giving some more thought I guess you and Volodya are indeed right.

Adding new ad-hoc data mangling is probably really the best for all existing 
frontends. For the "we just dump gdb output into a treeview"-kind of FE using 
whatever looks ok on the commandline is fine in the view, and the few others 
have to massage the output anyway. Adding yet another five lines of code to
recognize and modify the new entries is certainly less effort for the respective
maintainers than pondering the spiritual dimension of a protocol first.

 > But sure I would rather follow the design goals of the MI maintainer.

Absolutely.

Regards,
Andre'


  reply	other threads:[~2011-09-14 10:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 20:21 [RFC 06/12] entryval: Display @entry parameters in bt full Jan Kratochvil
2011-07-18 22:24 ` Daniel Jacobowitz
2011-07-19 10:48   ` Eli Zaretskii
2011-07-19 10:55     ` Jan Kratochvil
2011-07-19 11:52       ` Eli Zaretskii
2011-07-19 12:17         ` Jakub Jelinek
2011-07-19 16:46           ` Eli Zaretskii
2011-07-19 17:22             ` Jakub Jelinek
2011-08-03 17:27           ` Jan Kratochvil
2011-08-03 17:53             ` Jan Kratochvil
2011-08-03 18:13               ` Jan Kratochvil
2011-08-03 18:36             ` Tom Tromey
2011-08-03 19:43   ` Jan Kratochvil
2011-09-02 17:08   ` [MI RFC] entryval: MI access to entry values [Re: [RFC 06/12] entryval: Display @entry parameters in bt full] Jan Kratochvil
2011-09-13 21:35     ` [MI RFC] entryval: MI access to entry values Jan Kratochvil
2011-09-14  8:50       ` Vladimir Prus
2011-09-14  9:13         ` André Pönitz
2011-09-14  9:20           ` Jan Kratochvil
2011-09-14 10:45             ` André Pönitz [this message]
2011-10-03 17:00               ` Tom Tromey
2011-10-03 16:57     ` [MI RFC] entryval: MI access to entry values [Re: [RFC 06/12] entryval: Display @entry parameters in bt full] Tom Tromey
2011-10-03 17:05       ` Vladimir Prus
2011-10-03 17:44         ` Jan Kratochvil
2011-10-03 18:14           ` Joel Brobecker
2011-10-10 16:09           ` André Pönitz
2011-07-19 10:57 ` [RFC 06/12] entryval: Display @entry parameters in bt full Eli Zaretskii
2011-07-19 16:21 ` Tom Tromey

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=201109141225.56344.andre.poenitz@nokia.com \
    --to=andre.poenitz@nokia.com \
    --cc=gdb-patches@sourceware.org \
    /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