* symtab.c (compare_filenames_for_search): New comment for
	HAS_DRIVE_SPEC.

gdb/testsuite/
	* gdb.dwarf2/dw2-dos-drive.S: New file.
	* gdb.dwarf2/dw2-dos-drive.exp: New file.
This commit is contained in:
Jan Kratochvil
2013-01-17 20:40:44 +00:00
parent 6108433d1a
commit d84fca2cf4
5 changed files with 132 additions and 1 deletions

View File

@@ -164,7 +164,12 @@ compare_filenames_for_search (const char *filename, const char *search_name)
/* Either the names must completely match, or the character
preceding the trailing SEARCH_NAME segment of FILENAME must be a
directory separator. */
directory separator.
The HAS_DRIVE_SPEC purpose is to make FILENAME "c:file.c"
compatible with SEARCH_NAME "file.c". In such case a compiler had
to put the "c:file.c" name into debug info. Such compatibility
works only on GDB built for DOS host. */
return (len == search_len
|| IS_DIR_SEPARATOR (filename[len - search_len - 1])
|| (HAS_DRIVE_SPEC (filename)