--- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4771,6 +4771,16 @@ expand_line_sal (struct symtab_and_line sal) lineno = sal.line; match_filename = sal.symtab->filename; +{ int hack_count = 0; + ALL_PSPACES (pspace) + ALL_PSPACE_PSYMTABS (pspace, objfile, psymtab) + { + if (FILENAME_CMP (match_filename, psymtab->filename) == 0) + hack_count++; + } +if (hack_count > 10) error ("%d hack_count", hack_count); +} + /* We need to find all symtabs for a file which name is described by sal. We cannot just directly iterate over symtabs, since a symtab might not be