(argv)
| 281 | |
| 282 | |
| 283 | def main(argv): |
| 284 | parser = optparse.OptionParser(usage='%prog [options] [<file>]') |
| 285 | parser.add_option('--no-functions', help='Don\'t print function names', |
| 286 | dest='printFunctions', action='store_false', |
| 287 | default=True) |
| 288 | parser.add_option('--no-demangle', |
| 289 | help='Don\'t demangle C++ symbol names', |
| 290 | dest='cxxfilt', action='store_false', |
| 291 | default=True) |
| 292 | |
| 293 | (options, args) = parser.parse_args(argv[1:]) |
| 294 | num_args = len(args) |
| 295 | if num_args == 0: |
| 296 | in_file = sys.stdin |
| 297 | elif num_args == 1: |
| 298 | in_file = open(argv[1], 'r') |
| 299 | else: |
| 300 | parser.print_usage(sys.stderr) |
| 301 | print >> sys.stderr, 'trailing arguments: %s' % (' '.join(args[1:],)) |
| 302 | return 1 |
| 303 | |
| 304 | if options.cxxfilt: |
| 305 | start_cppfilt() |
| 306 | |
| 307 | process_file(in_file, sys.stdout, options) |
| 308 | |
| 309 | |
| 310 | if __name__ == '__main__': |
no test coverage detected