| Index: build/android/asan_symbolize.py
|
| diff --git a/build/android/asan_symbolize.py b/build/android/asan_symbolize.py
|
| index 928798f5e524cc9621be3ac8868e4593f608674a..1f2968ff2da3e1a038bad906d5a10786e9b92987 100755
|
| --- a/build/android/asan_symbolize.py
|
| +++ b/build/android/asan_symbolize.py
|
| @@ -52,18 +52,17 @@ def _TranslateLibPath(library, asan_libs):
|
| return symbol.TranslateLibPath(library)
|
|
|
|
|
| -def _Symbolize(input):
|
| +def _Symbolize(asan_input):
|
| asan_libs = _FindASanLibraries()
|
| libraries = collections.defaultdict(list)
|
| asan_lines = []
|
| - for asan_log_line in [a.strip() for a in input]:
|
| + for asan_log_line in [a.strip() for a in asan_input]:
|
| m = _ParseAsanLogLine(asan_log_line)
|
| if m:
|
| libraries[m['library']].append(m)
|
| asan_lines.append({'raw_log': asan_log_line, 'parsed': m})
|
|
|
| all_symbols = collections.defaultdict(dict)
|
| - original_symbols_dir = symbol.SYMBOLS_DIR
|
| for library, items in libraries.iteritems():
|
| libname = _TranslateLibPath(library, asan_libs)
|
| lib_relative_addrs = set([i['rel_address'] for i in items])
|
| @@ -91,12 +90,12 @@ def main():
|
| parser.add_option('-l', '--logcat',
|
| help='File containing adb logcat output with ASan stacks. '
|
| 'Use stdin if not specified.')
|
| - options, args = parser.parse_args()
|
| + options, _ = parser.parse_args()
|
| if options.logcat:
|
| - input = file(options.logcat, 'r')
|
| + asan_input = file(options.logcat, 'r')
|
| else:
|
| - input = sys.stdin
|
| - _Symbolize(input.readlines())
|
| + asan_input = sys.stdin
|
| + _Symbolize(asan_input.readlines())
|
|
|
|
|
| if __name__ == "__main__":
|
|
|