From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58760 invoked by alias); 22 Jun 2015 22:29:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 58741 invoked by uid 89); 22 Jun 2015 22:29:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f45.google.com Received: from mail-oi0-f45.google.com (HELO mail-oi0-f45.google.com) (209.85.218.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 22 Jun 2015 22:29:56 +0000 Received: by oigb199 with SMTP id b199so90681272oig.3 for ; Mon, 22 Jun 2015 15:29:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=wtWasQOPWNNlyr0voeo2OI9yT9Fy8IdnFtr+3UzlITI=; b=bp2IXO5i/jBxllD06PW4b3aODkc0rxR4sfFgji3TTFXaDaThvohO8TxExaTzcl7bJ6 WcsYnJX1BrE/VBXuB6UOl8JPpfSRkwar0uylKhSNfLO9DBJc4GE+l8w/g6jYfL+/3576 VRWA/FawzQHsBDjFFZ9bsNbV4knqJaTvsveEP0zSJy/2KxMk4Rsyr1nAW1NahoSSCSXr SNs2a+AhUB/00CDAWID7rsS07x6RRnxKhoY2NW2GlZ981zlFvDvxqVHr3OW9piUgdng4 cekXXTugGeXn0xK8KfDNWWQs7Mqm0jk4Rgf4/6Luf5vBLO9QaiRGTqQKvGSw5D1DKD1Z luBw== X-Gm-Message-State: ALoCoQlnf8RSHAecb3Rz1eMvS7bpSP9QeYyLyTxvjQwZouzbM3mBXT/DlHhDEne0RGvcO3szL3lA MIME-Version: 1.0 X-Received: by 10.202.177.68 with SMTP id a65mr25653144oif.64.1435012194302; Mon, 22 Jun 2015 15:29:54 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Mon, 22 Jun 2015 15:29:54 -0700 (PDT) In-Reply-To: <1434909729-6766-1-git-send-email-vapier@gentoo.org> References: <1434909729-6766-1-git-send-email-vapier@gentoo.org> Date: Mon, 22 Jun 2015 22:29:00 -0000 Message-ID: Subject: Re: [PATCH/RFC] sim: common: add PRI printf defines From: Doug Evans To: Mike Frysinger Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00450.txt.bz2 On Sun, Jun 21, 2015 at 1:02 PM, Mike Frysinger 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 > > + * 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.