This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: patch for binutils bfd/dwarf2.c
- From: Nick Clifton <nickc at redhat dot com>
- To: eraxxon at alumni dot rice dot edu
- Cc: binutils at sources dot redhat dot com
- Date: 20 Sep 2002 08:30:50 +0100
- Subject: Re: patch for binutils bfd/dwarf2.c
- References: <3D8A024C.4080209@alumni.rice.edu>
Hi Nathan,
> Description:
> ------------
> The support for non-standard IRIX64 compilation unit length fields had a
> bug. For such binaries, dwarf2_find_nearest_line is normally called
> with the addr_size parameter set to 8. However, this function is
> sometimes called with the addr_size parameter set to 0 (which defaults
> to an address size of 4 bytes).
>
> Consider a case where we want to look up a virtual memory address with
> no debugging information. The generic mips_elf_find_nearest_line tries
> dwarf2_find_nearest_line(addr_size = 8). When this (correctly) returns
> nothing, it enters a 'panic mode' and tries elf_find_nearest_line to
> make sure there really is no symbolic infomation. But this latter
> function simply calls dwarf2_find_nearest_line(addr_size = 4).
> dwarf2_find_nearest_line(addr_size = 4) then attempts to find the
> symbol by reading some more compilation units. But it can't read them
> correctly because it assumed the wrong address size. Consequently, it
> records that these compilation units have errors and they are never
> read again -- and no symbolic information in these compilation units
> can ever be found.
> 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
>
> * dwarf2.c (_bfd_dwarf2_find_nearest_line): Update to correctly
> read (non-standard) 64-bit DWARF2 formats (e.g. IRIX64).
Approved and applied.
Cheers
Nick