} SIDE_PACKED;
struct side_type_byte {
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_type_string {
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
uint8_t unit_size; /* 1, 2, or 4 bytes */
uint8_t byte_order; /* enum side_type_label_byte_order */
} SIDE_PACKED;
struct side_type_integer {
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
uint16_t integer_size; /* bytes */
uint16_t len_bits; /* bits. 0 for (integer_size * CHAR_BITS) */
} SIDE_PACKED;
struct side_type_float {
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
uint16_t float_size; /* bytes */
uint8_t byte_order; /* enum side_type_label_byte_order */
struct side_enum_mappings {
const struct side_enum_mapping *mappings;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_mappings;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_enum_bitmap_mappings {
const struct side_enum_bitmap_mapping *mappings;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_mappings;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_type_struct {
const struct side_event_field *fields;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_fields;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_type_array {
const struct side_type *elem_type;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t length;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_type_vla {
const struct side_type *elem_type;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_type_vla_visitor {
const struct side_type *elem_type;
side_visitor_func visitor;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_type_variant {
const struct side_type selector;
const struct side_variant_option *options;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_options;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_arg_dynamic_vla {
const struct side_arg *sav;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t len;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_arg_dynamic_struct {
const struct side_arg_dynamic_field *fields;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t len;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_dynamic_struct_visitor {
void *app_ctx;
side_dynamic_struct_visitor_func visitor;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
} SIDE_PACKED;
struct side_dynamic_vla_visitor {
void *app_ctx;
side_visitor_func visitor;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint32_t nr_attr;
} SIDE_PACKED;
const char *provider_name;
const char *event_name;
const struct side_event_field *fields;
- const struct side_attr *attr;
+ side_ptr_t(const struct side_attr) attr;
uint64_t flags;
uint32_t version;
uint32_t loglevel; /* enum side_loglevel */
#define side_define_enum(_identifier, _mappings, _attr...) \
const struct side_enum_mappings _identifier = { \
.mappings = _mappings, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_mappings = SIDE_ARRAY_SIZE(SIDE_PARAM(_mappings)), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}
#define side_define_enum_bitmap(_identifier, _mappings, _attr...) \
const struct side_enum_bitmap_mappings _identifier = { \
.mappings = _mappings, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_mappings = SIDE_ARRAY_SIZE(SIDE_PARAM(_mappings)), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}
.type = SIDE_TYPE_BYTE, \
.u = { \
.side_byte = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
}, \
.type = _type, \
.u = { \
.side_string = { \
- .attr = _attr, \
+ .attr = SIDE_PTR_INIT(_attr), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
.unit_size = _unit_size, \
.byte_order = _byte_order, \
.type = _type, \
.u = { \
.side_integer = { \
- .attr = _attr, \
+ .attr = SIDE_PTR_INIT(_attr), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
.integer_size = _integer_size, \
.len_bits = _len_bits, \
.type = _type, \
.u = { \
.side_float = { \
- .attr = _attr, \
+ .attr = SIDE_PTR_INIT(_attr), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
.float_size = _float_size, \
.byte_order = _byte_order, \
#define _side_type_struct_define(_fields, _attr) \
{ \
.fields = _fields, \
- .attr = _attr, \
+ .attr = SIDE_PTR_INIT(_attr), \
.nr_fields = SIDE_ARRAY_SIZE(SIDE_PARAM(_fields)), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
}
{ \
.selector = _selector, \
.options = _options, \
- .attr = _attr, \
+ .attr = SIDE_PTR_INIT(_attr), \
.nr_options = SIDE_ARRAY_SIZE(SIDE_PARAM(_options)), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
}
.u = { \
.side_array = { \
.elem_type = _elem_type, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.length = _length, \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
.u = { \
.side_vla = { \
.elem_type = _elem_type, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
}, \
.side_vla_visitor = { \
.elem_type = SIDE_PARAM(_elem_type), \
.visitor = _visitor, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
}, \
.offset = _offset, \
.access_mode = _access_mode, \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
}, \
.offset = _offset, \
.access_mode = _access_mode, \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.integer_size = _integer_size, \
.len_bits = _len_bits, \
.offset = _offset, \
.access_mode = _access_mode, \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.float_size = _float_size, \
.byte_order = _byte_order, \
.offset = _offset, \
.access_mode = _access_mode, \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.unit_size = _unit_size, \
.byte_order = _byte_order, \
.access_mode = _access_mode, \
.type = { \
.elem_type = _elem_type_gather, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.length = _length, \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
.access_mode = _access_mode, \
.type = { \
.elem_type = _elem_type_gather, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
}, \
.side_dynamic = { \
.side_byte = { \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
.value = (_val), \
.side_dynamic = { \
.side_string = { \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.unit_size = _unit_size, \
.byte_order = _byte_order, \
.side_dynamic = { \
.side_integer = { \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.integer_size = _integer_size, \
.len_bits = _len_bits, \
.side_dynamic = { \
.side_float = { \
.type = { \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.float_size = _float_size, \
.byte_order = _byte_order, \
.side_dynamic_vla_visitor = { \
.app_ctx = _ctx, \
.visitor = _dynamic_vla_visitor, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
}, \
.side_dynamic_struct_visitor = { \
.app_ctx = _ctx, \
.visitor = _dynamic_struct_visitor, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}, \
}, \
const struct side_arg _identifier##_vec[] = { _sav }; \
const struct side_arg_dynamic_vla _identifier = { \
.sav = _identifier##_vec, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.len = SIDE_ARRAY_SIZE(_identifier##_vec), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}
const struct side_arg_dynamic_field _identifier##_fields[] = { _struct_fields }; \
const struct side_arg_dynamic_struct _identifier = { \
.fields = _identifier##_fields, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.len = SIDE_ARRAY_SIZE(_identifier##_fields), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}
const struct side_arg_dynamic_field side_fields[] = { _var_fields }; \
const struct side_arg_dynamic_struct var_struct = { \
.fields = side_fields, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.len = SIDE_ARRAY_SIZE(side_fields), \
.nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
}; \
.provider_name = _provider, \
.event_name = _event, \
.fields = _fields, \
- .attr = SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list()), \
+ .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
.flags = (_flags), \
.version = 0, \
.loglevel = _loglevel, \
}
v64 = tracer_load_integer_value(&elem_type->u.side_integer,
&item->u.side_static.integer_value, 0, NULL);
- print_attributes("attr", ":", mappings->attr, mappings->nr_attr);
+ print_attributes("attr", ":", side_ptr_get(mappings->attr), mappings->nr_attr);
printf("%s", mappings->nr_attr ? ", " : "");
tracer_print_type(elem_type, item);
print_enum_labels(mappings, v64);
}
stride_bit = elem_type_to_stride(elem_type);
- print_attributes("attr", ":", side_enum_mappings->attr, side_enum_mappings->nr_attr);
+ print_attributes("attr", ":", side_ptr_get(side_enum_mappings->attr), side_enum_mappings->nr_attr);
printf("%s", side_enum_mappings->nr_attr ? ", " : "");
printf("labels: [ ");
for (i = 0; i < side_enum_mappings->nr_mappings; i++) {
uint16_t len_bits;
v64 = tracer_load_integer_value(type_integer, value, offset_bits, &len_bits);
- tracer_print_type_header(separator, type_integer->attr, type_integer->nr_attr);
- base = get_attr_display_base(type_integer->attr, type_integer->nr_attr, default_base);
+ tracer_print_type_header(separator, side_ptr_get(type_integer->attr), type_integer->nr_attr);
+ base = get_attr_display_base(side_ptr_get(type_integer->attr), type_integer->nr_attr, default_base);
switch (base) {
case TRACER_DISPLAY_BASE_2:
print_integer_binary(v64.u, len_bits);
{
bool reverse_bo;
- tracer_print_type_header(separator, type_float->attr, type_float->nr_attr);
+ tracer_print_type_header(separator, side_ptr_get(type_float->attr), type_float->nr_attr);
reverse_bo = type_float->byte_order != SIDE_TYPE_FLOAT_WORD_ORDER_HOST;
switch (type_float->float_size) {
case 2:
break;
case SIDE_TYPE_BYTE:
- tracer_print_type_header(":", type_desc->u.side_byte.attr, type_desc->u.side_byte.nr_attr);
+ tracer_print_type_header(":", side_ptr_get(type_desc->u.side_byte.attr), type_desc->u.side_byte.nr_attr);
printf("0x%" PRIx8, item->u.side_static.byte_value);
break;
case SIDE_TYPE_STRING_UTF8:
case SIDE_TYPE_STRING_UTF16:
case SIDE_TYPE_STRING_UTF32:
- tracer_print_type_header(":", type_desc->u.side_string.attr, type_desc->u.side_string.nr_attr);
+ tracer_print_type_header(":", side_ptr_get(type_desc->u.side_string.attr), type_desc->u.side_string.nr_attr);
tracer_print_string((const void *)(uintptr_t) item->u.side_static.string_value,
type_desc->u.side_string.unit_size, type_desc->u.side_string.byte_order, NULL);
break;
fprintf(stderr, "ERROR: number of fields mismatch between description and arguments of structure\n");
abort();
}
- print_attributes("attr", ":", type_desc->u.side_struct->attr, type_desc->u.side_struct->nr_attr);
+ print_attributes("attr", ":", side_ptr_get(type_desc->u.side_struct->attr), type_desc->u.side_struct->nr_attr);
printf("%s", type_desc->u.side_struct->nr_attr ? ", " : "");
printf("fields: { ");
for (i = 0; i < side_sav_len; i++) {
fprintf(stderr, "ERROR: length mismatch between description and arguments of array\n");
abort();
}
- print_attributes("attr", ":", type_desc->u.side_array.attr, type_desc->u.side_array.nr_attr);
+ print_attributes("attr", ":", side_ptr_get(type_desc->u.side_array.attr), type_desc->u.side_array.nr_attr);
printf("%s", type_desc->u.side_array.nr_attr ? ", " : "");
printf("elements: ");
printf("[ ");
const struct side_arg *sav = side_arg_vec->sav;
uint32_t i, side_sav_len = side_arg_vec->len;
- print_attributes("attr", ":", type_desc->u.side_vla.attr, type_desc->u.side_vla.nr_attr);
+ print_attributes("attr", ":", side_ptr_get(type_desc->u.side_vla.attr), type_desc->u.side_vla.nr_attr);
printf("%s", type_desc->u.side_vla.nr_attr ? ", " : "");
printf("elements: ");
printf("[ ");
ptr = tracer_gather_access(access_mode, ptr + type_gather->u.side_byte.offset);
memcpy(&value, ptr, 1);
- tracer_print_type_header(":", type_gather->u.side_byte.type.attr,
+ tracer_print_type_header(":", side_ptr_get(type_gather->u.side_byte.type.attr),
type_gather->u.side_byte.type.nr_attr);
printf("0x%" PRIx8, value);
return tracer_gather_size(access_mode, 1);
size_t string_len;
ptr = tracer_gather_access(access_mode, ptr + type_gather->u.side_string.offset);
- tracer_print_type_header(":", type_gather->u.side_string.type.attr,
+ tracer_print_type_header(":", side_ptr_get(type_gather->u.side_string.type.attr),
type_gather->u.side_string.type.nr_attr);
if (ptr) {
tracer_print_string(ptr, type_gather->u.side_string.type.unit_size,
ptr = tracer_gather_access(access_mode, ptr + side_integer->offset);
memcpy(&value, ptr, integer_size_bytes);
v64 = tracer_load_gather_integer_value(side_integer, &value);
- print_attributes("attr", ":", mappings->attr, mappings->nr_attr);
+ print_attributes("attr", ":", side_ptr_get(mappings->attr), mappings->nr_attr);
printf("%s", mappings->nr_attr ? ", " : "");
tracer_print_gather_type(enum_elem_type, ptr);
print_enum_labels(mappings, v64);
uint32_t i;
ptr = tracer_gather_access(access_mode, ptr + type_gather->u.side_struct.offset);
- print_attributes("attr", ":", type_gather->u.side_struct.type->attr, type_gather->u.side_struct.type->nr_attr);
+ print_attributes("attr", ":", side_ptr_get(type_gather->u.side_struct.type->attr), type_gather->u.side_struct.type->nr_attr);
printf("%s", type_gather->u.side_struct.type->nr_attr ? ", " : "");
printf("fields: { ");
for (i = 0; i < type_gather->u.side_struct.type->nr_fields; i++) {
ptr = tracer_gather_access(access_mode, ptr + type_gather->u.side_array.offset);
orig_ptr = ptr;
- print_attributes("attr", ":", type_gather->u.side_array.type.attr, type_gather->u.side_array.type.nr_attr);
+ print_attributes("attr", ":", side_ptr_get(type_gather->u.side_array.type.attr), type_gather->u.side_array.type.nr_attr);
printf("%s", type_gather->u.side_array.type.nr_attr ? ", " : "");
printf("elements: ");
printf("[ ");
length = (uint32_t) v64.u;
ptr = tracer_gather_access(access_mode, ptr + type_gather->u.side_vla.offset);
orig_ptr = ptr;
- print_attributes("attr", ":", type_gather->u.side_vla.type.attr, type_gather->u.side_vla.type.nr_attr);
+ print_attributes("attr", ":", side_ptr_get(type_gather->u.side_vla.type.attr), type_gather->u.side_vla.type.nr_attr);
printf("%s", type_gather->u.side_vla.type.nr_attr ? ", " : "");
printf("elements: ");
printf("[ ");
.priv = &tracer_priv,
};
- print_attributes("attr", ":", type_desc->u.side_vla_visitor.attr, type_desc->u.side_vla_visitor.nr_attr);
+ print_attributes("attr", ":", side_ptr_get(type_desc->u.side_vla_visitor.attr), type_desc->u.side_vla_visitor.nr_attr);
printf("%s", type_desc->u.side_vla_visitor.nr_attr ? ", " : "");
printf("elements: ");
printf("[ ");
const struct side_arg_dynamic_field *fields = dynamic_struct->fields;
uint32_t i, len = dynamic_struct->len;
- print_attributes("attr", "::", dynamic_struct->attr, dynamic_struct->nr_attr);
+ print_attributes("attr", "::", side_ptr_get(dynamic_struct->attr), dynamic_struct->nr_attr);
printf("%s", dynamic_struct->nr_attr ? ", " : "");
printf("fields:: ");
printf("[ ");
};
void *app_ctx = item->u.side_dynamic.side_dynamic_struct_visitor.app_ctx;
- print_attributes("attr", "::", item->u.side_dynamic.side_dynamic_struct_visitor.attr, item->u.side_dynamic.side_dynamic_struct_visitor.nr_attr);
+ print_attributes("attr", "::", side_ptr_get(item->u.side_dynamic.side_dynamic_struct_visitor.attr), item->u.side_dynamic.side_dynamic_struct_visitor.nr_attr);
printf("%s", item->u.side_dynamic.side_dynamic_struct_visitor.nr_attr ? ", " : "");
printf("fields:: ");
printf("[ ");
const struct side_arg *sav = vla->sav;
uint32_t i, side_sav_len = vla->len;
- print_attributes("attr", "::", vla->attr, vla->nr_attr);
+ print_attributes("attr", "::", side_ptr_get(vla->attr), vla->nr_attr);
printf("%s", vla->nr_attr ? ", " : "");
printf("elements:: ");
printf("[ ");
};
void *app_ctx = item->u.side_dynamic.side_dynamic_vla_visitor.app_ctx;
- print_attributes("attr", "::", item->u.side_dynamic.side_dynamic_vla_visitor.attr, item->u.side_dynamic.side_dynamic_vla_visitor.nr_attr);
+ print_attributes("attr", "::", side_ptr_get(item->u.side_dynamic.side_dynamic_vla_visitor.attr), item->u.side_dynamic.side_dynamic_vla_visitor.nr_attr);
printf("%s", item->u.side_dynamic.side_dynamic_vla_visitor.nr_attr ? ", " : "");
printf("elements:: ");
printf("[ ");
TRACER_DISPLAY_BASE_10);
break;
case SIDE_TYPE_DYNAMIC_BYTE:
- tracer_print_type_header("::", item->u.side_dynamic.side_byte.type.attr, item->u.side_dynamic.side_byte.type.nr_attr);
+ tracer_print_type_header("::", side_ptr_get(item->u.side_dynamic.side_byte.type.attr), item->u.side_dynamic.side_byte.type.nr_attr);
printf("0x%" PRIx8, item->u.side_dynamic.side_byte.value);
break;
case SIDE_TYPE_DYNAMIC_POINTER:
&item->u.side_dynamic.side_float.value);
break;
case SIDE_TYPE_DYNAMIC_STRING:
- tracer_print_type_header("::", item->u.side_dynamic.side_string.type.attr, item->u.side_dynamic.side_string.type.nr_attr);
+ tracer_print_type_header("::", side_ptr_get(item->u.side_dynamic.side_string.type.attr), item->u.side_dynamic.side_string.type.nr_attr);
tracer_print_string((const char *)(uintptr_t) item->u.side_dynamic.side_string.value,
item->u.side_dynamic.side_string.type.unit_size,
item->u.side_dynamic.side_string.type.byte_order, NULL);
fprintf(stderr, "ERROR: number of fields mismatch between description and arguments\n");
abort();
}
- print_attributes(", attr", ":", desc->attr, desc->nr_attr);
+ print_attributes(", attr", ":", side_ptr_get(desc->attr), desc->nr_attr);
printf("%s", side_sav_len ? ", fields: [ " : "");
for (i = 0; i < side_sav_len; i++) {
printf("%s", i ? ", " : "");
fprintf(stderr, "ERROR: unexpected non-variadic event description\n");
abort();
}
- print_attributes(", attr ", "::", var_struct->attr, var_struct->nr_attr);
+ print_attributes(", attr ", "::", side_ptr_get(var_struct->attr), var_struct->nr_attr);
printf("%s", var_struct_len ? ", fields:: [ " : "");
for (i = 0; i < var_struct_len; i++, nr_fields++) {
printf("%s", i ? ", " : "");