From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31810 invoked by alias); 25 Feb 2011 13:31:23 -0000 Received: (qmail 31800 invoked by uid 22791); 25 Feb 2011 13:31:22 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_50,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Feb 2011 13:31:17 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p1PDVCM5031190 ; Fri, 25 Feb 2011 14:31:12 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms7.u-strasbg.fr [130.79.204.16]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p1PDVBfo010320 ; Fri, 25 Feb 2011 14:31:11 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p1PDVBDQ074296 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Fri, 25 Feb 2011 14:31:11 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Kai Tietz'" Cc: "'Binutils'" References: <-8460070221060995487@unknownmsgid> <-6930711422310680743@unknownmsgid> <4D63D49D.90101@redhat.com> <-2339605939192327273@unknownmsgid> <-3886800211494155692@unknownmsgid> <1561346207520594884@unknownmsgid> <5095785081977025060@unknownmsgid> In-Reply-To: Subject: RE: [RFC] Use only dwarf_vma types in dwarf code (was RE: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header) Date: Fri, 25 Feb 2011 13:31:00 -0000 Message-ID: <00d301cbd4f0$44540e30$ccfc2a90$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00309.txt.bz2 > > + =A0 =A0if (byte_size > 0 && byte_size <=3D8) >=20 > Whitespace issue. should be ... && byte_size <=3D 8) Indeed, I still make silly formatting errors, sorry. =20 > > + =A0 =A0 =A0offset =3D 16 - 2 * byte_size; > > + =A0 =A0else > > + =A0 =A0 =A0error("Wrong size in print_dwarf_vma"); > > + > > + =A0fputs (buff + offset, stdout); > > =A0} > > > > +#if __STDC_VERSION__ >=3D 199901L || (defined(__GNUC__) && __GNUC__ >= =3D > 2) > > +#ifndef __MSVCRT__ > Please don't use here __MSVCRT__, instead use > #if !defined (__MSVCRT__) && !defined (__MINGW32__) >=20 > As __MSVCRT__ is just declared by VC, and __MINGW32__ for gcc. IMHO > __MINGW32__ should be the only guard necessary here, as VC neither > defines __STDC_VERSION__ > 199901L and it doesn't defines __GNUC__, > too. This is just a copy of what is already present=20 in dwarf_print_vma function a few lines above in the patched=20 file, so that we should fixed both occurrences=20 =20 > > +#define =A0DWARF_VMA_FMT "ll" > > +#else > > +#define =A0DWARF_VMA_FMT "I64" > > +#endif > > +#else > > +#define =A0DWARF_VMA_FMT "l" > > +#endif > > + >=20 > > -bfd_vma > > +static char * > > +dwarf_svmatoa (const char *fmtch, dwarf_signed_vma value) >=20 > Why you are using here dwarf_svmatoa? It should be dwarf_vmatoa > As the formatter is specified here as argument and in dwarf_vmatoa the > formatter-buffer is constructed, I see no point in adding a signed > variant. I was worried about possible signed values in a signed type that is shorter than dwarf_vma... Suppose that you have a 32-bit integer that has a value of -5, but this is probably due to my lack of knowledge of C integer signed<->unsigned conversion rules... I made a short check and it seems that indeed this is not necessary... =20 > This is just a first glance, and well, I can't approve this patch. But > in general I appreachiate your modification. Thanks for your appreciation! I will send a modified version of the patch shortly. Pierre