From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22070 invoked by alias); 17 Feb 2011 19:07:03 -0000 Received: (qmail 21932 invoked by uid 22791); 17 Feb 2011 19:07:01 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,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-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Feb 2011 19:06:55 +0000 Received: by qwa26 with SMTP id 26so2663284qwa.0 for ; Thu, 17 Feb 2011 11:06:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.210.195 with SMTP id gl3mr3044983qab.67.1297969613076; Thu, 17 Feb 2011 11:06:53 -0800 (PST) Received: by 10.229.214.131 with HTTP; Thu, 17 Feb 2011 11:06:53 -0800 (PST) In-Reply-To: <20110217190253.GC30899@tyan-ft48-01.lab.bos.redhat.com> References: <20110217190253.GC30899@tyan-ft48-01.lab.bos.redhat.com> Date: Thu, 17 Feb 2011 19:07:00 -0000 Message-ID: Subject: Re: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header From: Kai Tietz To: Jakub Jelinek Cc: GCC Patches , Binutils , gdb , 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/msg00229.txt.bz2 2011/2/17 Jakub Jelinek : > On Thu, Feb 17, 2011 at 07:58:56PM +0100, Kai Tietz wrote: >> 2011/2/17 Kai Tietz : >> > 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. > > I'd prefer if we could move those binutils specific internal implementati= on > details out of the dwarf2.h header, keep it really just for the stuff > defined in the standard, and add a new binutils specific header somewhere > else which would contain binutils specific details. > > =A0 =A0 =A0 =A0Jakub Well, so we make dwarf2.h in include just host-specific and isn't able to cover things for foreign target, like 32-bit host can't use this header for 64-bit dwarf2 information. I am fine by this, but nevertheless is then the use of 'unsigned long' type within this header still an issue. Here should be used instead then 'intptr_t'. As on LLP64 unsigned long isn't wide-enough. Regards, Kai