www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/30/16:03:42

Date: Mon, 30 Aug 1999 19:00:47 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT bigfoot DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: Changes in Binutils 2.9.1
In-Reply-To: <Pine.SUN.3.91.990829144024.9438q-100000@is>
Message-ID: <Pine.SUN.3.91.990830185845.10193B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019