public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH/RFC] sim: common: add PRI printf defines
Date: Mon, 22 Jun 2015 22:29:00 -0000	[thread overview]
Message-ID: <CADPb22Tr-=zZb=d0bccRTgythwJaCc73ZV7=oiJD_DChqLPdbA@mail.gmail.com> (raw)
In-Reply-To: <1434909729-6766-1-git-send-email-vapier@gentoo.org>

On Sun, Jun 21, 2015 at 1:02 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> Keeping track of the right printf formats for the various types can be
> a pretty big hassle, especially in common code which has to support a
> variety of bitsizes.  Take a page from the existing standards and add
> a set of PRI macros which hide the details in a common header.
> ---
>  sim/common/ChangeLog   |  8 ++++++++
>  sim/common/sim-types.h | 21 +++++++++++++++++++++
>  2 files changed, 29 insertions(+)
>
> diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
> index 722ad98..db67a1d 100644
> --- a/sim/common/ChangeLog
> +++ b/sim/common/ChangeLog
> @@ -1,5 +1,13 @@
>  2015-06-21  Mike Frysinger  <vapier@gentoo.org>
>
> +       * sim-types.h (_SIM_PRI_TB, __SIM_PRI_TB): New helper macros for
> +       expanding target bitsizes into standard PRI formats.
> +       (PRI_TW, PRIiTW, PRIxTW): New PRI target word defines.
> +       (PRI_TA, PRIiTA, PRIxTA): New PRI target address defines.
> +       (PRI_TF, PRIiTF, PRIxTF): New PRI target floating point defines.
> +

It's not that big a deal, but _[_A-Z]+ is reserved for the compiler.

  reply	other threads:[~2015-06-22 22:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-21 18:02 Mike Frysinger
2015-06-22 22:29 ` Doug Evans [this message]
2015-06-22 23:50   ` Doug Evans
2015-06-23 16:21   ` Mike Frysinger
2015-06-23 16:28     ` Doug Evans
2015-06-23 19:58       ` Mike Frysinger
2015-06-23 20:07         ` Doug Evans
2015-11-22  6:40 ` [PATCH] sim: common: add PRI printf defines [committed] Mike Frysinger

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='CADPb22Tr-=zZb=d0bccRTgythwJaCc73ZV7=oiJD_DChqLPdbA@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).