From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28357 invoked by alias); 17 Feb 2011 19:17:43 -0000 Received: (qmail 28338 invoked by uid 22791); 17 Feb 2011 19:17:42 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Feb 2011 19:17:40 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1HJHGDZ005256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Feb 2011 14:17:16 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1HJHFtc024205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Feb 2011 14:17:16 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p1HJHEew027154; Thu, 17 Feb 2011 20:17:15 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p1HJHEZD026670; Thu, 17 Feb 2011 20:17:14 +0100 Date: Thu, 17 Feb 2011 19:17:00 -0000 From: Jakub Jelinek To: Kai Tietz Cc: GCC Patches , Binutils , gdb , Joel Brobecker Subject: Re: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header Message-ID: <20110217191714.GD30899@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20110217190253.GC30899@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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/msg00230.txt.bz2 On Thu, Feb 17, 2011 at 08:06:53PM +0100, Kai Tietz wrote: > > I'd prefer if we could move those binutils specific internal implementation > > 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. > > 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. I mean that none of the DWARF2_Internal types should be in the include/dwarf2.h headers (that's implementation specific stuff), and the DWARF2_External types are questionable too, to me they look very much like implementation detail too. E.g. DWARF2_External_LineInfo type is dubious, because it might somehow describe version 2 or 3 .debug_line header, but version 4 looks differently, etc. So IMHO the DWARF2_External stuff should be moved too. And the guard should be probably renamed from _ELF_DWARF2_H to _DWARF2_H, I don't see anything ELF specific in the header. Jakub