RFC: add relative file name handling for linespecs

Joel Brobecker brobecker@adacore.com
Wed Jan 11 09:03:00 GMT 2012


> 2012-01-10  Tom Tromey  <tromey@redhat.com>
> 
> 	* NEWS: Add item.
> 	* symtab.h (compare_filenames_for_search): Declare.
> 	* symtab.c (compare_filenames_for_search): New function.
> 	(iterate_over_some_symtabs): Use it.
> 	* symfile.h (struct quick_symbol_functions)
> 	<map_symtabs_matching_filename>: Change spec.
> 	* psymtab.c (partial_map_symtabs_matching_filename): Use
> 	compare_filenames_for_search.  Update for new spec.
> 	* dwarf2read.c (dw2_map_symtabs_matching_filename): Use
> 	compare_filenames_for_search.  Update for new spec.

FWIW, the patch looks good to me.  I think that this is an awesome
enhancement.

One thing I noticed is that we might want to apply the same treatement
to the "clear" command... It uses the filename_cmp function directly,
instead of using the FILENAME_CMP macro.

-- 
Joel



More information about the Gdb-patches mailing list