This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

directory separators on minGW hosts


Hi again,

Here is a patch about directory separators on minGW hosts.
It on the testsuite/gdb.base/default.exp file.
It allows to pass the "directory" and "show directories" command when running the testsuite on windows.


Attached it the patch.
Frederic Riss will commit it if accepted.

Denis
Index: gdb/testsuite/gdb.base/default.exp
===================================================================
--- gdb/testsuite/gdb.base/default.exp	(revision 209)
+++ gdb/testsuite/gdb.base/default.exp	(working copy)
@@ -144,12 +145,18 @@
 #test directory
 # FIXME -- need to dump full output to detailed log
 
+if { $tcl_platform(platform) == "windows" } {
+    set dirlist_sep ";"
+} else {
+    set dirlist_sep ":"
+}
+
 send_gdb "directory\n"
 gdb_expect {
     -re "Reinitialize source path to empty.*y or n. $"  {
 	send_gdb "y\n"
 	gdb_expect {
-	    -re "Source directories searched: .cdir:.cwd.*$gdb_prompt $"\
+	    -re "Source directories searched: .cdir$dirlist_sep.cwd.*$gdb_prompt $"\
 		    { pass "directory prompt" }
 	    timeout		{ fail "(timeout) directory prompt" }
 	}
@@ -604,7 +611,7 @@
 #test show convenience
 gdb_test "show convenience" "No debugger convenience variables now defined.(\[^\r\n\]*\[\r\n\])+Convenience variables have names starting with \".\";(\[^\r\n\]*\[\r\n\])+use \"set\" as in \"set .foo = 5\" to define them." "show convenience"
 #test show directories
-gdb_test "show directories" "Source directories searched: .cdir:.cwd" "show directories"
+gdb_test "show directories" "Source directories searched: .cdir$dirlist_sep.cwd" "show directories"
 #test show editing
 gdb_test "show editing" "Editing of command lines as they are typed is o\[a-z\]*." "show editing"
 #test show height
2006-02-08  Frederic Riss  <frederic.riss@st.com>

	* gdb.base/default.exp: change the directory separator when host
    is windows.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]