aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-04-14 21:22:29 +0000
committerDoug Evans <dje@google.com>2010-04-14 21:22:29 +0000
commite6d9b9c2fac5d91fbbda8be10775d6903b9c360a (patch)
treee03b9881c715e46bfb4e33754ff0ecb953fc28ce /gdb/source.c
parent58cd914490d61122a43746f5610542798ba6f3e7 (diff)
downloadgdb-e6d9b9c2fac5d91fbbda8be10775d6903b9c360a.zip
gdb-e6d9b9c2fac5d91fbbda8be10775d6903b9c360a.tar.gz
gdb-e6d9b9c2fac5d91fbbda8be10775d6903b9c360a.tar.bz2
* source.c (open): Strip DOS drive letter if present before
concatenating string to search path.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/source.c b/gdb/source.c
index e9893ba..47caa14 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -724,6 +724,10 @@ openp (const char *path, int opts, const char *string,
goto done;
}
+ /* For dos paths, d:/foo -> /foo, and d:foo -> foo. */
+ if (HAS_DRIVE_SPEC (string))
+ string = STRIP_DRIVE_SPEC (string);
+
/* /foo => foo, to avoid multiple slashes that Emacs doesn't like. */
while (IS_DIR_SEPARATOR(string[0]))
string++;