| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 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 """ | 6 """ |
| 7 Dumps a list of files with static initializers. Use with release builds. | 7 Dumps a list of files with static initializers. Use with release builds. |
| 8 | 8 |
| 9 Usage: | 9 Usage: |
| 10 tools/mac/dump-static-initializers.py out/Release/Chromium\ Framework.framewor
k.dSYM/Contents/Resources/DWARF/Chromium\ Framework | 10 tools/mac/dump-static-initializers.py out/Release/Chromium\ Framework.framewor
k.dSYM/Contents/Resources/DWARF/Chromium\ Framework |
| 11 | 11 |
| 12 Do NOT use mac_strip_release=0 or component=shared_library if you want to use | 12 Do NOT use mac_strip_release=0 or component=shared_library if you want to use |
| 13 this script. | 13 this script. |
| 14 |
| 15 This is meant to be used on a dSYM file. If only an unstripped executable is |
| 16 present, use show_mod_init_func.py. |
| 14 """ | 17 """ |
| 15 | 18 |
| 16 import optparse | 19 import optparse |
| 17 import re | 20 import re |
| 18 import subprocess | 21 import subprocess |
| 19 import sys | 22 import sys |
| 20 | 23 |
| 21 # Matches for example: | 24 # Matches for example: |
| 22 # [ 1] 000001ca 64 (N_SO ) 00 0000 0000000000000000 'test.cc' | 25 # [ 1] 000001ca 64 (N_SO ) 00 0000 0000000000000000 'test.cc' |
| 23 dsymutil_file_re = re.compile("N_SO.*'([^']*)'") | 26 dsymutil_file_re = re.compile("N_SO.*'([^']*)'") |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 parser.error('missing filename argument') | 63 parser.error('missing filename argument') |
| 61 return 1 | 64 return 1 |
| 62 binary = args[0] | 65 binary = args[0] |
| 63 | 66 |
| 64 ParseDsymutil(binary) | 67 ParseDsymutil(binary) |
| 65 return 0 | 68 return 0 |
| 66 | 69 |
| 67 | 70 |
| 68 if '__main__' == __name__: | 71 if '__main__' == __name__: |
| 69 sys.exit(main()) | 72 sys.exit(main()) |
| OLD | NEW |