- case NODE_ROOT:
- cds_list_for_each_entry(iter, &node->u.root._typedef,
- siblings) {
- ret = ctf_typedef_visit(fd, depth + 1,
- &iter->u._typedef.declaration_specifier,
- &iter->u._typedef.type_declarators,
- trace->declaration_scope);
- if (ret)
- return ret;
- }
- cds_list_for_each_entry(iter, &node->u.root.typealias,
- siblings) {
- ret = ctf_typealias_visit(fd, depth + 1,
- &iter->u.typealias.target, &iter->u.typealias.alias
- trace->declaration_scope);
- if (ret)
- return ret;
- }
- cds_list_for_each_entry(iter, &node->u.root.declaration_specifier, siblings) {
- ret = ctf_declaration_specifier_visit(fd, depth, iter,
- trace->root_declaration_scope);
- if (ret)
- return ret;
- }
- cds_list_for_each_entry(iter, &node->u.root.trace, siblings) {
- ret = ctf_trace_visit(fd, depth + 1, iter, trace);
- if (ret)
- return ret;
- }
- cds_list_for_each_entry(iter, &node->u.root.stream, siblings) {
- ret = ctf_stream_visit(fd, depth + 1, iter,
- trace->root_declaration_scope, trace);
- if (ret)
- return ret;
- }
- cds_list_for_each_entry(iter, &node->u.root.event, siblings) {
- ret = ctf_event_visit(fd, depth + 1, iter,
- trace->root_declaration_scope, trace);
- if (ret)
- return ret;
- }
- break;
-
- case NODE_TYPEALIAS_TARGET:
- print_tabs(fd, depth);
- fprintf(fd, "<target>\n");
- depth++;
-
- print_tabs(fd, depth);
- fprintf(fd, "<declaration_specifier>\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, "</declaration_specifier>\n");
-
- print_tabs(fd, depth);
- fprintf(fd, "<type_declarators>\n");
- cds_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, "</type_declarators>\n");
-
- depth--;
- print_tabs(fd, depth);
- fprintf(fd, "</target>\n");
- break;
- case NODE_TYPEALIAS_ALIAS:
- print_tabs(fd, depth);
- fprintf(fd, "<alias>\n");
- depth++;
-
- print_tabs(fd, depth);
- fprintf(fd, "<declaration_specifier>\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, "</declaration_specifier>\n");
-
- print_tabs(fd, depth);
- fprintf(fd, "<type_declarators>\n");
- cds_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, "</type_declarators>\n");
-
- depth--;
- print_tabs(fd, depth);
- fprintf(fd, "</alias>\n");
- break;
- case NODE_TYPEALIAS:
- print_tabs(fd, depth);
- fprintf(fd, "<typealias>\n");
- ret = ctf_visitor_print_xml(fd, depth + 1, node->u.typealias.target);
- if (ret)
- return ret;
- ret = ctf_visitor_print_xml(fd, depth + 1, node->u.typealias.alias);
- if (ret)
- return ret;
- print_tabs(fd, depth);
- fprintf(fd, "</typealias>\n");
- break;
-
- case NODE_TYPE_SPECIFIER:
- ret = ctf_visitor_print_type_specifier(fd, depth, node);