Skip to content

Commit

Permalink
Auto merge of rust-lang#78667 - pietroalbini:lldb-unbuffered, r=Mark-…
Browse files Browse the repository at this point in the history
…Simulacrum

Try running lldb_batchmode.py with PYTHONUNBUFFERED

When reporting fatal errors, LLVM calls abort() to exit the program. There is a chance that might interfere with Python printing stuff to stdout, as by default it relies on buffering to increase performance.

This commit tries to disable Python buffering, to hopefully get useful logs while debugging rust-lang#78665.
  • Loading branch information
bors committed Nov 2, 2020
2 parents 4051473 + 0af9f7e commit 499ebcf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,7 @@ impl<'test> TestCx<'test> {
.arg(&lldb_script_path)
.arg(test_executable)
.arg(debugger_script)
.env("PYTHONUNBUFFERED", "1") // Help debugging #78665
.env("PYTHONPATH", self.config.lldb_python_dir.as_ref().unwrap()),
)
}
Expand Down

0 comments on commit 499ebcf

Please sign in to comment.