This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>, gdb <gdb at sourceware dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Joel Brobecker <brobecker at adacore dot com>
- Date: Thu, 17 Feb 2011 19:58:56 +0100
- Subject: Re: [RFC patch]: Adjust the use of 'long' type in dwarf2.h header
- References: <AANLkTimPMPKd=Hfz-1e_aSw_iQsdm2SMK5hwR0sd+tga@mail.gmail.com>
2011/2/17 Kai Tietz <ktietz70@googlemail.com>:
> 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 ?Kai Tietz
>
> ? ? ? ?* 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.
>
>
> ChangeLog binutils/
>
> 2011-02-17 ?Kai Tietz
>
> ? ? ? ?* 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.
>
>
> 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