aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-01-17 20:40:44 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-01-17 20:40:44 +0000
commitd84fca2cf4ca3e3fac8d59b803e7e5cd8b907d2c (patch)
tree888ec05516fa8b11c00c409a02c0118de11bc348 /gdb/symtab.c
parent6108433d1a0ba373259af9aa1ebfdfc1bcec2eeb (diff)
downloadgdb-d84fca2cf4ca3e3fac8d59b803e7e5cd8b907d2c.zip
gdb-d84fca2cf4ca3e3fac8d59b803e7e5cd8b907d2c.tar.gz
gdb-d84fca2cf4ca3e3fac8d59b803e7e5cd8b907d2c.tar.bz2
gdb/
* 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.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index c304f70..770f9e0 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -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)