This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
coffgen.c:coff_find_nearest_line ?
- To: <binutils at sources dot redhat dot com>
- Subject: coffgen.c:coff_find_nearest_line ?
- From: "Tom Rix" <trix at redhat dot com>
- Date: Thu, 25 Jan 2001 10:12:30 -0600
- Cc: <snowball3 at bigfoot dot com>
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