#include <unistd.h>
-int _debug;
-
struct cmdline_args cmdargs = {
- .arch = 5,
- .informat = FMT_B43,
- .print_addresses = 0,
- .unknown_decode = 0,
+ .debug = 0,
+ .arch = 5,
+ .informat = FMT_B43,
+ .print_addresses = 0,
+ .unknown_decode = 0,
};
#define ARG_MATCH 0
} 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++;
+ cmdargs.debug++;
} else if ((res = cmp_arg(argv, &i, "--arch", "-a", ¶m)) == ARG_MATCH) {
unsigned long arch;
char *tail;
};
struct cmdline_args {
+ int debug; /* Debug level. */
unsigned int arch; /* The architecture we're disassembling. */
enum fwformat informat; /* The input file format. */
int print_addresses; /* Print a comment with instruction address. */
int open_output_file(void);
void close_output_file(void);
-extern int _debug;
extern struct cmdline_args cmdargs;
-#define IS_DEBUG (_debug > 0)
-#define IS_VERBOSE_DEBUG (_debug > 1)
-#define IS_INSANE_DEBUG (_debug > 2)
+#define IS_DEBUG (cmdargs.debug > 0)
+#define IS_VERBOSE_DEBUG (cmdargs.debug > 1)
+#define IS_INSANE_DEBUG (cmdargs.debug > 2)
#endif /* B43_DASM_ARGS_H_ */