This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: elf64_alpha_find_nearest_line fails for compaq execs


On Thu, Jan 25, 2001 at 03:17:12PM -0800, Curtis L. Janssen wrote:
> The problem seems to be that elf64_alpha_find_nearest_line tries
> to find the line number from ecoff info before falling back to
> dwarf2.  It thinks it found something; however, the info is
> incorrect.  The Compaq compiler uses dwarf2 so the problem can
> be fixed by checking for dwarf2 info first. This doesn't break
> code generated by gcc.  Here is is patch that implements this
> fix:

Try the following instead.  I think it should have the same
effect without adding more code.


r~


Index: elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.19
diff -c -p -d -r1.19 elf64-alpha.c
*** elf64-alpha.c	2001/01/27 00:04:09	1.19
--- elf64-alpha.c	2001/01/27 00:12:43
*************** elf64_alpha_find_nearest_line (abfd, sec
*** 2105,2110 ****
--- 2105,2117 ----
  {
    asection *msec;
  
+   /* Begin with the generic ELF find_nearest_line routine.  This avoids
+      confusion when a compiler emits complete dwarf2 debug info, and a
+      minimal mdebug procedure descriptor.  */
+   if (_bfd_elf_find_nearest_line (abfd, section, symbols, offset,
+ 				  filename_ptr, functionname_ptr, line_ptr))
+     return true;
+ 
    msec = bfd_get_section_by_name (abfd, ".mdebug");
    if (msec != NULL)
      {
*************** elf64_alpha_find_nearest_line (abfd, sec
*** 2181,2191 ****
        msec->flags = origflags;
      }
  
!   /* Fall back on the generic ELF find_nearest_line routine.  */
! 
!   return _bfd_elf_find_nearest_line (abfd, section, symbols, offset,
! 				     filename_ptr, functionname_ptr,
! 				     line_ptr);
  }
  
  /* Structure used to pass information to alpha_elf_output_extsym.  */
--- 2188,2194 ----
        msec->flags = origflags;
      }
  
!   return false;
  }
  
  /* Structure used to pass information to alpha_elf_output_extsym.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]