about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-05-11 00:21:27 -0400
committerGitHub <noreply@github.com>2017-05-11 00:21:27 -0400
commit607320239f3f0df0229b8ae7ab4e894a29097a9d (patch)
tree5bba217dc0a9389c1a035e3a80d7cc13c06d9cb1
parent4ad75b317f8672f62ca7abcc9bdb33a0d71476fe (diff)
parentd23a65077add9da538e7ba2c2d3c3baae7a8597e (diff)
downloadrust-607320239f3f0df0229b8ae7ab4e894a29097a9d.tar.gz
rust-607320239f3f0df0229b8ae7ab4e894a29097a9d.zip
Rollup merge of #41877 - eddyb:gdb-force-rust, r=michaelwoerister
compiletest: force GDB to print values in the Rust format.

Based on @nodakai's https://github.com/rust-lang/rust/issues/40557#issuecomment-294368330 and @infinity0's https://github.com/rust-lang/rust/issues/40557#issuecomment-300133591.
Fixes #40557.
-rw-r--r--src/tools/compiletest/src/runtest.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index a044282666d..461cb59bf7d 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -647,6 +647,11 @@ actual:\n\
                                              exe_file.to_str().unwrap()
                                              .replace(r"\", r"\\")));
 
+                // Force GDB to print values in the Rust format.
+                if self.config.gdb_native_rust {
+                    script_str.push_str("set language rust\n");
+                }
+
                 // Add line breakpoints
                 for line in &breakpoint_lines {
                     script_str.push_str(&format!("break '{}':{}\n",