From: Chris Moller <cmoller@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: pr 11067 patch
Date: Fri, 19 Feb 2010 19:52:00 -0000 [thread overview]
Message-ID: <4B7EEBC8.7060206@redhat.com> (raw)
In-Reply-To: <20100219185004.GA23504@host0.dyn.jankratochvil.net>
On 02/19/10 13:50, Jan Kratochvil wrote:
> On Fri, 19 Feb 2010 15:53:45 +0100, Chris Moller wrote:
>
>> The problem is that I don't know any way to change the enum
>> formatting for CLI but leave it alone for MI-.
>>
> ...
>
>> some way to distinguish between running under CLI vs. MI if that's the right
>> thing to do.
>>
>
> After I wrote the patch below according to Tom Tromey the Python pretty
> printing applies even to the MI protocol values, therefore IMO it should also
> apply to this new enum printing which is also some form of pretty printing.
>
> Therefore my MI / CLI suggestion has been already rejected by the Python
> pretty printing precedence and the patch below should be dropped.
>
How about this: The existing patch contains a test
if (options->summary || recurse != 0)
fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
else {
/* new formatting stuff */
}
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?
Chris
next prev parent reply other threads:[~2010-02-19 19:52 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 [this message]
2010-02-19 20:11 ` Jan Kratochvil
2010-02-22 9:22 ` Vladimir Prus
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=4B7EEBC8.7060206@redhat.com \
--to=cmoller@redhat.com \
--cc=brobecker@adacore.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