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

Side by Side Diff: third_party/android_platform/development/scripts/symbol.py

Issue 1175033002: Ignore files with non-sane filenames in the Android stack symbolizing tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: readme Created 5 years, 6 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 | « third_party/android_platform/README.chromium ('k') | no next file » | 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/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (C) 2013 The Android Open Source Project 3 # Copyright (C) 2013 The Android Open Source Project
4 # 4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License. 6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at 7 # You may obtain a copy of the License at
8 # 8 #
9 # http://www.apache.org/licenses/LICENSE-2.0 9 # http://www.apache.org/licenses/LICENSE-2.0
10 # 10 #
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 445
446 If the function has been inlined then the list may contain 446 If the function has been inlined then the list may contain
447 more than one element with the symbols for the most deeply 447 more than one element with the symbols for the most deeply
448 nested inlined location appearing first. 448 nested inlined location appearing first.
449 """ 449 """
450 if not lib: 450 if not lib:
451 return None 451 return None
452 452
453 453
454 symbols = SYMBOLS_DIR + lib 454 symbols = SYMBOLS_DIR + lib
455 if not os.path.splitext(symbols) in ['', '.so', '.apk']:
Primiano Tucci (use gerrit) 2015/06/10 17:37:19 Hmm I think you want [1] here, this is going to sk
Bernhard Bauer 2015/06/10 17:40:03 Durrr. Indeed! Done.
456 return None
457
455 if not os.path.isfile(symbols): 458 if not os.path.isfile(symbols):
456 return None 459 return None
457 460
458 (label, platform, target) = FindToolchain() 461 (label, platform, target) = FindToolchain()
459 cmd = [ToolPath("addr2line"), "--functions", "--inlines", 462 cmd = [ToolPath("addr2line"), "--functions", "--inlines",
460 "--demangle", "--exe=" + symbols] 463 "--demangle", "--exe=" + symbols]
461 child = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) 464 child = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
462 465
463 result = {} 466 result = {}
464 addrs = sorted(unique_addrs) 467 addrs = sorted(unique_addrs)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 process.stdin.write("\n") 595 process.stdin.write("\n")
593 process.stdin.close() 596 process.stdin.close()
594 demangled_symbol = process.stdout.readline().strip() 597 demangled_symbol = process.stdout.readline().strip()
595 process.stdout.close() 598 process.stdout.close()
596 return demangled_symbol 599 return demangled_symbol
597 600
598 def FormatSymbolWithOffset(symbol, offset): 601 def FormatSymbolWithOffset(symbol, offset):
599 if offset == 0: 602 if offset == 0:
600 return symbol 603 return symbol
601 return "%s+%d" % (symbol, offset) 604 return "%s+%d" % (symbol, offset)
OLDNEW
« no previous file with comments | « third_party/android_platform/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698