OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 from third_party import asan_symbolize | 7 from third_party import asan_symbolize |
8 | 8 |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 24 matching lines...) Expand all Loading... |
35 """Makes this process and child processes stdout unbuffered.""" | 35 """Makes this process and child processes stdout unbuffered.""" |
36 if not os.environ.get('PYTHONUNBUFFERED'): | 36 if not os.environ.get('PYTHONUNBUFFERED'): |
37 # Since sys.stdout is a C++ object, it's impossible to do | 37 # Since sys.stdout is a C++ object, it's impossible to do |
38 # sys.stdout.write = lambda... | 38 # sys.stdout.write = lambda... |
39 sys.stdout = LineBuffered(sys.stdout) | 39 sys.stdout = LineBuffered(sys.stdout) |
40 os.environ['PYTHONUNBUFFERED'] = 'x' | 40 os.environ['PYTHONUNBUFFERED'] = 'x' |
41 | 41 |
42 | 42 |
43 def main(): | 43 def main(): |
44 disable_buffering() | 44 disable_buffering() |
45 asan_symbolize.demangle = True | |
46 loop = asan_symbolize.SymbolizationLoop(binary_name_filter=fix_filename) | 45 loop = asan_symbolize.SymbolizationLoop(binary_name_filter=fix_filename) |
47 loop.process_stdin() | 46 loop.process_stdin() |
48 | 47 |
49 if __name__ == '__main__': | 48 if __name__ == '__main__': |
50 main() | 49 main() |
OLD | NEW |