type="int", dest="force_hardware", help="Force the hardware detection") parser.add_option( "", "--force-version", type="int", dest="force_hardware_version", help="Force the hardware detection to a specific hardware version") parser.add_option("", "--parse-qdss", action="store_true", dest="qdss", help="Parse QDSS (deprecated)") for p in parser_util.get_parsers(): parser.add_option(p.shortopt or "", p.longopt, dest=p.cls.__name__, help=p.desc, action="store_true") (options, args) = parser.parse_args() if options.outdir: if not os.path.exists(options.outdir): print("!!! Out directory does not exist. Create it first.") sys.exit(1) else: options.outdir = "."
parser.add_option("-e", "--ram-file", dest="ram_addr", help="List of ram files (name, start, end)", action="callback", callback=parse_ram_file) parser.add_option("-v", "--vmlinux", dest="vmlinux", help="vmlinux path") parser.add_option("-n", "--nm-path", dest="nm", help="nm path") parser.add_option("-g", "--gdb-path", dest="gdb", help="gdb path") parser.add_option("-a", "--auto-dump", dest="autodump", help="Auto find ram dumps from the path") parser.add_option("-o", "--outdir", dest="outdir", help="Output directory") parser.add_option("-s", "--t32launcher", action="store_true", dest="t32launcher", help="Create T32 simulator launcher", default=False) parser.add_option("-x", "--everything", action="store_true", dest="everything", help="Output everything (may be slow") parser.add_option("-f", "--output-file", dest="outfile", help="Name of file to save output") parser.add_option("", "--stdout", action="store_true", dest="stdout", help="Dump to stdout instead of the file") parser.add_option("", "--phys-offset", type="int", dest="phys_offset", help="use custom phys offset") parser.add_option("", "--force-hardware", type="int", dest="force_hardware", help="Force the hardware detection") parser.add_option("", "--force-version", type="int", dest="force_hardware_version", help="Force the hardware detection to a specific hardware version") parser.add_option("", "--parse-qdss", action="store_true", dest="qdss", help="Parse QDSS (deprecated)") for p in parser_util.get_parsers(): parser.add_option(p.shortopt or "", p.longopt, dest=p.cls.__name__, help=p.desc, action="store_true") (options, args) = parser.parse_args() if options.outdir : if not os.path.exists(options.outdir) : print ("!!! Out directory does not exist. Create it first.") sys.exit(1) else : options.outdir = "."
parser.add_option('', '--wlan', dest='wlan', help='wlan.ko path') parser.add_option('', '--minidump', action='store_true', dest='minidump', help='Parse minidump') parser.add_option('', '--ram-elf', dest='ram_elf_addr', help='pass ap_minidump.elf generated by crashscope') parser.add_option('', '--sym_path', dest='sym_path', help='symbol path to all loadable modules') for p in parser_util.get_parsers(): parser.add_option(p.shortopt or '', p.longopt, dest=p.cls.__name__, help=p.desc, action='store_true') (options, args) = parser.parse_args() if options.minidump: default_list = [] default_list.append("Dmesg") default_list.append("RTB") default_list.append("DebugImage") if options.outdir: if not os.path.exists(options.outdir):
help='QTF tool executable') parser.add_option('', '--ipc-help', dest='ipc_help', help='Help for IPC Logging', action='store_true', default=False) parser.add_option('', '--ipc-test', dest='ipc_test', help='List of test files for the IPC Logging test command (name1, name2, ..., nameN, <version>)', action='append', default=[]) parser.add_option('', '--ipc-skip', dest='ipc_skip', action='store_true', help='Skip IPC Logging when parsing everything', default=False) parser.add_option('', '--ipc-debug', dest='ipc_debug', action='store_true', help='Debug Mode for IPC Logging', default=False) parser.add_option('', '--eval', help='Evaluate some python code directly, or from stdin if "-" is passed. The "dump" variable will be available, as it is with the --shell option.') # noqa for p in parser_util.get_parsers(): parser.add_option(p.shortopt or '', p.longopt, dest=p.cls.__name__, help=p.desc, action='store_true') (options, args) = parser.parse_args() if options.outdir: if not os.path.exists(options.outdir): print ('!!! Out directory does not exist. Creating...') try: os.makedirs(options.outdir) except: print ("Failed to create %s. You probably don't have permissions there. Bailing." % options.outdir)
'', '--force-version', type='int', dest='force_hardware_version', help='Force the hardware detection to a specific hardware version') parser.add_option('', '--parse-qdss', action='store_true', dest='qdss', help='Parse QDSS (deprecated)') parser.add_option('', '--64-bit', action='store_true', dest='arm64', help='Parse dumps as 64-bit dumps') parser.add_option('', '--shell', action='store_true', help='Run an interactive python interpreter with the ramdump loaded') parser.add_option('', '--classic-shell', action='store_true', help='Like --shell, but forces the use of the classic python shell, even if ipython is installed') parser.add_option('', '--qtf', action='store_true', dest='qtf', help='Use QTF tool to parse and save QDSS trace data') parser.add_option('', '--qtf-path', dest='qtf_path', help='QTF tool executable') for p in parser_util.get_parsers(): parser.add_option(p.shortopt or '', p.longopt, dest=p.cls.__name__, help=p.desc, action='store_true') (options, args) = parser.parse_args() if options.outdir: if not os.path.exists(options.outdir): print ('!!! Out directory does not exist. Creating...') try: os.makedirs(options.outdir) except: print ("Failed to create %s. You probably don't have permissions there. Bailing." % options.outdir)