about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVadim Chugunov <vadimcn@gmail.com>2014-09-07 13:19:33 -0700
committerVadim Chugunov <vadimcn@gmail.com>2014-09-10 16:52:22 -0700
commit127c75e5bbc283643637892c9f7bc801b11409ee (patch)
treef065aa3126a557c0634c02c9df06e18b7328ca39
parent792a2eac93eb85b6ff90cb7386b9ea27a5b373bd (diff)
downloadrust-127c75e5bbc283643637892c9f7bc801b11409ee.tar.gz
rust-127c75e5bbc283643637892c9f7bc801b11409ee.zip
Escape backslashes in debugger scripts.
-rw-r--r--src/compiletest/runtest.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 32671722ba7..122a241ef0c 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -482,12 +482,12 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
                         // GDB's script auto loading safe path ...
                         script_str.push_str(
                             format!("add-auto-load-safe-path {}\n",
-                                    rust_pp_module_abs_path.as_slice())
+                                    rust_pp_module_abs_path.replace("\\", "\\\\").as_slice())
                                 .as_slice());
                         // ... and also the test directory
                         script_str.push_str(
                             format!("add-auto-load-safe-path {}\n",
-                                    config.build_base.as_str().unwrap())
+                                    config.build_base.as_str().unwrap().replace("\\", "\\\\"))
                                 .as_slice());
                     }
                 }
@@ -499,7 +499,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
 
             // Load the target executable
             script_str.push_str(format!("file {}\n",
-                                        exe_file.as_str().unwrap())
+                                        exe_file.as_str().unwrap().replace("\\", "\\\\"))
                                     .as_slice());
 
             script_str.push_str(cmds.as_slice());