| OLD | NEW | 
|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python | 
| 2 # | 2 # | 
| 3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 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 | 7 | 
| 8 import collections | 8 import collections | 
| 9 import optparse | 9 import optparse | 
| 10 import os | 10 import os | 
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 93   parser = optparse.OptionParser() | 93   parser = optparse.OptionParser() | 
| 94   parser.add_option('-l', '--logcat', | 94   parser.add_option('-l', '--logcat', | 
| 95                     help='File containing adb logcat output with ASan stacks. ' | 95                     help='File containing adb logcat output with ASan stacks. ' | 
| 96                          'Use stdin if not specified.') | 96                          'Use stdin if not specified.') | 
| 97   parser.add_option('--output-directory', | 97   parser.add_option('--output-directory', | 
| 98                     help='Path to the root build directory.') | 98                     help='Path to the root build directory.') | 
| 99   options, _ = parser.parse_args() | 99   options, _ = parser.parse_args() | 
| 100 | 100 | 
| 101   if options.output_directory: | 101   if options.output_directory: | 
| 102     constants.SetOutputDirectory(options.output_directory) | 102     constants.SetOutputDirectory(options.output_directory) | 
|  | 103   # Do an up-front test that the output directory is known. | 
|  | 104   constants.CheckOutputDirectory() | 
| 103 | 105 | 
| 104   if options.logcat: | 106   if options.logcat: | 
| 105     asan_input = file(options.logcat, 'r') | 107     asan_input = file(options.logcat, 'r') | 
| 106   else: | 108   else: | 
| 107     asan_input = sys.stdin | 109     asan_input = sys.stdin | 
| 108   _Symbolize(asan_input.readlines()) | 110   _Symbolize(asan_input.readlines()) | 
| 109 | 111 | 
| 110 | 112 | 
| 111 if __name__ == "__main__": | 113 if __name__ == "__main__": | 
| 112   sys.exit(main()) | 114   sys.exit(main()) | 
| OLD | NEW | 
|---|