aboutsummaryrefslogtreecommitdiff
path: root/thunk.c
diff options
context:
space:
mode:
Diffstat (limited to 'thunk.c')
-rw-r--r--thunk.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/thunk.c b/thunk.c
index c5d9719747..0718325d86 100644
--- a/thunk.c
+++ b/thunk.c
@@ -404,19 +404,24 @@ const argtype *thunk_print(void *arg, const argtype *type_ptr)
const int *arg_offsets;
se = struct_entries + *type_ptr++;
- a = arg;
- field_types = se->field_types;
- arg_offsets = se->field_offsets[0];
+ if (se->print != NULL) {
+ se->print(arg);
+ } else {
+ a = arg;
- qemu_log("{");
- for (i = 0; i < se->nb_fields; i++) {
- if (i > 0) {
- qemu_log(",");
+ field_types = se->field_types;
+ arg_offsets = se->field_offsets[0];
+
+ qemu_log("{");
+ for (i = 0; i < se->nb_fields; i++) {
+ if (i > 0) {
+ qemu_log(",");
+ }
+ field_types = thunk_print(a + arg_offsets[i], field_types);
}
- field_types = thunk_print(a + arg_offsets[i], field_types);
+ qemu_log("}");
}
- qemu_log("}");
}
break;
default: