From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12418 invoked by alias); 17 Feb 2011 18:59:04 -0000 Received: (qmail 12393 invoked by uid 22791); 17 Feb 2011 18:59:03 -0000 X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-qy0-f176.google.com (HELO mail-qy0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Feb 2011 18:58:59 +0000 Received: by qyk10 with SMTP id 10so2805601qyk.0 for ; Thu, 17 Feb 2011 10:58:57 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.235.142 with SMTP id kg14mr2716600qcb.133.1297969137099; Thu, 17 Feb 2011 10:58:57 -0800 (PST) Received: by 10.229.214.131 with HTTP; Thu, 17 Feb 2011 10:58:56 -0800 (PST) In-Reply-To: References: Date: Thu, 17 Feb 2011 18:59:00 -0000 Message-ID: Subject: Re: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header From: Kai Tietz To: GCC Patches , Binutils , gdb Cc: Jakub Jelinek , Joel Brobecker Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg00227.txt.bz2 2011/2/17 Kai Tietz : > Hello, > > 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. > > 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. > > 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. > > > binutils, gdb, gcc > > ChangeLog include/ > > 2011-02-17 =A0Kai Tietz > > =A0 =A0 =A0 =A0* dwarf2.h (dw2_vma_t): New type. > =A0 =A0 =A0 =A0(dw2_svma_t): New type. > =A0 =A0 =A0 =A0(DW2_VMA_FMT): New macro specifying > =A0 =A0 =A0 =A0to be used width-sepecifier for printing > =A0 =A0 =A0 =A0new types. > > > ChangeLog binutils/ > > 2011-02-17 =A0Kai Tietz > > =A0 =A0 =A0 =A0* dwarf.c (read_leb128): Use dw2_vma_t instead of > =A0 =A0 =A0 =A0long type. > =A0 =A0 =A0 =A0(process_extended_line_op): Use for adr new type > =A0 =A0 =A0 =A0and print dw2 values via DW2_VMA_FMT. > =A0 =A0 =A0 =A0(fetch_indirect_string): Adjust offset's type. > =A0 =A0 =A0 =A0(decode_location_expression): Adjust argument types > =A0 =A0 =A0 =A0and uvalue type. > =A0 =A0 =A0 =A0(read_and_display_attr_value): Likewise. > =A0 =A0 =A0 =A0(read_and_display_attr): Likewise. > =A0 =A0 =A0 =A0(decode_location_expression): Adjust printf format. > =A0 =A0 =A0 =A0(process_debug_info): Likewise. > =A0 =A0 =A0 =A0(display_debug_lines_raw): Likewise. > =A0 =A0 =A0 =A0(display_debug_lines_decoded): Likewise. > =A0 =A0 =A0 =A0(display_debug_pubnames): Likewise. > =A0 =A0 =A0 =A0(display_debug_loc): Likewise. > =A0 =A0 =A0 =A0(display_debug_aranges): Likewise. > =A0 =A0 =A0 =A0* dwarf.h: Add include of dwarf2.h header and > =A0 =A0 =A0 =A0use of dw2_vma_t instead of long types. > =A0 =A0 =A0 =A0(read_leb128): Adjust return type. > > > Regards, > Kai > > > PS: On gdb there is at the moment in gdb/common part the include-path > to intl for libintl.h missing > I tested those patches for x86_64-pc-linux-gnu too and had no regressions. Ok for apply, or any comments? Regards, Kai