projects
/
b43-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fwcutter: Update copyright information
[b43-tools.git]
/
disassembler
/
args.c
diff --git
a/disassembler/args.c
b/disassembler/args.c
index 3663c59f1aabb183bfed7cadb2baa0802ea69999..a10c078cd14fd73789aef43cf2213e25629d24f1 100644
(file)
--- a/
disassembler/args.c
+++ b/
disassembler/args.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2006-2007 Michael Buesch <m
b@bu3sch.de
>
+ * Copyright (C) 2006-2007 Michael Buesch <m
@bues.ch
>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@
-22,12
+22,12
@@
#include <unistd.h>
#include <unistd.h>
-int _debug;
-
struct cmdline_args cmdargs = {
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. */
+ .debug = 0,
+ .arch = 5,
+ .informat = FMT_B43,
+ .print_addresses = 0,
+ .unknown_decode = 0,
};
#define ARG_MATCH 0
};
#define ARG_MATCH 0
@@
-100,9
+100,10
@@
static void usage(FILE *fd, int argc, char **argv)
{
fprintf(fd, "Usage: %s INPUT_FILE OUTPUT_FILE [OPTIONS]\n", argv[0]);
fprintf(fd, " -a|--arch ARCH The architecture type of the input file (5 or 15)\n");
{
fprintf(fd, "Usage: %s INPUT_FILE OUTPUT_FILE [OPTIONS]\n", argv[0]);
fprintf(fd, " -a|--arch ARCH The architecture type of the input file (5 or 15)\n");
- fprintf(fd, " -f|--format FMT Input file format. FMT m
ay
be one of:\n");
+ fprintf(fd, " -f|--format FMT Input file format. FMT m
ust
be one of:\n");
fprintf(fd, " raw-le32, raw-be32, b43\n");
fprintf(fd, " raw-le32, raw-be32, b43\n");
- fprintf(fd, " --paddr Print the code addresses\n");
+ fprintf(fd, " -p|--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");
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");
@@
-132,10
+133,12
@@
int parse_args(int argc, char **argv)
fprintf(stderr, "Invalid -f|--format\n");
return -1;
}
fprintf(stderr, "Invalid -f|--format\n");
return -1;
}
- } else if ((res = cmp_arg(argv, &i, "--paddr",
NULL
, NULL)) == ARG_MATCH) {
+ } else if ((res = cmp_arg(argv, &i, "--paddr",
"-p"
, NULL)) == ARG_MATCH) {
cmdargs.print_addresses = 1;
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) {
} else if ((res = cmp_arg(argv, &i, "--debug", "-d", NULL)) == ARG_MATCH) {
-
_
debug++;
+
cmdargs.
debug++;
} else if ((res = cmp_arg(argv, &i, "--arch", "-a", ¶m)) == ARG_MATCH) {
unsigned long arch;
char *tail;
} else if ((res = cmp_arg(argv, &i, "--arch", "-a", ¶m)) == ARG_MATCH) {
unsigned long arch;
char *tail;