auto merge of : vadimcn/rust/fix-debuginfo, r=alexcrichton

This PR fixes debuginfo tests on Windows.
This commit is contained in:
bors 2014-09-13 17:25:54 +00:00
commit 7277fe9ee7
4 changed files with 7 additions and 6 deletions
mk
src
compiletest
librustc
back
middle/trans

View File

@ -283,7 +283,7 @@ tidy:
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)echo $(ALL_HS) \ $(Q)echo $(ALL_HS) \
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
$(Q)find $(S)src -type f -perm +111 \ $(Q)find $(S)src -type f -perm a+x \
-not -name '*.rs' -and -not -name '*.py' \ -not -name '*.rs' -and -not -name '*.py' \
-and -not -name '*.sh' \ -and -not -name '*.sh' \
| grep '^$(S)src/jemalloc' -v \ | grep '^$(S)src/jemalloc' -v \

View File

@ -482,12 +482,12 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
// GDB's script auto loading safe path ... // GDB's script auto loading safe path ...
script_str.push_str( script_str.push_str(
format!("add-auto-load-safe-path {}\n", format!("add-auto-load-safe-path {}\n",
rust_pp_module_abs_path.as_slice()) rust_pp_module_abs_path.replace("\\", "\\\\").as_slice())
.as_slice()); .as_slice());
// ... and also the test directory // ... and also the test directory
script_str.push_str( script_str.push_str(
format!("add-auto-load-safe-path {}\n", format!("add-auto-load-safe-path {}\n",
config.build_base.as_str().unwrap()) config.build_base.as_str().unwrap().replace("\\", "\\\\"))
.as_slice()); .as_slice());
} }
} }
@ -499,7 +499,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
// Load the target executable // Load the target executable
script_str.push_str(format!("file {}\n", script_str.push_str(format!("file {}\n",
exe_file.as_str().unwrap()) exe_file.as_str().unwrap().replace("\\", "\\\\"))
.as_slice()); .as_slice());
script_str.push_str(cmds.as_slice()); script_str.push_str(cmds.as_slice());

View File

@ -1017,7 +1017,8 @@ fn link_args(cmd: &mut Command,
cmd.arg("-Wl,--nxcompat"); cmd.arg("-Wl,--nxcompat");
// Mark all dynamic libraries and executables as compatible with ASLR // Mark all dynamic libraries and executables as compatible with ASLR
cmd.arg("-Wl,--dynamicbase"); // FIXME #17098: ASLR breaks gdb
// cmd.arg("-Wl,--dynamicbase");
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address // Mark all dynamic libraries and executables as compatible with the larger 4GiB address
// space available to x86 Windows binaries on x86_64. // space available to x86 Windows binaries on x86_64.

View File

@ -739,7 +739,7 @@ pub fn finalize(cx: &CrateContext) {
cx.sess().targ_cfg.os == abi::OsiOS { cx.sess().targ_cfg.os == abi::OsiOS {
"Dwarf Version".with_c_str( "Dwarf Version".with_c_str(
|s| llvm::LLVMRustAddModuleFlag(cx.llmod(), s, 2)); |s| llvm::LLVMRustAddModuleFlag(cx.llmod(), s, 2));
} else { } else if cx.sess().targ_cfg.os == abi::OsLinux {
// FIXME(#13611) this is a kludge fix because the Linux bots have // FIXME(#13611) this is a kludge fix because the Linux bots have
// gdb 7.4 which doesn't understand dwarf4, we should // gdb 7.4 which doesn't understand dwarf4, we should
// do something more graceful here. // do something more graceful here.