X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftsdl-trace-class-visitor.cpp;fp=src%2Fbin%2Flttng-sessiond%2Ftsdl-trace-class-visitor.cpp;h=c6c9c93db7d3172a0ed3dd77a44b8578921f214d;hb=e7360180aa8c4d8f5bfec86a6a020bbc616ff2c0;hp=115d579763ff355330eef93379484a04fbc6c730;hpb=96bf95ffff3f039d7bf4ba0e9c8f92aefaf82d82;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp b/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp index 115d57976..c6c9c93db 100644 --- a/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp +++ b/src/bin/lttng-sessiond/tsdl-trace-class-visitor.cpp @@ -300,6 +300,30 @@ private: "[{}]", escape_tsdl_identifier(type.length_field_name))); } + virtual void visit(const lst::static_length_blob_type& type) override final + { + /* This type doesn't exist in CTF 1.x, express it as a static length array of uint8_t. */ + std::unique_ptr uint8_element = lttng::make_unique(8, + _trace_abi.byte_order, 8, lst::integer_type::signedness::UNSIGNED, + lst::integer_type::base::HEXADECIMAL); + const auto array = lttng::make_unique( + type.alignment, std::move(uint8_element), type.length_bytes); + + visit(*array); + } + + virtual void visit(const lst::dynamic_length_blob_type& type) override final + { + /* This type doesn't exist in CTF 1.x, express it as a dynamic length array of uint8_t. */ + std::unique_ptr uint8_element = lttng::make_unique(0, + _trace_abi.byte_order, 8, lst::integer_type::signedness::UNSIGNED, + lst::integer_type::base::HEXADECIMAL); + const auto array = lttng::make_unique( + type.alignment, std::move(uint8_element), type.length_field_name); + + visit(*array); + } + virtual void visit(const lst::null_terminated_string_type& type) override final { /* Defaults to UTF-8. */