Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2133)

Unified Diff: build/android/asan_symbolize.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/adb_profile_chrome.py ('k') | build/android/avd.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/asan_symbolize.py
diff --git a/build/android/asan_symbolize.py b/build/android/asan_symbolize.py
index 10087a637ae5241617364f6d50a1f0345a7316ca..0504aa23aec0d86b793edeeca09c5d48a0a61fbe 100755
--- a/build/android/asan_symbolize.py
+++ b/build/android/asan_symbolize.py
@@ -53,17 +53,18 @@ def _TranslateLibPath(library, asan_libs):
return symbol.TranslateLibPath(library)
-def _Symbolize(asan_input):
+def _Symbolize(input):
asan_libs = _FindASanLibraries()
libraries = collections.defaultdict(list)
asan_lines = []
- for asan_log_line in [a.rstrip() for a in asan_input]:
+ for asan_log_line in [a.rstrip() for a in 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])
@@ -81,7 +82,7 @@ def _Symbolize(asan_input):
if (m['library'] in all_symbols and
m['rel_address'] in all_symbols[m['library']]['symbols']):
s = all_symbols[m['library']]['symbols'][m['rel_address']][0]
- print '%s%s %s %s' % (m['prefix'], m['pos'], s[0], s[1])
+ print '%s%s %s %s' %(m['prefix'], m['pos'], s[0], s[1])
else:
print asan_log_line['raw_log']
@@ -91,12 +92,12 @@ def main():
parser.add_option('-l', '--logcat',
help='File containing adb logcat output with ASan stacks. '
'Use stdin if not specified.')
- options, _ = parser.parse_args()
+ options, args = parser.parse_args()
if options.logcat:
- asan_input = file(options.logcat, 'r')
+ input = file(options.logcat, 'r')
else:
- asan_input = sys.stdin
- _Symbolize(asan_input.readlines())
+ input = sys.stdin
+ _Symbolize(input.readlines())
if __name__ == "__main__":
« no previous file with comments | « build/android/adb_profile_chrome.py ('k') | build/android/avd.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698