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]

Re: [PATCH] Escape backslash in windows path


On 03/28/2014 06:53 PM, Yao Qi wrote:
diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index 13da410..0feb729 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -171,6 +171,8 @@ set test "show environment HOME"
  gdb_test_multiple $test $test {
      -re "\nHOME = (\[^\r\n\]*)\[\r\n\]+$gdb_prompt $" {
          set HOME $expect_out(1,string)
+	# Escape backslash in case HOME is a windows path.
+	regsub -all {\\} $HOME {\\\\} HOME
          pass $test
      }
  }

Does string_to_regexp work for this?

Keith


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