for (int i=0;i<=len;i++,d++) {
const void *u = a + d->bd_offset;
- printf("%s [type=$%04x, offset=$%04x]", x, d->bd_type, d->bd_offset);
-
+ printf("%s %-20s [type=$%04x, offset=$%04x]", x, d->bd_name, d->bd_type, d->bd_offset);
+
switch (d->bd_type) {
case EZ_BLOB_INT8:
printf(" .%d = %02x\n", d->bd_id, *(uint8_t *)u);
case EZ_BLOB_FLOAT64:
printf(" .%d = %f\n", d->bd_id, *(double *)u);
break;
-
+
case EZ_BLOB_STRUCT | EZ_BLOB_SINGLEP | EZ_BLOB_ISNULLABLE:
case EZ_BLOB_STRUCT | EZ_BLOB_SINGLEP:
u = *(void **)u;
const struct ez_blob *ua = u;
unsigned int elsize = 1 << (d->bd_type & EZ_BLOB_SIZE);
ez_blob blob = { .eb_size = ua->eb_size * elsize, .eb_data = ua->eb_data };
-
+
printf(" .%d %p [%zd x %d] = {\n", d->bd_id, ua->eb_data, ua->eb_size, elsize);
ez_blob_dump(&blob, x);
printf("%s }\n", x);
}
}
}
-