Make locals debug printing configurable.

This commit is contained in:
Scott Olson 2016-10-16 21:08:45 -06:00
parent 6503148589
commit f5c0a24bb0

View File

@ -1503,7 +1503,11 @@ pub fn eval_main<'a, 'tcx: 'a>(
for _ in 0..step_limit {
match ecx.step() {
Ok(true) => {
ecx.dump_locals(5);
use std::env::var;
let limit_opt = var("MIRI_LOG_LOCALS_LIMIT").ok().and_then(|s| s.parse().ok());
if let Some(limit) = limit_opt {
ecx.dump_locals(limit);
}
}
Ok(false) => return,
Err(e) => {