This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: coffgen.c:coff_find_nearest_line ?
- To: Ian Lance Taylor <ian at zembu dot com>, <binutils at sources dot redhat dot com>, tom Rix <trix at redhat dot com>
- Subject: Re: coffgen.c:coff_find_nearest_line ?
- From: "Mark E." <snowball3 at bigfoot dot com>
- Date: Thu, 25 Jan 2001 16:08:47 -0500
- References: "Mark E."'s message of "Thu, 25 Jan 2001 12:04:53 -0500"
> However, when I look at _bfd_stab_section_find_nearest_line, I think
> it returns false on error, or true on non-error. Whether it found any
> debugging information is determined, if it returned true, by whether
> *pfound was set.
Ok, maybe I'm the one a bit off then. Then shouldn't the 'if (found)' part be moved up
a bit? If so, would someone please apply this patch?
bfd/ChangeLog:
2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
* coffgen.c (coff_find_nearest_line): If stabs information was
found, return true immediately.
Index: src/bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.18
diff -c -p -r1.18 coffgen.c
*** coffgen.c 2001/01/23 11:45:52 1.18
--- coffgen.c 2001/01/25 21:02:58
*************** coff_find_nearest_line (abfd, section, s
*** 2188,2201 ****
&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;
*filename_ptr = 0;
--- 2188,2201 ----
&coff_data(abfd)->line_info))
return false;
+ if (found)
+ return true;
+
/* 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;
*filename_ptr = 0;