From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12943 invoked by alias); 21 Feb 2011 13:10:15 -0000 Received: (qmail 12836 invoked by uid 22791); 21 Feb 2011 13:10:14 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,TW_BJ X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Feb 2011 13:10:11 +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 p1LD9Rwe050247 ; Mon, 21 Feb 2011 14:09:27 +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 md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p1LD9QvB083552 ; Mon, 21 Feb 2011 14:09:26 +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 p1LD9OsR032540 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Mon, 21 Feb 2011 14:09:25 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Kai Tietz'" , "'GCC Patches'" , "'Binutils'" , "'gdb'" Cc: "'Jakub Jelinek'" , "'Joel Brobecker'" References: In-Reply-To: Subject: RE: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header Date: Mon, 21 Feb 2011 13:10:00 -0000 Message-ID: <009c01cbd1c8$907481d0$b15d8570$@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/msg00253.txt.bz2 I was just wondering about all those _("Text with some 0x" BFD_VMA_FMT "x\n"), adr); constructs: If we do the translations on a 64-bit unix machine we will have translations for "Text with some 0xllx\n"=20 but a mingw 64-bit executable will look for "Text with some 0xI64x\n" while a 32-bit system will look for "Text with some 0xlx\n" and in both cases, no translation will be found. Wouldn't it be better to use something similar=20 to paddress in src/gdb/utils.c let's call it dwarf_vma function, so that we have: _("Text with some 0x%s\n"), dwarf_vma (adr)); with a unique "Text with some 0x%s\n" string that gets internationalized correctly? Pierre Muller GDB pascal language maintainer > -----Message d'origine----- > De=A0: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la > part de Kai Tietz > Envoy=E9=A0: jeudi 17 f=E9vrier 2011 15:22 > =C0=A0: GCC Patches; Binutils; gdb > Cc=A0: Jakub Jelinek; Joel Brobecker > Objet=A0: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header >=20 > Hello, >=20 > This patch addresses issues I've seen in binutils about > cross-compilers and dwarf2 display via objdump -W on hosts, which have > sizeof (long) < target's sizeof(void *). Additionally same issue of > course can be seen on LLP64 targets, too. > Those issues are caused by the fact that the dwarf2.h header in > include/ is using unconditionally the type 'unsigned long' for > vma-scalars. >=20 > This patch address additionally the binutils' dwarf.(c|h) files and > make them host bitness independent for gcc base toolchains supporting > the 'long long' type. >=20 > I've tested the attached patches for gdb, binutils, and gcc on > i686-w64-mingw32, and x86_64-w64-mingw32 cross-toolchains hosted on > cygwin. And I didn't found until now regressions. Later this day I > want to do a regression test for linux64, too. >=20 >=20 > binutils, gdb, gcc >=20 > ChangeLog include/ >=20 > 2011-02-17 Kai Tietz >=20 > * dwarf2.h (dw2_vma_t): New type. > (dw2_svma_t): New type. > (DW2_VMA_FMT): New macro specifying > to be used width-sepecifier for printing > new types. >=20 >=20 > ChangeLog binutils/ >=20 > 2011-02-17 Kai Tietz >=20 > * dwarf.c (read_leb128): Use dw2_vma_t instead of > long type. > (process_extended_line_op): Use for adr new type > and print dw2 values via DW2_VMA_FMT. > (fetch_indirect_string): Adjust offset's type. > (decode_location_expression): Adjust argument types > and uvalue type. > (read_and_display_attr_value): Likewise. > (read_and_display_attr): Likewise. > (decode_location_expression): Adjust printf format. > (process_debug_info): Likewise. > (display_debug_lines_raw): Likewise. > (display_debug_lines_decoded): Likewise. > (display_debug_pubnames): Likewise. > (display_debug_loc): Likewise. > (display_debug_aranges): Likewise. > * dwarf.h: Add include of dwarf2.h header and > use of dw2_vma_t instead of long types. > (read_leb128): Adjust return type. >=20 >=20 > Regards, > Kai >=20 >=20 > PS: On gdb there is at the moment in gdb/common part the include-path > to intl for libintl.h missing