diff --git a/mk/tests.mk b/mk/tests.mk index d95f886e07889..d89a29b549760 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -283,7 +283,7 @@ tidy: | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py $(Q)echo $(ALL_HS) \ | 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' \ -and -not -name '*.sh' \ | grep '^$(S)src/jemalloc' -v \ diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 32671722ba728..122a241ef0c74 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()); diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index bf026560c6afd..63a8e9d13b882 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -1014,7 +1014,8 @@ fn link_args(cmd: &mut Command, cmd.arg("-Wl,--nxcompat"); // 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 // space available to x86 Windows binaries on x86_64. diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs index b640f9ef5af11..7600e40edc034 100644 --- a/src/librustc/middle/trans/debuginfo.rs +++ b/src/librustc/middle/trans/debuginfo.rs @@ -739,7 +739,7 @@ pub fn finalize(cx: &CrateContext) { cx.sess().targ_cfg.os == abi::OsiOS { "Dwarf Version".with_c_str( |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 // gdb 7.4 which doesn't understand dwarf4, we should // do something more graceful here.