+ uint64_t value;
+
+ if (bt_ctf_field_unsigned_integer_get_value(container_field,
+ &value)) {
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+ iter = bt_ctf_field_type_enumeration_find_mappings_by_unsigned_value(
+ enumeration_field_type, value);
+ }
+ if (!iter) {
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+ fprintf(text->out, "( ");
+ for (;;) {
+ const char *mapping_name;
+
+ if (bt_ctf_field_type_enumeration_mapping_iterator_get_signed(
+ iter, &mapping_name, NULL, NULL) < 0) {
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+ if (nr_mappings++)
+ fprintf(text->out, ", ");
+ fprintf(text->out, "\"%s\"", mapping_name);
+ if (bt_ctf_field_type_enumeration_mapping_iterator_next(iter) < 0) {
+ break;
+ }
+ }
+ if (!nr_mappings) {
+ fprintf(text->out, "<unknown>");