This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Support DW_FORM_strp in bfd dwarf2 reader
- From: Andreas Schwab <schwab at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Graham Stott <grahams at redhat dot com>, binutils at sources dot redhat dot com
- Date: 15 Nov 2001 13:23:36 +0100
- Subject: Re: [PATCH] Support DW_FORM_strp in bfd dwarf2 reader
- References: <20011105162344.M739@sunsite.ms.mff.cuni.cz><20011105092053.E29143@redhat.com><20011106160448.O739@sunsite.ms.mff.cuni.cz><20011106205502.A29811@redhat.com><20011107022805.I4087@devserv.devel.redhat.com><20011107115451.D30193@redhat.com><20011108120958.M4087@devserv.devel.redhat.com><20011108102306.C30690@redhat.com> <3BF04549.3C208EB2@redhat.com><20011113201247.A555@sunsite.ms.mff.cuni.cz>
Jakub Jelinek <jakub@redhat.com> writes:
|> On Mon, Nov 12, 2001 at 09:55:21PM +0000, Graham Stott wrote:
|> > All,
|> >
|> > I've tried to building a mn10300 cross toolchain using FSF lastest binutils,
|> > gcc, and newlib checkouts but I've run into a problem with DW_FORM_strp in
|> > binutils because the bfd/dwarf2.c:read_attribute() routine barfs with invalid
|> > or unhandled FORM value: 14.
|> >
|> > Any idea what's up here?
|>
|> Here is a patch. Ok to commit?
|>
|> 2001-11-13 Jakub Jelinek <jakub@redhat.com>
|>
|> * dwarf2.c (struct line_head) [total_length]: Change type to
|> bfd_vma.
|> (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
|> (struct comp_unit): Add stash and offset_size.
|> (read_8_bytes): Return bfd_vma.
|> (read_indirect_string): New.
|> (read_attribute): Handle DW_FORM_strp.
|> (decode_line_info): Support 64-bit DWARF format.
|> (_bfd_dwarf2_find_nearest_line): Likewise.
|> (parse_comp_unit): Set offset_size and stash.
I'm now getting this with today's CVS (ia32 -> ppc cross):
/usr/local/ppc-linux/bin/powerpc-suse-linux-ld: Dwarf Error: DW_FORM_strp offset (4294942840) greater than or equal to .debug_str size (39703).
4294942840 == 0xFFFFA078
Andreas.
--
Andreas Schwab "And now for something
Andreas.Schwab@suse.de completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5