Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	 gdb-patches@sourceware.org,  Chris Moller <cmoller@redhat.com>
Subject: Re: pr 11067 patch
Date: Mon, 22 Feb 2010 09:22:00 -0000	[thread overview]
Message-ID: <201002221222.46794.vladimir@codesourcery.com> (raw)
In-Reply-To: <20100219201105.GA30692@host0.dyn.jankratochvil.net>

On Friday 19 February 2010 23:11:05 Jan Kratochvil wrote:

> On Fri, 19 Feb 2010 20:51:36 +0100, Chris Moller wrote:
> > That limited the format change to unsummarised top-level "p <enum
> > thingy>" circumstances.  If I make that test
> > 
> >      if (options->summary || recurse != 0 ||
> >                 ui_out_is_mi_like_p (interp_ui_out
> >    (top_level_interpreter ())))
> > 
> > i.e., checking if the print is to an MI whatever-it-is, the MI tests
> > that failed under the original patch (mi-var-display and
> > mi2-var-display) run okay as they originally were, which suggests to
> > me that MI will go on getting enums formatted the way it expects
> > them.  Will that work?
> 
> I would prefer the value_print_options way but rather:
> 
> 
> Vladimir, if CLI start print instead of
> 	(gdb) p enum_var
> 	$1 = enumerator2
> now:
> 	(gdb) p enum_var
> 	$1 = enumerator2 = (enum uenum) 2
> 
> should MI also print this "pretty printed" enum syntax or should it stick with
> the original one? Therefore should be made this change?
> 
>  mi_gdb_test "-var-evaluate-expression anone" \
> -       "\\^done,value=\"A\"" \
> +       "\\^done,value=\"A = \\(enum <anonymous>\\)0\"" \
>         "eval variable anone"

Hi Jan,

I am not 100% sure but I am concerned about the above output having 'enum uenum' --
which is essentially the type of the variable. And MI already reports type separately.
I recall I've made some changed before to specifically stop GDB from including the 
type of variable inside value field when the type is function. So, I suggest that
this output is not included for MI. It might be OK to output a separate
field, e.g. "enum_integer_value" -- with the integer value as printed above -- but
I don't have a feeling if frontends really need that at this point.

Thanks,

-- 
Vladimir Prus
CodeSourcery
vladimir@codesourcery.com
(650) 331-3385 x722


  reply	other threads:[~2010-02-22  9:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11  2:55 Chris Moller
2010-02-11  9:30 ` Joel Brobecker
2010-02-11 14:19   ` Chris Moller
2010-02-11 19:50   ` Tom Tromey
2010-02-12  4:11     ` Joel Brobecker
2010-02-12 15:48       ` Chris Moller
2010-02-13 11:49         ` Jan Kratochvil
2010-02-13 18:56           ` Chris Moller
2010-02-19 14:28             ` Joel Brobecker
2010-02-19 14:36               ` Jan Kratochvil
2010-02-19 14:45                 ` Joel Brobecker
2010-02-19 14:54                 ` Chris Moller
2010-02-19 18:50                   ` Jan Kratochvil
2010-02-19 19:52                     ` Chris Moller
2010-02-19 20:11                       ` Jan Kratochvil
2010-02-22  9:22                         ` Vladimir Prus [this message]
2010-02-23 23:55                         ` Tom Tromey
2010-03-11 15:44                           ` pr 11067 patch resurrected from the dead Chris Moller

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=201002221222.46794.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=cmoller@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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