From: Jason Molenda Date: Wed, 17 Oct 2001 07:12:57 +0000 (+0000) Subject: * symtab.c (lookup_block_symbol): Break out of linear search X-Git-Tag: cygnus_cvs_20020108_pre~1014 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ba7c32c230bcfb82b8a052d8fc4f9d4b7c0de2d;p=platform%2Fupstream%2Fbinutils.git * symtab.c (lookup_block_symbol): Break out of linear search if we're past the range of possible matches. Original patch submission, with links to history/background behind it, here: http://sources.redhat.com/ml/gdb-patches/2001-09/msg00120.html --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bb1ff06..aea9dc1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-10-17 Jason Molenda (jason-cl@molenda.com) + + * symtab.c (lookup_block_symbol): Break out of linear search + if we're past the range of possible matches. + 2001-10-16 Christopher Faylor * win32-nat.c (safe_symbol_file_add_stub): Improve logic for avoiding diff --git a/gdb/symtab.c b/gdb/symtab.c index b1a2590..c0fa1e7 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1211,6 +1211,10 @@ lookup_block_symbol (register const struct block *block, const char *name, { return sym; } + if (SYMBOL_SOURCE_NAME (sym)[0] > name[0]) + { + break; + } bot++; } }