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]

coffgen.c:coff_find_nearest_line ?


In coffgen.c, coff_find_nearest_line, some code has been added to use dwarf2
to find line numbers.  The logic looks wrong.  Here is the code snippet from
sources cvs ver 1.17

  /* Before looking through the symbol table, try to use a .stab
     section to find the information.  */
  if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset,
					     &found, filename_ptr,
					     functionname_ptr, line_ptr,
					     &coff_data(abfd)->line_info))
    return false;

  /* Also try examining DWARF2 debugging information.  */
      if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
    				     filename_ptr, functionname_ptr,
    				     line_ptr, 0,
    				     &coff_data(abfd)->dwarf2_find_line_info))
        return true;

if (found)
    return true;

It looks like if the stab passes, its effect is wiped out by the call the
dwarf2.  If stab fails, dwarf2 isn't given a chance.

Tom

Tom Rix <trix@redhat.com>
GCC Engineer
256 704 9201


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