patch for binutils bfd/dwarf2.c

Nick Clifton nickc@redhat.com
Fri Sep 20 03:35:00 GMT 2002
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



More information about the Binutils mailing list