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

Side by Side Diff: build/android/symbolize.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « build/android/screenshot.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 """Symbolizes stack traces generated by Chromium for Android. 7 """Symbolizes stack traces generated by Chromium for Android.
8 8
9 Sample usage: 9 Sample usage:
10 adb logcat chromium:V | symbolize.py 10 adb logcat chromium:V | symbolize.py
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 # calling out to addr2line each time. 48 # calling out to addr2line each time.
49 # 2) Have Python keep multiple addr2line instances open as subprocesses, 49 # 2) Have Python keep multiple addr2line instances open as subprocesses,
50 # piping addresses and reading back symbols as we find them 50 # piping addresses and reading back symbols as we find them
51 # 3) Read ahead the entire stack trace until we find no more, then batch 51 # 3) Read ahead the entire stack trace until we find no more, then batch
52 # the symbol lookups. 52 # the symbol lookups.
53 # 53 #
54 # TODO(scherkus): These results are memoized, which could result in 54 # TODO(scherkus): These results are memoized, which could result in
55 # incorrect lookups when running this script on long-lived instances 55 # incorrect lookups when running this script on long-lived instances
56 # (e.g., adb logcat) when doing incremental development. Consider clearing 56 # (e.g., adb logcat) when doing incremental development. Consider clearing
57 # the cache when modification timestamp of libraries change. 57 # the cache when modification timestamp of libraries change.
58 # pylint: disable=no-member
58 sym = symbol.SymbolInformation(lib, addr, False)[0][0] 59 sym = symbol.SymbolInformation(lib, addr, False)[0][0]
59 60
60 if not sym: 61 if not sym:
61 post = match.end('addr') 62 post = match.end('addr')
62 self._output.write(data[:post]) 63 self._output.write(data[:post])
63 data = data[post:] 64 data = data[post:]
64 continue 65 continue
65 66
66 pre = match.start('frame') 67 pre = match.start('frame')
67 post = match.end('addr') 68 post = match.end('addr')
(...skipping 11 matching lines...) Expand all
79 80
80 def main(): 81 def main():
81 symbolizer = Symbolizer(sys.stdout) 82 symbolizer = Symbolizer(sys.stdout)
82 for line in sys.stdin: 83 for line in sys.stdin:
83 symbolizer.write(line) 84 symbolizer.write(line)
84 symbolizer.flush() 85 symbolizer.flush()
85 86
86 87
87 if __name__ == '__main__': 88 if __name__ == '__main__':
88 main() 89 main()
OLDNEW
« no previous file with comments | « build/android/screenshot.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698