| OLD | NEW |
| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 ] | 141 ] |
| 142 else: | 142 else: |
| 143 known_toolchains = [] | 143 known_toolchains = [] |
| 144 | 144 |
| 145 logging.debug('FindToolcahin: known_toolchains=%s' % known_toolchains) | 145 logging.debug('FindToolcahin: known_toolchains=%s' % known_toolchains) |
| 146 # Look for addr2line to check for valid toolchain path. | 146 # Look for addr2line to check for valid toolchain path. |
| 147 for (label, platform, target) in known_toolchains: | 147 for (label, platform, target) in known_toolchains: |
| 148 toolchain_info = (label, platform, target); | 148 toolchain_info = (label, platform, target); |
| 149 if os.path.exists(ToolPath("addr2line", toolchain_info)): | 149 if os.path.exists(ToolPath("addr2line", toolchain_info)): |
| 150 TOOLCHAIN_INFO = toolchain_info | 150 TOOLCHAIN_INFO = toolchain_info |
| 151 print ("Using toolchain from: " | 151 print "Using toolchain from :" + ToolPath("", TOOLCHAIN_INFO) |
| 152 + os.path.normpath(ToolPath("", TOOLCHAIN_INFO))) | |
| 153 return toolchain_info | 152 return toolchain_info |
| 154 | 153 |
| 155 raise Exception("Could not find tool chain") | 154 raise Exception("Could not find tool chain") |
| 156 | 155 |
| 157 def GetAapt(): | 156 def GetAapt(): |
| 158 """Returns the path to aapt. | 157 """Returns the path to aapt. |
| 159 | 158 |
| 160 Args: | 159 Args: |
| 161 None | 160 None |
| 162 | 161 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 process.stdin.write("\n") | 605 process.stdin.write("\n") |
| 607 process.stdin.close() | 606 process.stdin.close() |
| 608 demangled_symbol = process.stdout.readline().strip() | 607 demangled_symbol = process.stdout.readline().strip() |
| 609 process.stdout.close() | 608 process.stdout.close() |
| 610 return demangled_symbol | 609 return demangled_symbol |
| 611 | 610 |
| 612 def FormatSymbolWithOffset(symbol, offset): | 611 def FormatSymbolWithOffset(symbol, offset): |
| 613 if offset == 0: | 612 if offset == 0: |
| 614 return symbol | 613 return symbol |
| 615 return "%s+%d" % (symbol, offset) | 614 return "%s+%d" % (symbol, offset) |
| OLD | NEW |