sink.text.details: handle BLOB field class type
authorSimon Marchi <simon.marchi@efficios.com>
Sat, 5 Mar 2022 03:28:14 +0000 (22:28 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commit6bdefb8c6ebc337439f4bda397e21bd1479e4ba4
tree699590323a252f29b19535825b4c7b97e9df2f02
parent4a2156a5c3199028852af88f0a70505bd5534ed7
sink.text.details: handle BLOB field class type

Make the `sink.text.details` component class handle the BLOB field class
type, introduced in MIP 1.

When dumping the field class details, print the names of the new field
classes.  For the static BLOB field class, print the static length
value (similar to static arrays).

For BLOB fields:

 - if it is empty, print "Empty" (like a few other existing field kinds)
 - if it is not empty, print bytes as hex (without the 0x prefix), 16
   bytes per line.  This is similar to what `od -t x1` outputs, minus
   the address/offset column.

The output looks like this.  The field class part:

        static_blob: Static BLOB (Length 1)
        blob_without_len: Dynamic BLOB (no length field)
        blob_with_len: Dynamic BLOB (with length field)

The field part:

    static_blob: Length 1:
      fe
    blob_without_len: Length 2048:
      46 72 6f 6d 20 36 34 64 62 36 31 36 36 35 65 32
      38 62 62 63 39 63 62 64 32 62 64 32 62 34 39 31
      <snip>
    blob_with_len: Empty

Change-Id: Iae1f12e8b8d4d3a0612b935ddd45072dbc26df24
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7502
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
CI-Build: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12692
src/plugins/text/details/write.c
This page took 0.024187 seconds and 4 git commands to generate.