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

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

Issue 1412223008: stack: Adjust Pre-M Android incorrect debuggerd addresses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix options ordering issue, tidy printed file paths. Created 5 years, 1 month 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
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 ] 139 ]
140 else: 140 else:
141 known_toolchains = [] 141 known_toolchains = []
142 142
143 logging.debug('FindToolcahin: known_toolchains=%s' % known_toolchains) 143 logging.debug('FindToolcahin: known_toolchains=%s' % known_toolchains)
144 # Look for addr2line to check for valid toolchain path. 144 # Look for addr2line to check for valid toolchain path.
145 for (label, platform, target) in known_toolchains: 145 for (label, platform, target) in known_toolchains:
146 toolchain_info = (label, platform, target); 146 toolchain_info = (label, platform, target);
147 if os.path.exists(ToolPath("addr2line", toolchain_info)): 147 if os.path.exists(ToolPath("addr2line", toolchain_info)):
148 TOOLCHAIN_INFO = toolchain_info 148 TOOLCHAIN_INFO = toolchain_info
149 print "Using toolchain from :" + ToolPath("", TOOLCHAIN_INFO) 149 print ("Using toolchain from: "
150 + os.path.normpath(ToolPath("", TOOLCHAIN_INFO)))
150 return toolchain_info 151 return toolchain_info
151 152
152 raise Exception("Could not find tool chain") 153 raise Exception("Could not find tool chain")
153 154
154 def GetAapt(): 155 def GetAapt():
155 """Returns the path to aapt. 156 """Returns the path to aapt.
156 157
157 Args: 158 Args:
158 None 159 None
159 160
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 process.stdin.write("\n") 592 process.stdin.write("\n")
592 process.stdin.close() 593 process.stdin.close()
593 demangled_symbol = process.stdout.readline().strip() 594 demangled_symbol = process.stdout.readline().strip()
594 process.stdout.close() 595 process.stdout.close()
595 return demangled_symbol 596 return demangled_symbol
596 597
597 def FormatSymbolWithOffset(symbol, offset): 598 def FormatSymbolWithOffset(symbol, offset):
598 if offset == 0: 599 if offset == 0:
599 return symbol 600 return symbol
600 return "%s+%d" % (symbol, offset) 601 return "%s+%d" % (symbol, offset)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698