X-Git-Url: https://jxself.org/git/?p=b43-tools.git;a=blobdiff_plain;f=disassembler%2Fargs.c;h=45a39b0266fbf8774f762ce84521060eff6f3041;hp=7fc2978296cf7ff1f9d6c6303c7c73ea694eee63;hb=818c430fb65cc84d9fa2b1ef3808fa57ac5692f6;hpb=1a8718d7ef605cdbcd19965317f5758f1a8d5f1d diff --git a/disassembler/args.c b/disassembler/args.c index 7fc2978..45a39b0 100644 --- a/disassembler/args.c +++ b/disassembler/args.c @@ -25,9 +25,10 @@ int _debug; struct cmdline_args cmdargs = { - .arch = 5, /* Default to v5 architecture. */ - .informat = FMT_B43, /* Input file format */ - .print_addresses = 0, /* Print the code addresses in the output. */ + .arch = 5, + .informat = FMT_B43, + .print_addresses = 0, + .unknown_decode = 0, }; #define ARG_MATCH 0 @@ -103,6 +104,7 @@ static void usage(FILE *fd, int argc, char **argv) fprintf(fd, " -f|--format FMT Input file format. FMT must be one of:\n"); fprintf(fd, " raw-le32, raw-be32, b43\n"); fprintf(fd, " --paddr Print the code addresses\n"); + fprintf(fd, " -u|--unkdec Decode operands of unknown instructions\n"); fprintf(fd, " -d|--debug Print verbose debugging info\n"); fprintf(fd, " Repeat for more verbose debugging\n"); fprintf(fd, " -h|--help Print this help\n"); @@ -134,6 +136,8 @@ int parse_args(int argc, char **argv) } } else if ((res = cmp_arg(argv, &i, "--paddr", NULL, NULL)) == ARG_MATCH) { cmdargs.print_addresses = 1; + } else if ((res = cmp_arg(argv, &i, "--unkdec", "-u", NULL)) == ARG_MATCH) { + cmdargs.unknown_decode = 1; } else if ((res = cmp_arg(argv, &i, "--debug", "-d", NULL)) == ARG_MATCH) { _debug++; } else if ((res = cmp_arg(argv, &i, "--arch", "-a", ¶m)) == ARG_MATCH) {