/* parse attributes. */
repeat:
switch (*fmt) {
- case 'b':
- *attributes |= LTT_ATTRIBUTE_COMPACT;
- ++fmt;
- goto repeat;
case 'n':
*attributes |= LTT_ATTRIBUTE_NETWORK_BYTE_ORDER;
++fmt;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' ||
*fmt =='Z' || *fmt == 'z' || *fmt == 't' ||
*fmt == 'S' || *fmt == '1' || *fmt == '2' ||
- *fmt == '4' || *fmt == 8) {
+ *fmt == '4' || *fmt == '8') {
qualifier = *fmt;
++fmt;
if (qualifier == 'l' && *fmt == 'l') {
++fmt;
if (qualifier == 'l' && *fmt == 'l') {
qualifier = 'L';
- g_string_append_c(field_fmt, *fmt);
++fmt;
}
}
case LTT_TYPE_POINTER:
field->size = trace_size;
field->alignment = trace_size;
+ info->largest_align = max((guint8)field->alignment,
+ (guint8)info->largest_align);
field->attributes = attributes;
if (offset == -1) {
field->offset = -1;
field->static_offset = 1;
return -1;
default:
- g_error("Unexpected type"); //FIXME: compact type
+ g_error("Unexpected type");
return 0;
}
}
// not aligning on pointer size, breaking genevent backward compatibility.
break;
default:
- g_error("Unexpected type"); //FIXME: compact type
+ g_error("Unexpected type");
return -1;
}
}
offset = add_type(info, offset, name, trace_size,
trace_type, c_size, c_type, attributes, field_count++,
field_fmt);
- g_string_truncate(field_fmt, 0);
trace_size = c_size = 0;
trace_type = c_size = LTT_TYPE_NONE;
g_string_truncate(field_fmt, 0);
info->fields = NULL;
info->next = NULL;
info->format = marker_get_format_from_name(trace, name);
+ info->largest_align = 1;
if (info->format && marker_parse_format(info->format, info))
g_error("Error parsing marker format \"%s\" for marker \"%s\"",
info->format, g_quark_to_string(name));