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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ba7c32c230bcfb82b8a052d8fc4f9d4b7c0de2d;p=binutils-gdb.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 bb1ff062966..aea9dc1b715 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 b1a259013dc..c0fa1e71ea4 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++; } }