| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """A tool to generate symbols for a binary suitable for breakpad. | 6 """A tool to generate symbols for a binary suitable for breakpad. |
| 7 | 7 |
| 8 Currently, the tool only supports Linux, Android, and Mac. Support for other | 8 Currently, the tool only supports Linux, Android, and Mac. Support for other |
| 9 platforms is planned. | 9 platforms is planned. |
| 10 """ | 10 """ |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 run_once = True | 168 run_once = True |
| 169 while run_once: | 169 while run_once: |
| 170 run_once = False | 170 run_once = False |
| 171 | 171 |
| 172 if not dump_syms: | 172 if not dump_syms: |
| 173 should_dump_syms = False | 173 should_dump_syms = False |
| 174 reason = "Could not locate dump_syms executable." | 174 reason = "Could not locate dump_syms executable." |
| 175 break | 175 break |
| 176 | 176 |
| 177 binary_info = GetBinaryInfoFromHeaderInfo( | 177 binary_info = GetBinaryInfoFromHeaderInfo( |
| 178 GetCommandOutput([dump_syms, '-i', binary])) | 178 GetCommandOutput([dump_syms, '-i', binary]).splitlines()[0]) |
| 179 if not binary_info: | 179 if not binary_info: |
| 180 should_dump_syms = False | 180 should_dump_syms = False |
| 181 reason = "Could not obtain binary information." | 181 reason = "Could not obtain binary information." |
| 182 break | 182 break |
| 183 | 183 |
| 184 # See if the output file already exists. | 184 # See if the output file already exists. |
| 185 output_path = os.path.join(options.symbols_dir, binary_info.name, | 185 output_path = os.path.join(options.symbols_dir, binary_info.name, |
| 186 binary_info.hash, binary_info.name + '.sym') | 186 binary_info.hash, binary_info.name + '.sym') |
| 187 if os.path.isfile(output_path): | 187 if os.path.isfile(output_path): |
| 188 should_dump_syms = False | 188 should_dump_syms = False |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 binaries |= new_deps | 288 binaries |= new_deps |
| 289 queue.extend(list(new_deps)) | 289 queue.extend(list(new_deps)) |
| 290 | 290 |
| 291 GenerateSymbols(options, binaries) | 291 GenerateSymbols(options, binaries) |
| 292 | 292 |
| 293 return 0 | 293 return 0 |
| 294 | 294 |
| 295 | 295 |
| 296 if '__main__' == __name__: | 296 if '__main__' == __name__: |
| 297 sys.exit(main()) | 297 sys.exit(main()) |
| OLD | NEW |