From: Philippe Proulx Date: Tue, 13 Aug 2019 22:57:41 +0000 (-0400) Subject: sink.text.details: print bit array field classes and fields X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=9684703d87e2a26568d9496f45ad12e6fb9f2e6f;p=babeltrace.git sink.text.details: print bit array field classes and fields The component prints bit array fields as unsigned integer fields with a forced hexadecimal base. Signed-off-by: Philippe Proulx Change-Id: If97e1f05161377c6f8fa3d56e87ad2cc10cb32e2 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1910 Tested-by: jenkins Reviewed-by: Francis Deslauriers --- diff --git a/src/plugins/text/details/write.c b/src/plugins/text/details/write.c index 6cc94285..6f3d69d7 100644 --- a/src/plugins/text/details/write.c +++ b/src/plugins/text/details/write.c @@ -780,6 +780,9 @@ void write_field_class(struct details_write_ctx *ctx, const bt_field_class *fc) case BT_FIELD_CLASS_TYPE_BOOL: type = "Boolean"; break; + case BT_FIELD_CLASS_TYPE_BIT_ARRAY: + type = "Bit array"; + break; case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER: type = "Unsigned integer"; break; @@ -1520,6 +1523,12 @@ void write_field(struct details_write_ctx *ctx, const bt_field *field, write_sp(ctx); write_bool_prop_value(ctx, bt_field_bool_get_value(field)); break; + case BT_FIELD_CLASS_TYPE_BIT_ARRAY: + format_uint(buf, bt_field_bit_array_get_value_as_integer(field), + 16); + write_sp(ctx); + write_uint_str_prop_value(ctx, buf); + break; case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER: case BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION: case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER: