From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add printf format specifier for printing enumerator
Date: Fri, 05 Feb 2016 15:03:00 -0000 [thread overview]
Message-ID: <c32c3fc895ed2dd7e84353a21e99cddc@simark.ca> (raw)
In-Reply-To: <56B4B6DC.1020508@redhat.com>
On 2016-02-05 09:51, Pedro Alves wrote:
> Did you consider a convenience function to convert a value
> to string, instead? Then you'd write:
>
> (gdb) printf "Visiting node of type %s\n", $_as_string(node)
>
> And maybe do other things with it.
>
> Thanks,
> Pedro Alves
No, but I think it's a good idea.
Do you see _as_string as applicable to any type, a bit like str() in
Python, or just to some specific types that we chose and make sense
(like enum)?
next prev parent reply other threads:[~2016-02-05 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 14:18 Simon Marchi
2016-02-05 14:51 ` Pedro Alves
2016-02-05 15:03 ` Simon Marchi [this message]
2016-02-05 15:08 ` Pedro Alves
2016-02-05 14:53 ` Eli Zaretskii
2016-02-05 19:58 ` Simon Marchi
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=c32c3fc895ed2dd7e84353a21e99cddc@simark.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=palves@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