Skip to content

Commit

Permalink
Escape backslashes in debugger scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimcn committed Sep 10, 2014
1 parent 792a2ea commit 127c75e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand All @@ -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());
Expand Down

0 comments on commit 127c75e

Please sign in to comment.