flt.lttng-utils.debug-info: copy boolean field class and field objects
[babeltrace.git] / src / plugins / lttng-utils / debug-info / trace-ir-metadata-field-class-copy.c
index 0b0d4d4c7a3289da015b611b782d94179f96fbff..868699e580801b41f4d2ee5046b5d8ace8c55cf1 100644 (file)
@@ -153,6 +153,21 @@ void field_class_integer_set_props(const bt_field_class *input_fc,
                        bt_field_class_integer_get_field_value_range(input_fc));
 }
 
+static inline
+int field_class_bool_copy(
+               struct trace_ir_metadata_maps *md_maps,
+               const bt_field_class *in_field_class,
+               bt_field_class *out_field_class)
+{
+       BT_COMP_LOGD("Copying content of boolean field class: "
+                       "in-fc-addr=%p, out-fc-addr=%p",
+                       in_field_class, out_field_class);
+       BT_COMP_LOGD("Copied content of boolean field class: "
+                       "in-fc-addr=%p, out-fc-addr=%p",
+                       in_field_class, out_field_class);
+       return 0;
+}
+
 static inline
 int field_class_unsigned_integer_copy(
                struct trace_ir_metadata_maps *md_maps,
@@ -561,6 +576,10 @@ bt_field_class *create_field_class_copy_internal(struct trace_ir_metadata_maps *
                        in_field_class);
 
        switch (fc_type) {
+       case BT_FIELD_CLASS_TYPE_BOOL:
+               out_field_class = bt_field_class_bool_create(
+                               md_maps->output_trace_class);
+               break;
        case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
                out_field_class = bt_field_class_integer_unsigned_create(
                                md_maps->output_trace_class);
@@ -700,6 +719,10 @@ int copy_field_class_content_internal(
 {
        int ret = 0;
        switch(bt_field_class_get_type(in_field_class)) {
+       case BT_FIELD_CLASS_TYPE_BOOL:
+               ret = field_class_bool_copy(md_maps,
+                               in_field_class, out_field_class);
+               break;
        case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
                ret = field_class_unsigned_integer_copy(md_maps,
                                in_field_class, out_field_class);
This page took 0.027042 seconds and 4 git commands to generate.