From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28434 invoked by alias); 21 Feb 2011 12:37:55 -0000 Received: (qmail 28399 invoked by uid 22791); 21 Feb 2011 12:37:52 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Feb 2011 12:37:47 +0000 Received: by iyf13 with SMTP id 13so2658116iyf.0 for ; Mon, 21 Feb 2011 04:37:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.177.137 with SMTP id bi9mr1925901icb.245.1298291865171; Mon, 21 Feb 2011 04:37:45 -0800 (PST) Received: by 10.42.28.8 with HTTP; Mon, 21 Feb 2011 04:37:45 -0800 (PST) In-Reply-To: References: <20110217190253.GC30899@tyan-ft48-01.lab.bos.redhat.com> <20110217191714.GD30899@tyan-ft48-01.lab.bos.redhat.com> Date: Mon, 21 Feb 2011 12:37:00 -0000 Message-ID: Subject: Re: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header From: NightStrike To: Kai Tietz Cc: Alan Modra , GCC Patches , Binutils , gdb , Joel Brobecker , Jakub Jelinek 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/msg00252.txt.bz2 Ping On Fri, Feb 18, 2011 at 4:50 AM, Kai Tietz wrote: > 2011/2/17 Jakub Jelinek : >> On Thu, Feb 17, 2011 at 08:06:53PM +0100, Kai Tietz wrote: >>> > I'd prefer if we could move those binutils specific internal implemen= tation >>> > 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 somew= here >>> > 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. =A0E.g. DWARF2_External_LineIn= fo >> 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. >> >> =A0 =A0 =A0 =A0Jakub >> > > So I reworked my patch as Jakub suggested and retested it for > x86_64-w64-mingw32, i686-w64-mingw32, and x86_64-pc-linux-gnu for gcc, > binutils, and gdb. Ok for apply? > > binutils, gdb, gcc > > ChangeLog include/ > > 2011-02-18 =A0Kai Tietz > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * dwarf2.h (_ELF_DWARF2_H): Renamed to > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 _DWARF2_H. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (DWARF2_External_LineInfo, DWARF2_Interna= l_LineInfo, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DWARF2_External_PubNames, DWARF2_Internal= _PubNames, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DWARF2_External_CompUnit, DWARF2_Internal= _CompUnit, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DWARF2_External_ARange, DWARF2_Internal_A= Range): Removed. > > > ChangeLog binutils/ > > 2011-02-18 =A0Kai Tietz > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * dwarf.c (read_leb128): Use dw2_vma_t in= stead of > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 long type. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (process_extended_line_op): Use for adr b= fd_vma > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 type and print those typed values via BFD= _VMA_FMT. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (fetch_indirect_string): Adjust offset's = type. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (decode_location_expression): Adjust argu= ment types > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 and uvalue type. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (read_and_display_attr_value): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (read_and_display_attr): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (decode_location_expression): Adjust prin= tf format. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (process_debug_info): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (display_debug_lines_raw): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (display_debug_lines_decoded): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (display_debug_pubnames): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (display_debug_loc): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (display_debug_aranges): Likewise. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * dwarf.h (DWARF2_External_LineInfo, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DWARF2_Internal_LineInfo, DWARF2_External= _PubNames, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DWARF2_Internal_PubNames, DWARF2_External= _CompUnit, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DWARF2_Internal_CompUnit, DWARF2_External= _ARange, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 DWARF2_Internal_ARange): Added.. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (read_leb128): Adjust return type. > > Regards, > Kai > > PS: A lot of those moved structures aren't used at all in binutils > dwarf.c (which is the only consumer of some of those structures as a > grep over binutils/gdb/gcc had shown). So maybe the unused could be > removed in a second patch completely. >