> I'd say that use of FILENAME_CMP instead of strcmp is an obvious change. > > However, this is not complete. This function is called by: [...] > But really, so that this sort of out-of-sync bugs doesn't > happen, it'd be better if search_symbols_equal were reimplemented > in terms of compare_search_syms or even be eliminated. Indeed! I'm turning this fix into a 2-patch series: 1. Delete search_symbols_equal This patch does not fix anything, other than removing the duplication. I pondered a bit over that change, thinking maybe we'd want to keep it, just because the arguments have the right type instead of "void *". In the end, I felt it was sufficiently localized that deleting was OK. Putting it back is easy, though, so whichever we want it shall be. 2. The patch I initially proposed. This patch implements the strcmp -> FILENAME_CMP fix. gdb/ChangeLog: * symtab.c (search_symbols_equal): Delete. (sort_search_symbols_remove_dups): Replace call to search_symbols_equal by call to compare_search_syms, adjusting as necessary. gdb/ChangeLog: * symtab.c (compare_search_syms): Use FILENAME_CMP instead of strcmp to compare two symtab filenames. Tested on x86_64-linux, no regression. OK to apply? Thanks, -- Joel