Index: symtab.c =================================================================== RCS file: /cvs/src/src/gdb/symtab.c,v retrieving revision 1.146 diff -a -u -r1.146 symtab.c --- symtab.c 17 Dec 2005 22:34:03 -0000 1.146 +++ symtab.c 10 Feb 2006 01:39:41 -0000 @@ -746,9 +746,6 @@ section == 0) /* can't validate section this way */ return (pst); - if (msymbol == NULL) - return (pst); - /* The code range of partial symtabs sometimes overlap, so, in the loop below, we need to check all partial symtabs and find the one that fits better for the given PC address. We @@ -763,10 +760,14 @@ struct partial_symbol *p; p = find_pc_sect_psymbol (tpst, pc, section); + if (p != NULL + && msymbol != NULL && SYMBOL_VALUE_ADDRESS (p) == SYMBOL_VALUE_ADDRESS (msymbol)) + /* Return early if we found an exact match in the msymtab. */ return (tpst); + if (p != NULL) { /* We found a symbol in this partial symtab which