* [RFA] Fix error in dwarf.c:process_debug_info function
@ 2011-03-25 15:37 Pierre Muller
2011-03-25 17:56 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Pierre Muller @ 2011-03-25 15:37 UTC (permalink / raw)
To: 'Binutils', 'Nick Clifton'
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.
Could someone please check and confirm this?
Thanks in advance,
Pierre Muller
GDB pascal language maintainer
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));
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA] Fix error in dwarf.c:process_debug_info function
2011-03-25 15:37 [RFA] Fix error in dwarf.c:process_debug_info function Pierre Muller
@ 2011-03-25 17:56 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2011-03-25 17:56 UTC (permalink / raw)
To: Pierre Muller; +Cc: 'Binutils'
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-25 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-25 15:37 [RFA] Fix error in dwarf.c:process_debug_info function Pierre Muller
2011-03-25 17:56 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).