Hi,
Антон Кочков anton.kochkov@gmail.com writes:
At first, can you please give us a few use cases for this patch?
inteltool: first preview for machine-readable output Signed-off-by: Anton Kochkov anton.kochkov@gmail.com
This is only for preview and discussion, it's still ugly and dont safe/clear.
void machine_readable_printf(reg_t *reg) {
#ifdef XML printf("<register domain='%s' base='0x%x' offset='0x%x' size='%d' value='0x%x' name='%s' description='%s' />\n", reg->domain, reg->base_addr, reg->offset, reg->size, reg->value, reg->name, reg->desc); #endif
That should probably be an #else, and it should be switchable during runtime instead of compile time.
#ifndef XML printf("domain: %s\n", reg->domain); printf("base addr: 0x%x\n", reg->base_addr); printf("offset: 0x%x\n", reg->offset); printf("size: %d\n", reg->size); printf("value: 0x%x\n", reg->value); printf("name: %s\n", reg->name); printf("description: %s\n", reg->desc); #endif }