Skip to content

Commit 3640f79

Browse files
committed
compiletest: support for newer lldb versions
Newer lldb versions disable printing of persistent results by default, but lots of rustc debuginfo tests rely on these being printed, so re-enable this by defining an alias as suggested by the patch which disabled persistent result printing in lldb. Signed-off-by: David Wood <[email protected]>
1 parent 41cb42a commit 3640f79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/tools/compiletest/src/runtest.rs

+9
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,15 @@ impl<'test> TestCx<'test> {
14301430
"^core::num::([a-z_]+::)*NonZero.+$",
14311431
];
14321432

1433+
// In newer versions of lldb, persistent results (the `$N =` part at the start of
1434+
// expressions you have evaluated that let you re-use the result) aren't printed, but lots
1435+
// of rustc's debuginfo tests rely on these, so re-enable this.
1436+
// See <https://reviews.llvm.org/rG385496385476fc9735da5fa4acabc34654e8b30d>.
1437+
script_str.push_str("command unalias print\n");
1438+
script_str.push_str("command alias print expr --\n");
1439+
script_str.push_str("command unalias p\n");
1440+
script_str.push_str("command alias p expr --\n");
1441+
14331442
script_str
14341443
.push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[..])[..]);
14351444
script_str.push_str("type synthetic add -l lldb_lookup.synthetic_lookup -x '.*' ");

0 commit comments

Comments
 (0)