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.
This commit is contained in:
Corey Farwell 2017-05-11 00:21:27 -04:00 committed by GitHub
commit 607320239f
1 changed files with 5 additions and 0 deletions

View File

@ -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",