25 fprintf(f,
"Register: %s\n", desc[0].name);
27 int shift =
ctz(desc[i].mask);
28 fprintf(f,
"\t%-16s: 0x%" PRIxreg "\n", desc[i].name,
29 (reg & desc[i].mask) >> shift);
32 if (!desc[*state].name)
Register description structure.
int fregdump_single(FILE *f, uintreg_t reg, const regdump_desc_t *desc, int *state)
Dump single line of register output to file.
void fregdump(FILE *f, uintreg_t reg, const regdump_desc_t *desc)
Dump the current register status to file.
void regdump(uintreg_t reg, const regdump_desc_t *desc)
Dump the current register status to stdout.
#define REGDUMP_STATE_VAR_INIT
Static initializer for re-entrancy state variable.
int regdump_single(uintreg_t reg, const regdump_desc_t *desc, int *state)
Dump single line of register output to stdout.