Mail Archives: djgpp-workers/1999/08/30/16:03:42
On Sun, 29 Aug 1999, I wrote:
> Is this corrected in the Binutils CVS tree? I looked around, and it
> seems it isn't, except for the manual that tells the user to add the
> underscores by hand. A patch that corrects that for me is attached
> below. Does anybody think that this patch is wrong?
Well, *I* think it's wrong ;-). It doesn't take into account the
possibility of a function (written in assembly) that doesn't begin with
an underscore.
Here's take two. This is relative to the original source in Binuitils
2.9.1, not to the previous patched version.
1999-08-29 Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
* sym_ids.c (match): When comparing symbol with pattern, ignore
leading underscore of the symbol, if the compiler prepends them.
*** gprof/sym_ids.c~0 Fri May 1 18:49:44 1998
--- gprof/sym_ids.c Sun Aug 29 21:36:50 1999
*************** DEFUN (match, (pattern, sym), Sym * patt
*** 201,207 ****
{
return (pattern->file ? pattern->file == sym->file : TRUE)
&& (pattern->line_num ? pattern->line_num == sym->line_num : TRUE)
! && (pattern->name ? strcmp (pattern->name, sym->name) == 0 : TRUE);
}
--- 201,210 ----
{
return (pattern->file ? pattern->file == sym->file : TRUE)
&& (pattern->line_num ? pattern->line_num == sym->line_num : TRUE)
! && (pattern->name
! ? strcmp (pattern->name,
! sym->name+(discard_underscores && sym->name[0] == '_')) == 0
! : TRUE);
}
- Raw text -