From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Molenda To: Michael Snyder 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:32:00 -0000 Message-id: <20010910113226.A23487@shell17.ba.best.com> References: <20010909074800.A8112@shell17.ba.best.com> <3B9D054A.4C3CC2B1@cygnus.com> X-SW-Source: 2001-09/msg00141.html On Mon, Sep 10, 2001 at 11:24:10AM -0700, Michael Snyder wrote: > > + if (SYMBOL_SOURCE_NAME (sym)[0] > name[0]) > > + { > > + break; > > + } > > If this test works, then wouldn't some sort of strcmp test work too? It is comparing unmangled names, so there may be space chars which are not significant. I don't know enough about mangling to be confident that I could put a strcmp in here safely. I'll try it out later today and see if the testsuite happens to trip up on it. The SYMBOL_MATCHES_NAME() call used for the actual comparison uses util.c:strcmp_iw, which skips over whitespace. (On the good news side, when I first started working on this loop, I found that using strcmp() to detect matches produced a number of testsuite regressions, helping to Show Me The Light.) Jason