From: Pedro Alves <alves.ped@gmail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: enum pretty-printing support
Date: Tue, 10 Jan 2012 20:28:00 -0000 [thread overview]
Message-ID: <4F0C9EF1.7090602@gmail.com> (raw)
In-Reply-To: <m3r4z7gwow.fsf@fleche.redhat.com>
On 01/10/2012 07:54 PM, Tom Tromey wrote:
> I'd appreciate comments on this patch.
>
> This adds a new helper class to gdb.printing to handle printing of enum
> values which are or'd together. E.g.:
>
> print (enum flag_enum) (FLAG_1 | FLAG_3)
> $8 = 0x5 [FLAG_1 | FLAG_3]
I think this is great.
On 01/10/2012 07:54 PM, Tom Tromey wrote:
> +@item EnumerationPrinter (@var{name})
> +A pretty-printer which handles printing of @code{enum} values. Unlike
> +@value{GDBN}'s built-in @code{enum} printing, this printer handles the
> +case where enumerators are or'd together to create a value.
> +@var{name} is the name of the printer and also the name of the
> +@code{enum} type to look up.
Is the intention to have this printer do more than work
with flag enums? Otherwise, I'd suggest naming it FlagEnumerationPrinter
(or some such).
--
Pedro Alves
next prev parent reply other threads:[~2012-01-10 20:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 20:26 Tom Tromey
2012-01-10 20:28 ` Pedro Alves [this message]
2012-01-11 16:45 ` Tom Tromey
2012-01-10 21:19 ` Eli Zaretskii
2012-01-10 21:23 ` Jan Kratochvil
2012-01-10 22:00 ` Tom Tromey
2012-01-10 22:19 ` Tom Tromey
2012-01-10 23:52 ` Jan Kratochvil
2012-01-11 16:46 ` Tom Tromey
2012-01-11 21:03 ` Jan Kratochvil
2012-01-11 21:25 ` Tom Tromey
2012-01-16 18:44 ` Tom Tromey
2012-01-16 18:45 ` Eli Zaretskii
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=4F0C9EF1.7090602@gmail.com \
--to=alves.ped@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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