From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69680 invoked by alias); 22 Jun 2015 23:50:28 -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 69664 invoked by uid 89); 22 Jun 2015 23:50:27 -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-ob0-f180.google.com Received: from mail-ob0-f180.google.com (HELO mail-ob0-f180.google.com) (209.85.214.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 22 Jun 2015 23:50:26 +0000 Received: by obbkm3 with SMTP id km3so30760230obb.1 for ; Mon, 22 Jun 2015 16:50:24 -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=CwiNxooNQSY1S9E+gfSemsXJWDkAd2/n03IF9GzKBKw=; b=fjHGrVtE6JBSoPeplIWNM4BX2hlK0+zx+IFxGioo9MoyPh6LjCMttUpMhn5kTpzmaH ItJfxBDTQlIdsdIQfZv5c4ZyRJXjE+fS0O7QB+Wre+rZV83vtjSyzM5bEISDAneiNbZN vf49cfd99FEmUtbvKkaciSCPXlZ9H8oEvYu0DjpiKbQqW1YvlMdSgWRsE97gDDAe22Ln E6s73XCF/WqsL9w2fieHLCJrPT86a502cJsMU02+Z97fiD9Z5QzvIQj1n6twZnC0O2Ll 3UyUL3ZlmVuln74NgvLd42KZeuWv1VI1kN/s1TgTRbpKprsRVbnjwsut2rvtcO/pr7GF H9Jw== X-Gm-Message-State: ALoCoQmH4t95kFagxC2y/IzCxXOMy/gxEOr4mOF3g8GW0jhiioIA6PBQW4wTor3TsneY9rRUFoTy MIME-Version: 1.0 X-Received: by 10.182.22.11 with SMTP id z11mr26669120obe.77.1435017024437; Mon, 22 Jun 2015 16:50:24 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Mon, 22 Jun 2015 16:50:24 -0700 (PDT) In-Reply-To: References: <1434909729-6766-1-git-send-email-vapier@gentoo.org> Date: Mon, 22 Jun 2015 23:50: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/msg00452.txt.bz2 On Mon, Jun 22, 2015 at 5:29 PM, Doug Evans wrote: > 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. Hmmm. I'm sure most people know what I meant, but to be precise, that's _[_A-Z].* Hope I've got that right now.