[RFA] Fix error in dwarf.c:process_debug_info function

Nick Clifton nickc@redhat.com
Fri Mar 25 17:56:00 GMT 2011


Hi Pierre,

>    I think that there is a mistake in
> process_debug_info function.
>
>    IMHO, initial_length_size is not the good marker to
> know if the length is 32 or 64-bit.

You are correct - especially since initial_length_size will never be set 
to 8...

> Index: dwarf.c
> ===================================================================
> RCS file: /cvs/src/src/binutils/dwarf.c,v
> retrieving revision 1.86
> diff -u -p -r1.86 dwarf.c
> --- dwarf.c     25 Mar 2011 15:15:52 -0000      1.86
> +++ dwarf.c     25 Mar 2011 15:31:42 -0000
> @@ -2072,7 +2072,7 @@ process_debug_info (struct dwarf_section
>                    dwarf_vmatoa ("x", cu_offset));
>            printf (_("   Length:        0x%s (%s)\n"),
>                    dwarf_vmatoa ("x", compunit.cu_length),
> -                 initial_length_size == 8 ? "64-bit" : "32-bit");
> +                 offset_size == 8 ? "64-bit" : "32-bit");
>            printf (_("   Version:       %d\n"), compunit.cu_version);
>            printf (_("   Abbrev Offset: %s\n"),
>                    dwarf_vmatoa ("d", compunit.cu_abbrev_offset));
>

Approved and applied along with this changelog entry.

Cheers
   Nick

binutils/ChangeLog
2011-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>

	* dwarf.c (process_debug_info): Use offset_size to determine
	the bit-size of the computation unit's offset.



More information about the Binutils mailing list