diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-05-11 00:21:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-11 00:21:27 -0400 |
| commit | 607320239f3f0df0229b8ae7ab4e894a29097a9d (patch) | |
| tree | 5bba217dc0a9389c1a035e3a80d7cc13c06d9cb1 | |
| parent | 4ad75b317f8672f62ca7abcc9bdb33a0d71476fe (diff) | |
| parent | d23a65077add9da538e7ba2c2d3c3baae7a8597e (diff) | |
| download | rust-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.rs | 5 |
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", |
