From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18906 invoked by alias); 25 Mar 2011 15:48:32 -0000 Received: (qmail 18830 invoked by uid 22791); 25 Mar 2011 15:48:25 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Mar 2011 15:48:18 +0000 Received: from md1.u-strasbg.fr (md1.u-strasbg.fr [IPv6:2001:660:2402::186]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p2PFmCf1004035 ; Fri, 25 Mar 2011 16:48:12 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms5.u-strasbg.fr [130.79.204.14]) by md1.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2PFmBFJ091891 ; Fri, 25 Mar 2011 16:48:12 +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 p2PFmAUs017296 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Fri, 25 Mar 2011 16:48:11 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Nick Clifton'" Cc: "'Kai Tietz'" , "'H.J. Lu'" , "'Binutils'" References: <-8460070221060995487@unknownmsgid> <-6930711422310680743@unknownmsgid> <4D63D49D.90101@redhat.com> <-2339605939192327273@unknownmsgid> <-3886800211494155692@unknownmsgid> <1561346207520594884@unknownmsgid> <5095785081977025060@unknownmsgid> <00d601cbd4f0$c911af10$5b350d30$@muller@ics-cnrs.unistra.fr> <4D8CB1F5.6020108@redhat.com> In-Reply-To: <4D8CB1F5.6020108@redhat.com> Subject: [RFA] Supplemtal patch for use only dwarf_vma types in dwarf code Date: Fri, 25 Mar 2011 15:48:00 -0000 Message-ID: <000a01cbeb04$0c0e6e60$242b4b20$@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-03/txt/msg00445.txt.bz2 > -----Message d'origine----- > De=A0: binutils-owner@sourceware.org [mailto:binutils-owner@sourceware.or= g] De > la part de Nick Clifton > Envoy=E9=A0: vendredi 25 mars 2011 16:17 > =C0=A0: Pierre Muller > Cc=A0: 'Kai Tietz'; 'H.J. Lu'; 'Binutils' > Objet=A0: Re: [RFC-v2] Use only dwarf_vma types in dwarf code >=20 > Hi Pierre, >=20 > [only a month late...] > Approved and applied - along with a little tidying up. Thanks, I have a few remaining changes to propose: always in the spirit of the previous RFC, use dwarf_vma whenever we are not sure that a 'long' (which can be shorter than a pointer in byte size=20 on mingw64 system) is enough. I have no real idea if those three cases are=20 really variables that can reach up to values that do not fit in 4-bytes but it can not really hurt, can it? Pierre Muller ChangeLog entry: 2011-03-25 Pierre Muller * dwarf.c (decode_location_expression): Use dwarf_vmatoa function to display DW_OP_addr OP. (process_debug_info): Use dwarf_vma type for local variables length and type_offset. Index: dwarf.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/binutils/dwarf.c,v retrieving revision 1.86 diff -u -p -r1.86 dwarf.c --- dwarf.c 25 Mar 2011 15:15:52 -0000 1.86 +++ dwarf.c 25 Mar 2011 15:39:49 -0000 @@ -674,8 +674,8 @@ decode_location_expression (unsigned cha switch (op) { case DW_OP_addr: - printf ("DW_OP_addr: %lx", - (unsigned long) byte_get (data, pointer_size)); + printf ("DW_OP_addr: %s", + dwarf_vmatoa("x", byte_get (data, pointer_size))); data +=3D pointer_size; break; case DW_OP_deref: @@ -1926,7 +1926,7 @@ process_debug_info (struct dwarf_section && num_debug_info_entries =3D=3D 0 && ! do_types) { - unsigned long length; + dwarf_vma length; /* First scan the section to get the number of comp units. */ for (section_begin =3D start, num_units =3D 0; section_begin < end; @@ -2002,7 +2002,7 @@ process_debug_info (struct dwarf_section int offset_size; int initial_length_size; unsigned char signature[8] =3D { 0 }; - unsigned long type_offset =3D 0; + dwarf_vma type_offset =3D 0; hdrptr =3D start; @@ -2084,7 +2084,8 @@ process_debug_info (struct dwarf_section for (i =3D 0; i < 8; i++) printf ("%02x", signature[i]); printf ("\n"); - printf (_(" Type Offset: 0x%lx\n"), type_offset); + printf (_(" Type Offset: 0x%s\n"), + dwarf_vmatoa ("x", type_offset)); } }