From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: Jason Molenda Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] bug in symtab.c:lookup_block_symbol()'s search method Date: Mon, 10 Sep 2001 11:24:00 -0000 Message-id: <3B9D054A.4C3CC2B1@cygnus.com> References: <20010909074800.A8112@shell17.ba.best.com> X-SW-Source: 2001-09/msg00140.html Jason Molenda wrote: > > This patch fixes a bug introduced in October, 2000. Discussion and history > are here: > http://sources.redhat.com/ml/gdb-patches/2001-09/msg00076.html > > Analysis of performance impact is here: > http://sources.redhat.com/ml/gdb-patches/2001-09/msg00084.html > > This patch should be approved for both the mainline and the 5.1 branch. > It adds no new testsuite failures. > > Jason > > 2001-09-07 Jason Molenda (jmolenda@apple.com) > > * symtab.c (lookup_block_symbol): Break out of linear search > if we're past the range of possible matches. > > Index: symtab.c > =================================================================== > RCS file: /cvs/src/src/gdb/symtab.c,v > retrieving revision 1.42 > diff -u -p -r1.42 symtab.c > --- symtab.c 2001/07/07 17:19:50 1.42 > +++ symtab.c 2001/09/09 14:17:25 > @@ -1249,6 +1249,10 @@ lookup_block_symbol (register const stru > { > return sym; > } > + if (SYMBOL_SOURCE_NAME (sym)[0] > name[0]) > + { > + break; > + } If this test works, then wouldn't some sort of strcmp test work too?