args.h 929 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef B43_DASM_ARGS_H_
  2. #define B43_DASM_ARGS_H_
  3. enum fwformat {
  4. FMT_RAW_LE32, /* Raw microcode. No headers. 32bit little endian chunks. */
  5. FMT_RAW_BE32, /* Raw microcode. No headers. 32bit big endian chunks. */
  6. FMT_B43, /* b43/b43legacy headers. */
  7. };
  8. struct cmdline_args {
  9. int debug; /* Debug level. */
  10. unsigned int arch; /* The architecture we're disassembling. */
  11. enum fwformat informat; /* The input file format. */
  12. int print_addresses; /* Print a comment with instruction address. */
  13. int unknown_decode; /* Decode operands of unknown instructions. */
  14. };
  15. int parse_args(int argc, char **argv);
  16. int open_input_file(void);
  17. void close_input_file(void);
  18. int open_output_file(void);
  19. void close_output_file(void);
  20. extern struct cmdline_args cmdargs;
  21. #define IS_DEBUG (cmdargs.debug > 0)
  22. #define IS_VERBOSE_DEBUG (cmdargs.debug > 1)
  23. #define IS_INSANE_DEBUG (cmdargs.debug > 2)
  24. #endif /* B43_DASM_ARGS_H_ */