From 46e2bafa7a77fb852862a89bca861ba39d9cdb8e Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 31 Mar 2014 14:20:05 +0800 Subject: [PATCH] Allow ';' as a directory separator Hi, I find two fails in source-dir.exp on mingw32 host. (gdb) directory /nOtExStInG/a /nOtExStInG/b /nOtExStInG/c^M Warning: /nOtExStInG/a: No such file or directory.^M Warning: /nOtExStInG/b: No such file or directory.^M Warning: /nOtExStInG/c: No such file or directory.^M Source directories searched: /nOtExStInG/a;/nOtExStInG/b;/nOtExStInG/c;$cdir;$cwd^M (gdb) FAIL: gdb.base/source-dir.exp: directory /nOtExStInG/a /nOtExStInG/b /nOtExStInG/c directory /nOtExStInG/b /nOtExStInG/d /nOtExStInG/c^M Warning: /nOtExStInG/b: No such file or directory.^M Warning: /nOtExStInG/d: No such file or directory.^M Warning: /nOtExStInG/c: No such file or directory.^M Source directories searched: /nOtExStInG/b;/nOtExStInG/d;/nOtExStInG/c;/nOtExStInG/a;$cdir;$cwd^M (gdb) FAIL: gdb.base/source-dir.exp: directory /nOtExStInG/b /nOtExStInG/d /nOtExStInG/c The regular expression expects ':' and ';' is path separator on Windows. This patch is to allow ';' as a path separator in regular expression. This patch is similar to Dan's patch to fix a similar problem here Re: directory separators on minGW hosts https://sourceware.org/ml/gdb-patches/2006-02/msg00359.html It is obvious. Pushed it in. gdb/testsuite: 2014-03-31 Yao Qi * gdb.base/source-dir.exp: Allow ';' as a directory separator. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/source-dir.exp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 092cde8ab31..569c899a0bb 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-03-31 Yao Qi + + * gdb.base/source-dir.exp: Allow ';' as a directory separator. + 2014-03-28 Joel Brobecker * gdb.ada/mi_dyn_arr: New testcase. diff --git a/gdb/testsuite/gdb.base/source-dir.exp b/gdb/testsuite/gdb.base/source-dir.exp index 43b56b76b3f..ca66ea06be6 100644 --- a/gdb/testsuite/gdb.base/source-dir.exp +++ b/gdb/testsuite/gdb.base/source-dir.exp @@ -19,5 +19,5 @@ gdb_start set foo "/nOtExStInG" -gdb_test "directory $foo/a $foo/b $foo/c" "\r\nSource directories searched: $foo/a:$foo/b:$foo/c:\\\$cdir:\\\$cwd" -gdb_test "directory $foo/b $foo/d $foo/c" "\r\nSource directories searched: $foo/b:$foo/d:$foo/c:$foo/a:\\\$cdir:\\\$cwd" +gdb_test "directory $foo/a $foo/b $foo/c" "\r\nSource directories searched: $foo/a\[:;\]$foo/b\[:;\]$foo/c\[:;\]\\\$cdir\[:;\]\\\$cwd" +gdb_test "directory $foo/b $foo/d $foo/c" "\r\nSource directories searched: $foo/b\[:;\]$foo/d\[:;\]$foo/c\[:;\]$foo/a\[:;\]\\\$cdir\[:;\]\\\$cwd" -- 2.30.2