X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fmetadata%2Fctf-visitor-xml.c;h=428a89560e9baa1bf0aa25ff881462609c8af851;hp=60ad8c9c43f570b67662e0506287dd5d83aa79f2;hb=3122e6f075647374e7a98ae9501d100de8d004a9;hpb=7de8808cf86ee8922f261d4cd6ee91aa0fa103b1 diff --git a/formats/ctf/metadata/ctf-visitor-xml.c b/formats/ctf/metadata/ctf-visitor-xml.c index 60ad8c9c..428a8956 100644 --- a/formats/ctf/metadata/ctf-visitor-xml.c +++ b/formats/ctf/metadata/ctf-visitor-xml.c @@ -21,16 +21,19 @@ #include #include #include -#include #include +#include #include +#include +#include #include "ctf-scanner.h" #include "ctf-parser.h" #include "ctf-ast.h" -#define printf_dbg(fmt, args...) fprintf(stderr, "%s: " fmt, __func__, ## args) +#define fprintf_dbg(fd, fmt, args...) fprintf(fd, "%s: " fmt, __func__, ## args) -static void print_tabs(FILE *fd, int depth) +static +void print_tabs(FILE *fd, int depth) { int i; @@ -38,38 +41,70 @@ static void print_tabs(FILE *fd, int depth) fprintf(fd, "\t"); } +static int ctf_visitor_print_unary_expression(FILE *fd, int depth, struct ctf_node *node) { int ret = 0; + switch (node->u.unary_expression.link) { + case UNARY_LINK_UNKNOWN: + break; + case UNARY_DOTLINK: + print_tabs(fd, depth); + fprintf(fd, "\n"); + break; + case UNARY_ARROWLINK: + print_tabs(fd, depth); + fprintf(fd, "\n"); + break; + case UNARY_DOTDOTDOT: + print_tabs(fd, depth); + fprintf(fd, "\n"); + break; + default: + fprintf(stderr, "[error] %s: unknown expression link type %d\n", __func__, + (int) node->u.unary_expression.link); + return -EINVAL; + } + switch (node->u.unary_expression.type) { case UNARY_STRING: print_tabs(fd, depth); fprintf(fd, "u.unary_expression.u.string); - fprintf(fd, "/>\n"); + fprintf(fd, " />\n"); break; case UNARY_SIGNED_CONSTANT: print_tabs(fd, depth); - fprintf(fd, "u.unary_expression.u.signed_constant); - fprintf(fd, "/>\n"); + fprintf(fd, "u.unary_expression.u.signed_constant); + fprintf(fd, "\" />\n"); break; case UNARY_UNSIGNED_CONSTANT: print_tabs(fd, depth); - fprintf(fd, "u.unary_expression.u.signed_constant); - fprintf(fd, "/>\n"); + fprintf(fd, "u.unary_expression.u.signed_constant); + fprintf(fd, "\" />\n"); break; case UNARY_SBRAC: print_tabs(fd, depth); - fprintf(fd, ""); + fprintf(fd, "\n"); ret = ctf_visitor_print_unary_expression(fd, depth + 1, node->u.unary_expression.u.sbrac_exp); if (ret) return ret; print_tabs(fd, depth); - fprintf(fd, ""); + fprintf(fd, "\n"); + break; + case UNARY_NESTED: + print_tabs(fd, depth); + fprintf(fd, "\n"); + ret = ctf_visitor_print_unary_expression(fd, depth + 1, + node->u.unary_expression.u.nested_exp); + if (ret) + return ret; + print_tabs(fd, depth); + fprintf(fd, "\n"); break; case UNARY_UNKNOWN: @@ -78,29 +113,65 @@ int ctf_visitor_print_unary_expression(FILE *fd, int depth, struct ctf_node *nod (int) node->u.unary_expression.type); return -EINVAL; } - switch (node->u.unary_expression.link) { - case UNARY_LINK_UNKNOWN: - break; - case UNARY_DOTLINK: - print_tabs(fd, depth); - fprintf(fd, "\n"); - break; - case UNARY_ARROWLINK: - print_tabs(fd, depth); - fprintf(fd, "\n"); - break; - default: - fprintf(stderr, "[error] %s: unknown expression link type %d\n", __func__, - (int) node->u.unary_expression.link); - return -EINVAL; + return 0; +} + +static +int ctf_visitor_print_type_specifier_list(FILE *fd, int depth, struct ctf_node *node) +{ + struct ctf_node *iter; + int ret; + + print_tabs(fd, depth); + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; } + print_tabs(fd, depth); + fprintf(fd, "\n"); return 0; } +static int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node) { + int ret; print_tabs(fd, depth); - fprintf(fd, "u.type_specifier.type) { + case TYPESPEC_VOID: + case TYPESPEC_CHAR: + case TYPESPEC_SHORT: + case TYPESPEC_INT: + case TYPESPEC_LONG: + case TYPESPEC_FLOAT: + case TYPESPEC_DOUBLE: + case TYPESPEC_SIGNED: + case TYPESPEC_UNSIGNED: + case TYPESPEC_BOOL: + case TYPESPEC_COMPLEX: + case TYPESPEC_IMAGINARY: + case TYPESPEC_CONST: + case TYPESPEC_ID_TYPE: + fprintf(fd, "\n"); + depth++; + break; + case TYPESPEC_UNKNOWN: + default: + fprintf(stderr, "[error] %s: unknown type specifier %d\n", __func__, + (int) node->u.type_specifier.type); + return -EINVAL; + } switch (node->u.type_specifier.type) { case TYPESPEC_VOID: @@ -134,7 +205,10 @@ int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node) fprintf(fd, "bool"); break; case TYPESPEC_COMPLEX: - fprintf(fd, "complex"); + fprintf(fd, "_Complex"); + break; + case TYPESPEC_IMAGINARY: + fprintf(fd, "_Imaginary"); break; case TYPESPEC_CONST: fprintf(fd, "const"); @@ -142,17 +216,61 @@ int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node) case TYPESPEC_ID_TYPE: fprintf(fd, "%s", node->u.type_specifier.id_type); break; + case TYPESPEC_FLOATING_POINT: + case TYPESPEC_INTEGER: + case TYPESPEC_STRING: + case TYPESPEC_STRUCT: + case TYPESPEC_VARIANT: + case TYPESPEC_ENUM: + ret = ctf_visitor_print_xml(fd, depth, node->u.type_specifier.node); + if (ret) + return ret; + break; + case TYPESPEC_UNKNOWN: + default: + fprintf(stderr, "[error] %s: unknown type specifier %d\n", __func__, + (int) node->u.type_specifier.type); + return -EINVAL; + } + switch (node->u.type_specifier.type) { + case TYPESPEC_VOID: + case TYPESPEC_CHAR: + case TYPESPEC_SHORT: + case TYPESPEC_INT: + case TYPESPEC_LONG: + case TYPESPEC_FLOAT: + case TYPESPEC_DOUBLE: + case TYPESPEC_SIGNED: + case TYPESPEC_UNSIGNED: + case TYPESPEC_BOOL: + case TYPESPEC_COMPLEX: + case TYPESPEC_IMAGINARY: + case TYPESPEC_CONST: + case TYPESPEC_ID_TYPE: + fprintf(fd, "\"/>\n"); + break; + case TYPESPEC_FLOATING_POINT: + case TYPESPEC_INTEGER: + case TYPESPEC_STRING: + case TYPESPEC_STRUCT: + case TYPESPEC_VARIANT: + case TYPESPEC_ENUM: + depth--; + print_tabs(fd, depth); + fprintf(fd, "\n"); + break; case TYPESPEC_UNKNOWN: default: fprintf(stderr, "[error] %s: unknown type specifier %d\n", __func__, (int) node->u.type_specifier.type); return -EINVAL; } - fprintf(fd, "\"/>\n"); + return 0; } +static int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node) { int ret = 0; @@ -162,23 +280,27 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node fprintf(fd, "\n"); depth++; - print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.type_declarator.pointers, - siblings) { - ret = ctf_visitor_print_xml(fd, depth + 1, iter); - if (ret) - return ret; + if (!bt_list_empty(&node->u.type_declarator.pointers)) { + print_tabs(fd, depth); + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.type_declarator.pointers, + siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; + } + print_tabs(fd, depth); + fprintf(fd, "\n"); } - print_tabs(fd, depth); - fprintf(fd, "\n"); switch (node->u.type_declarator.type) { case TYPEDEC_ID: - print_tabs(fd, depth); - fprintf(fd, "u.type_declarator.u.id); - fprintf(fd, "<\" />\n"); + if (node->u.type_declarator.u.id) { + print_tabs(fd, depth); + fprintf(fd, "u.type_declarator.u.id); + fprintf(fd, "\" />\n"); + } break; case TYPEDEC_NESTED: if (node->u.type_declarator.u.nested.type_declarator) { @@ -191,19 +313,20 @@ int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node print_tabs(fd, depth); fprintf(fd, "\n"); } - if (node->u.type_declarator.u.nested.length) { + if (node->u.type_declarator.u.nested.abstract_array) { print_tabs(fd, depth); fprintf(fd, "\n"); - ret = ctf_visitor_print_xml(fd, depth + 1, - node->u.type_declarator.u.nested.length); - if (ret) - return ret; print_tabs(fd, depth); fprintf(fd, "\n"); - } - if (node->u.type_declarator.u.nested.abstract_array) { + } else if (!bt_list_empty(&node->u.type_declarator.u.nested.length)) { print_tabs(fd, depth); fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length, + siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; + } print_tabs(fd, depth); fprintf(fd, "\n"); } @@ -240,34 +363,23 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) case NODE_ROOT: print_tabs(fd, depth); fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.root._typedef, + bt_list_for_each_entry(iter, &node->u.root.declaration_list, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } - cds_list_for_each_entry(iter, &node->u.root.typealias, - siblings) { + bt_list_for_each_entry(iter, &node->u.root.trace, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } - cds_list_for_each_entry(iter, &node->u.root.declaration_specifier, siblings) { + bt_list_for_each_entry(iter, &node->u.root.stream, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } - cds_list_for_each_entry(iter, &node->u.root.trace, siblings) { - ret = ctf_visitor_print_xml(fd, depth + 1, iter); - if (ret) - return ret; - } - cds_list_for_each_entry(iter, &node->u.root.stream, siblings) { - ret = ctf_visitor_print_xml(fd, depth + 1, iter); - if (ret) - return ret; - } - cds_list_for_each_entry(iter, &node->u.root.event, siblings) { + bt_list_for_each_entry(iter, &node->u.root.event, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -279,7 +391,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) case NODE_EVENT: print_tabs(fd, depth); fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) { + bt_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -290,7 +402,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) case NODE_STREAM: print_tabs(fd, depth); fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) { + bt_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -298,10 +410,21 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) print_tabs(fd, depth); fprintf(fd, "\n"); break; + case NODE_ENV: + print_tabs(fd, depth); + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; + } + print_tabs(fd, depth); + fprintf(fd, "\n"); + break; case NODE_TRACE: print_tabs(fd, depth); fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) { + bt_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -309,6 +432,18 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) print_tabs(fd, depth); fprintf(fd, "\n"); break; + case NODE_CLOCK: + print_tabs(fd, depth); + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; + } + print_tabs(fd, depth); + fprintf(fd, "\n"); + break; + case NODE_CTF_EXPRESSION: print_tabs(fd, depth); @@ -316,17 +451,22 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) depth++; print_tabs(fd, depth); fprintf(fd, "\n"); - ret = ctf_visitor_print_xml(fd, depth + 1, node->u.ctf_expression.left); - if (ret) - return ret; + bt_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; + } + print_tabs(fd, depth); fprintf(fd, "\n"); print_tabs(fd, depth); fprintf(fd, "\n"); - ret = ctf_visitor_print_xml(fd, depth + 1, node->u.ctf_expression.right); - if (ret) - return ret; + bt_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; + } print_tabs(fd, depth); fprintf(fd, "\n"); depth--; @@ -340,25 +480,19 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) print_tabs(fd, depth); fprintf(fd, "\n"); depth++; - print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u._typedef.declaration_specifier, siblings) { - ret = ctf_visitor_print_xml(fd, depth + 1, iter); - if (ret) - return ret; - } - print_tabs(fd, depth); - fprintf(fd, "\n"); + ret = ctf_visitor_print_xml(fd, depth + 1, node->u._typedef.type_specifier_list); + if (ret) + return ret; print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) { + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } print_tabs(fd, depth); - fprintf(fd, "\n"); + fprintf(fd, "\n"); depth--; print_tabs(fd, depth); fprintf(fd, "\n"); @@ -368,25 +502,19 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) fprintf(fd, "\n"); depth++; - print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.typealias_target.declaration_specifier, siblings) { - ret = ctf_visitor_print_xml(fd, depth + 1, iter); - if (ret) - return ret; - } - print_tabs(fd, depth); - fprintf(fd, "\n"); + ret = ctf_visitor_print_xml(fd, depth, node->u.typealias_target.type_specifier_list); + if (ret) + return ret; print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) { + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } print_tabs(fd, depth); - fprintf(fd, "\n"); + fprintf(fd, "\n"); depth--; print_tabs(fd, depth); @@ -397,25 +525,19 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) fprintf(fd, "\n"); depth++; - print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.typealias_alias.declaration_specifier, siblings) { - ret = ctf_visitor_print_xml(fd, depth + 1, iter); - if (ret) - return ret; - } - print_tabs(fd, depth); - fprintf(fd, "\n"); + ret = ctf_visitor_print_xml(fd, depth, node->u.typealias_alias.type_specifier_list); + if (ret) + return ret; print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) { + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } print_tabs(fd, depth); - fprintf(fd, "\n"); + fprintf(fd, "\n"); depth--; print_tabs(fd, depth); @@ -434,6 +556,12 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) fprintf(fd, "\n"); break; + case NODE_TYPE_SPECIFIER_LIST: + ret = ctf_visitor_print_type_specifier_list(fd, depth, node); + if (ret) + return ret; + break; + case NODE_TYPE_SPECIFIER: ret = ctf_visitor_print_type_specifier(fd, depth, node); if (ret) @@ -455,7 +583,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) case NODE_FLOATING_POINT: print_tabs(fd, depth); fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) { + bt_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -466,7 +594,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) case NODE_INTEGER: print_tabs(fd, depth); fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.integer.expressions, siblings) { + bt_list_for_each_entry(iter, &node->u.integer.expressions, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -477,7 +605,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) case NODE_STRING: print_tabs(fd, depth); fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.string.expressions, siblings) { + bt_list_for_each_entry(iter, &node->u.string.expressions, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -491,14 +619,13 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) if (node->u.enumerator.id) fprintf(fd, " id=\"%s\"", node->u.enumerator.id); fprintf(fd, ">\n"); - if (node->u.enumerator.values) { - ret = ctf_visitor_print_xml(fd, depth + 1, - node->u.enumerator.values); + bt_list_for_each_entry(iter, &node->u.enumerator.values, siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } print_tabs(fd, depth); - fprintf(fd, ""); + fprintf(fd, "\n"); break; case NODE_ENUM: print_tabs(fd, depth); @@ -511,48 +638,43 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) if (node->u._enum.container_type) { print_tabs(fd, depth); - fprintf(fd, ""); + fprintf(fd, "\n"); ret = ctf_visitor_print_xml(fd, depth + 1, node->u._enum.container_type); if (ret) return ret; print_tabs(fd, depth); - fprintf(fd, ""); + fprintf(fd, "\n"); } print_tabs(fd, depth); - fprintf(fd, ""); - cds_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) { + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } print_tabs(fd, depth); - fprintf(fd, ""); + fprintf(fd, "\n"); depth--; print_tabs(fd, depth); fprintf(fd, "\n"); break; case NODE_STRUCT_OR_VARIANT_DECLARATION: - print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.declaration_specifier, siblings) { - ret = ctf_visitor_print_xml(fd, depth + 1, iter); - if (ret) - return ret; - } - print_tabs(fd, depth); - fprintf(fd, "\n"); + ret = ctf_visitor_print_xml(fd, depth, + node->u.struct_or_variant_declaration.type_specifier_list); + if (ret) + return ret; print_tabs(fd, depth); - fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) { + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } print_tabs(fd, depth); - fprintf(fd, "\n"); + fprintf(fd, "\n"); break; case NODE_VARIANT: print_tabs(fd, depth); @@ -562,7 +684,7 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) if (node->u.variant.choice) fprintf(fd, " choice=\"%s\"", node->u.variant.choice); fprintf(fd, ">\n"); - cds_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) { + bt_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; @@ -577,13 +699,24 @@ int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node) node->u._struct.name); else fprintf(fd, "\n"); - cds_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) { + bt_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) { ret = ctf_visitor_print_xml(fd, depth + 1, iter); if (ret) return ret; } print_tabs(fd, depth); fprintf(fd, "\n"); + if (!bt_list_empty(&node->u._struct.min_align)) { + print_tabs(fd, depth); + fprintf(fd, "\n"); + bt_list_for_each_entry(iter, &node->u._struct.min_align, siblings) { + ret = ctf_visitor_print_xml(fd, depth + 1, iter); + if (ret) + return ret; + } + print_tabs(fd, depth); + fprintf(fd, "\n"); + } break; case NODE_UNKNOWN: