* types for which the common boundary is not the boundary of
* a byte cannot have different byte orders.
*
* types for which the common boundary is not the boundary of
* a byte cannot have different byte orders.
*
-int64_t get_compound_field_type_length(struct bt_ctf_btr *btr,
- struct bt_ctf_field_type *field_type)
+int64_t get_compound_field_type_length(struct bt_btr *btr,
+ struct bt_field_type *field_type)
- switch (bt_ctf_field_type_get_type_id(field_type)) {
- case BT_CTF_FIELD_TYPE_ID_STRUCT:
- length = (int64_t) bt_ctf_field_type_structure_get_field_count(
+ switch (bt_field_type_get_type_id(field_type)) {
+ case BT_FIELD_TYPE_ID_STRUCT:
+ length = (int64_t) bt_field_type_structure_get_field_count(
- bt_ctf_field_type_id_string(
- bt_ctf_field_type_get_type_id(field_type)));
- length = BT_CTF_BTR_STATUS_ERROR;
+ bt_common_field_type_id_string(
+ bt_field_type_get_type_id(field_type)));
+ length = BT_BTR_STATUS_ERROR;
BT_LOGV("Pushing field type on stack: stack-addr=%p, "
"ft-addr=%p, ft-id=%s, base-length=%zu, "
"stack-size-before=%u, stack-size-after=%u",
BT_LOGV("Pushing field type on stack: stack-addr=%p, "
"ft-addr=%p, ft-id=%s, base-length=%zu, "
"stack-size-before=%u, stack-size-after=%u",
- stack, base_type, bt_ctf_field_type_id_string(
- bt_ctf_field_type_get_type_id(base_type)),
+ stack, base_type, bt_common_field_type_id_string(
+ bt_field_type_get_type_id(base_type)),
base_len, stack->entries->len, stack->entries->len + 1);
entry = g_new0(struct stack_entry, 1);
if (!entry) {
BT_LOGE("Failed to allocate one stack entry: stack-addr=%p",
stack);
base_len, stack->entries->len, stack->entries->len + 1);
entry = g_new0(struct stack_entry, 1);
if (!entry) {
BT_LOGE("Failed to allocate one stack entry: stack-addr=%p",
stack);
-int stack_push_with_len(struct bt_ctf_btr *btr,
- struct bt_ctf_field_type *base_type)
+int stack_push_with_len(struct bt_btr *btr,
+ struct bt_field_type *base_type)
if (base_len < 0) {
BT_LOGW("Cannot get compound field type's field count: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
if (base_len < 0) {
BT_LOGW("Cannot get compound field type's field count: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
- btr, base_type, bt_ctf_field_type_id_string(
- bt_ctf_field_type_get_type_id(base_type)));
- ret = BT_CTF_BTR_STATUS_ERROR;
+ btr, base_type, bt_common_field_type_id_string(
+ bt_field_type_get_type_id(base_type)));
+ ret = BT_BTR_STATUS_ERROR;
BT_LOGV("Popping from stack: "
"stack-addr=%p, stack-size-before=%u, stack-size-after=%u",
stack, stack->entries->len, stack->entries->len - 1);
BT_LOGV("Popping from stack: "
"stack-addr=%p, stack-size-before=%u, stack-size-after=%u",
stack, stack->entries->len, stack->entries->len - 1);
if (!stack_empty(stack)) {
g_ptr_array_remove_range(stack->entries, 0, stack_size(stack));
}
if (!stack_empty(stack)) {
g_ptr_array_remove_range(stack->entries, 0, stack_size(stack));
}
{
BT_LOGV("Advancing cursor: btr-addr=%p, cur-before=%zu, cur-after=%zu",
btr, btr->buf.at, btr->buf.at + incr);
{
BT_LOGV("Advancing cursor: btr-addr=%p, cur-before=%zu, cur-after=%zu",
btr, btr->buf.at, btr->buf.at + incr);
-int get_basic_field_type_size(struct bt_ctf_btr *btr,
- struct bt_ctf_field_type *field_type)
+int get_basic_field_type_size(struct bt_btr *btr,
+ struct bt_field_type *field_type)
- switch (bt_ctf_field_type_get_type_id(field_type)) {
- case BT_CTF_FIELD_TYPE_ID_INTEGER:
- size = bt_ctf_field_type_integer_get_size(field_type);
+ switch (bt_field_type_get_type_id(field_type)) {
+ case BT_FIELD_TYPE_ID_INTEGER:
+ size = bt_field_type_integer_get_size(field_type);
BITS_TO_BYTES_FLOOR(stitch_at_from_addr(btr));
buf_byte_at = BITS_TO_BYTES_FLOOR(buf_at_from_addr(btr));
nb_bytes = BITS_TO_BYTES_CEIL(sz);
BITS_TO_BYTES_FLOOR(stitch_at_from_addr(btr));
buf_byte_at = BITS_TO_BYTES_FLOOR(buf_at_from_addr(btr));
nb_bytes = BITS_TO_BYTES_CEIL(sz);
-enum bt_ctf_btr_status read_unsigned_bitfield(const uint8_t *buf, size_t at,
- int64_t field_size, enum bt_ctf_byte_order bo, uint64_t *v)
+enum bt_btr_status read_unsigned_bitfield(const uint8_t *buf, size_t at,
+ int64_t field_size, enum bt_byte_order bo, uint64_t *v)
bt_bitfield_read_be(buf, uint8_t, at, field_size, v);
break;
bt_bitfield_read_be(buf, uint8_t, at, field_size, v);
break;
bt_bitfield_read_le(buf, uint8_t, at, field_size, v);
break;
default:
bt_bitfield_read_le(buf, uint8_t, at, field_size, v);
break;
default:
BT_LOGV("Read unsigned bit array: cur=%zu, size=%" PRId64 ", "
"bo=%s, val=%" PRIu64, at, field_size,
BT_LOGV("Read unsigned bit array: cur=%zu, size=%" PRId64 ", "
"bo=%s, val=%" PRIu64, at, field_size,
-enum bt_ctf_btr_status read_signed_bitfield(const uint8_t *buf, size_t at,
- int64_t field_size, enum bt_ctf_byte_order bo, int64_t *v)
+enum bt_btr_status read_signed_bitfield(const uint8_t *buf, size_t at,
+ int64_t field_size, enum bt_byte_order bo, int64_t *v)
bt_bitfield_read_be(buf, uint8_t, at, field_size, v);
break;
bt_bitfield_read_be(buf, uint8_t, at, field_size, v);
break;
bt_bitfield_read_le(buf, uint8_t, at, field_size, v);
break;
default:
bt_bitfield_read_le(buf, uint8_t, at, field_size, v);
break;
default:
BT_LOGV("Read signed bit array: cur=%zu, size=%" PRId64 ", "
"bo=%s, val=%" PRId64, at, field_size,
BT_LOGV("Read signed bit array: cur=%zu, size=%" PRId64 ", "
"bo=%s, val=%" PRId64, at, field_size,
-enum bt_ctf_btr_status validate_contiguous_bo(struct bt_ctf_btr *btr,
- enum bt_ctf_byte_order next_bo)
+enum bt_btr_status validate_contiguous_bo(struct bt_btr *btr,
+ enum bt_byte_order next_bo)
- case BT_CTF_BYTE_ORDER_BIG_ENDIAN:
- case BT_CTF_BYTE_ORDER_NETWORK:
- if (next_bo != BT_CTF_BYTE_ORDER_BIG_ENDIAN &&
- next_bo != BT_CTF_BYTE_ORDER_NETWORK) {
- status = BT_CTF_BTR_STATUS_ERROR;
+ case BT_BYTE_ORDER_BIG_ENDIAN:
+ case BT_BYTE_ORDER_NETWORK:
+ if (next_bo != BT_BYTE_ORDER_BIG_ENDIAN &&
+ next_bo != BT_BYTE_ORDER_NETWORK) {
+ status = BT_BTR_STATUS_ERROR;
- case BT_CTF_BYTE_ORDER_LITTLE_ENDIAN:
- if (next_bo != BT_CTF_BYTE_ORDER_LITTLE_ENDIAN) {
- status = BT_CTF_BTR_STATUS_ERROR;
+ case BT_BYTE_ORDER_LITTLE_ENDIAN:
+ if (next_bo != BT_BYTE_ORDER_LITTLE_ENDIAN) {
+ status = BT_BTR_STATUS_ERROR;
}
end:
if (status < 0) {
BT_LOGW("Cannot read bit array: two different byte orders not at a byte boundary: "
"btr-addr=%p, last-bo=%s, next-bo=%s",
}
end:
if (status < 0) {
BT_LOGW("Cannot read bit array: two different byte orders not at a byte boundary: "
"btr-addr=%p, last-bo=%s, next-bo=%s",
- btr, bt_ctf_byte_order_string(btr->last_bo),
- bt_ctf_byte_order_string(next_bo));
+ btr, bt_common_byte_order_string(btr->last_bo),
+ bt_common_byte_order_string(next_bo));
status = read_unsigned_bitfield(buf, at, field_size, bo, &v);
status = read_unsigned_bitfield(buf, at, field_size, bo, &v);
BT_LOGW("Cannot read unsigned 32-bit bit array for floating point number field: "
"btr-addr=%p, status=%s",
BT_LOGW("Cannot read unsigned 32-bit bit array for floating point number field: "
"btr-addr=%p, status=%s",
status = read_unsigned_bitfield(buf, at, field_size, bo,
&f64.u);
status = read_unsigned_bitfield(buf, at, field_size, bo,
&f64.u);
BT_LOGW("Cannot read unsigned 64-bit bit array for floating point number field: "
"btr-addr=%p, status=%s",
BT_LOGW("Cannot read unsigned 64-bit bit array for floating point number field: "
"btr-addr=%p, status=%s",
/* Only 32-bit and 64-bit fields are supported currently */
BT_LOGW("Only 32-bit and 64-bit floating point number fields are supported: "
"btr-addr=%p", btr);
/* Only 32-bit and 64-bit fields are supported currently */
BT_LOGW("Only 32-bit and 64-bit floating point number fields are supported: "
"btr-addr=%p", btr);
status = btr->user.cbs.types.floating_point(dblval,
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
status = btr->user.cbs.types.floating_point(dblval,
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
- struct bt_ctf_field_type *int_type,
- struct bt_ctf_field_type *orig_type)
+ struct bt_field_type *int_type,
+ struct bt_field_type *orig_type)
field_size = get_basic_field_type_size(btr, int_type);
if (field_size < 1) {
BT_LOGW("Cannot get integer field type's size: "
"btr=%p, at=%zu, ft-addr=%p",
btr, at, int_type);
field_size = get_basic_field_type_size(btr, int_type);
if (field_size < 1) {
BT_LOGW("Cannot get integer field type's size: "
"btr=%p, at=%zu, ft-addr=%p",
btr, at, int_type);
int64_t v;
status = read_signed_bitfield(buf, at, field_size, bo, &v);
int64_t v;
status = read_signed_bitfield(buf, at, field_size, bo, &v);
BT_LOGW("Cannot read signed bit array for signed integer field: "
"btr-addr=%p, status=%s",
BT_LOGW("Cannot read signed bit array for signed integer field: "
"btr-addr=%p, status=%s",
status = btr->user.cbs.types.signed_int(v,
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
status = btr->user.cbs.types.signed_int(v,
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
}
}
} else {
uint64_t v;
status = read_unsigned_bitfield(buf, at, field_size, bo, &v);
}
}
} else {
uint64_t v;
status = read_unsigned_bitfield(buf, at, field_size, bo, &v);
BT_LOGW("Cannot read unsigned bit array for unsigned integer field: "
"btr-addr=%p, status=%s",
BT_LOGW("Cannot read unsigned bit array for unsigned integer field: "
"btr-addr=%p, status=%s",
status = btr->user.cbs.types.unsigned_int(v,
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
status = btr->user.cbs.types.unsigned_int(v,
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
const uint8_t *buf, size_t at)
{
return read_basic_int_and_call(btr, buf, at, btr->cur_basic_field_type,
const uint8_t *buf, size_t at)
{
return read_basic_int_and_call(btr, buf, at, btr->cur_basic_field_type,
status = read_basic_int_and_call(btr, buf, at,
int_field_type, btr->cur_basic_field_type);
bt_put(int_field_type);
status = read_basic_int_and_call(btr, buf, at,
int_field_type, btr->cur_basic_field_type);
bt_put(int_field_type);
if (!at_least_one_bit_left(btr)) {
BT_LOGV("Reached end of data: btr-addr=%p", btr);
if (!at_least_one_bit_left(btr)) {
BT_LOGV("Reached end of data: btr-addr=%p", btr);
BT_LOGW("Cannot get basic field type's size: "
"btr-addr=%p, ft-addr=%p",
btr, btr->cur_basic_field_type);
BT_LOGW("Cannot get basic field type's size: "
"btr-addr=%p, ft-addr=%p",
btr, btr->cur_basic_field_type);
stitch_append_from_buf(btr, needed_bits);
status = read_basic_and_call_cb(btr, btr->stitch.buf,
btr->stitch.offset);
stitch_append_from_buf(btr, needed_bits);
status = read_basic_and_call_cb(btr, btr->stitch.buf,
btr->stitch.offset);
BT_LOGW("Cannot read basic field: "
"btr-addr=%p, ft-addr=%p, status=%s",
btr, btr->cur_basic_field_type,
BT_LOGW("Cannot read basic field: "
"btr-addr=%p, ft-addr=%p, status=%s",
btr, btr->cur_basic_field_type,
/* We are here; it means we don't have enough data to decode this */
BT_LOGV_STR("Not enough data to read the next basic field: appending to stitch buffer.");
stitch_append_from_remaining_buf(btr);
/* We are here; it means we don't have enough data to decode this */
BT_LOGV_STR("Not enough data to read the next basic field: appending to stitch buffer.");
stitch_append_from_remaining_buf(btr);
if (!at_least_one_bit_left(btr)) {
BT_LOGV("Reached end of data: btr-addr=%p", btr);
if (!at_least_one_bit_left(btr)) {
BT_LOGV("Reached end of data: btr-addr=%p", btr);
BT_LOGW("Cannot get basic field type's size: "
"btr-addr=%p, ft-addr=%p",
btr, btr->cur_basic_field_type);
BT_LOGW("Cannot get basic field type's size: "
"btr-addr=%p, ft-addr=%p",
btr, btr->cur_basic_field_type);
BT_LOGW("Cannot read basic field: "
"btr-addr=%p, ft-addr=%p, status=%s",
btr, btr->cur_basic_field_type,
BT_LOGW("Cannot read basic field: "
"btr-addr=%p, ft-addr=%p, status=%s",
btr, btr->cur_basic_field_type,
BT_LOGV_STR("Not enough data to read the next basic field: setting stitch buffer.");
stitch_set_from_remaining_buf(btr);
btr->state = BTR_STATE_READ_BASIC_CONTINUE;
BT_LOGV_STR("Not enough data to read the next basic field: setting stitch buffer.");
stitch_set_from_remaining_buf(btr);
btr->state = BTR_STATE_READ_BASIC_CONTINUE;
{
return read_basic_type_and_call_continue(btr,
read_basic_int_and_call_cb);
}
static inline
{
return read_basic_type_and_call_continue(btr,
read_basic_int_and_call_cb);
}
static inline
{
return read_basic_type_and_call_begin(btr,
read_basic_float_and_call_cb);
}
static inline
{
return read_basic_type_and_call_begin(btr,
read_basic_float_and_call_cb);
}
static inline
{
return read_basic_type_and_call_continue(btr,
read_basic_float_and_call_cb);
}
static inline
{
return read_basic_type_and_call_continue(btr,
read_basic_float_and_call_cb);
}
static inline
{
return read_basic_type_and_call_begin(btr,
read_basic_enum_and_call_cb);
}
static inline
{
return read_basic_type_and_call_begin(btr,
read_basic_enum_and_call_cb);
}
static inline
{
return read_basic_type_and_call_continue(btr,
read_basic_enum_and_call_cb);
}
static inline
{
return read_basic_type_and_call_continue(btr,
read_basic_enum_and_call_cb);
}
static inline
-enum bt_ctf_btr_status read_basic_string_type_and_call(
- struct bt_ctf_btr *btr, bool begin)
+enum bt_btr_status read_basic_string_type_and_call(
+ struct bt_btr *btr, bool begin)
if (!at_least_one_bit_left(btr)) {
BT_LOGV("Reached end of data: btr-addr=%p", btr);
if (!at_least_one_bit_left(btr)) {
BT_LOGV("Reached end of data: btr-addr=%p", btr);
available_bytes = BITS_TO_BYTES_FLOOR(available_bits(btr));
buf_at_bytes = BITS_TO_BYTES_FLOOR(buf_at_from_addr(btr));
available_bytes = BITS_TO_BYTES_FLOOR(available_bits(btr));
buf_at_bytes = BITS_TO_BYTES_FLOOR(buf_at_from_addr(btr));
first_chr = &btr->buf.addr[buf_at_bytes];
result = memchr(first_chr, '\0', available_bytes);
first_chr = &btr->buf.addr[buf_at_bytes];
result = memchr(first_chr, '\0', available_bytes);
status = btr->user.cbs.types.string_begin(
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
status = btr->user.cbs.types.string_begin(
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
available_bytes, btr->cur_basic_field_type,
btr->user.data);
BT_LOGV("User function returned: status=%s",
available_bytes, btr->cur_basic_field_type,
btr->user.data);
BT_LOGV("User function returned: status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
goto end;
}
}
consume_bits(btr, BYTES_TO_BITS(available_bytes));
btr->state = BTR_STATE_READ_BASIC_CONTINUE;
goto end;
}
}
consume_bits(btr, BYTES_TO_BITS(available_bytes));
btr->state = BTR_STATE_READ_BASIC_CONTINUE;
result_len, btr->cur_basic_field_type,
btr->user.data);
BT_LOGV("User function returned: status=%s",
result_len, btr->cur_basic_field_type,
btr->user.data);
BT_LOGV("User function returned: status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
status = btr->user.cbs.types.string_end(
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
status = btr->user.cbs.types.string_end(
btr->cur_basic_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
BT_LOGW("User function failed: "
"btr-addr=%p, status=%s",
- switch (bt_ctf_field_type_get_type_id(btr->cur_basic_field_type)) {
- case BT_CTF_FIELD_TYPE_ID_INTEGER:
+ switch (bt_field_type_get_type_id(btr->cur_basic_field_type)) {
+ case BT_FIELD_TYPE_ID_INTEGER:
status = read_basic_string_type_and_call(btr, true);
break;
default:
BT_LOGF("Unknown basic field type ID: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
btr, btr->cur_basic_field_type,
status = read_basic_string_type_and_call(btr, true);
break;
default:
BT_LOGF("Unknown basic field type ID: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
btr, btr->cur_basic_field_type,
- switch (bt_ctf_field_type_get_type_id(btr->cur_basic_field_type)) {
- case BT_CTF_FIELD_TYPE_ID_INTEGER:
+ switch (bt_field_type_get_type_id(btr->cur_basic_field_type)) {
+ case BT_FIELD_TYPE_ID_INTEGER:
status = read_basic_string_type_and_call(btr, false);
break;
default:
BT_LOGF("Unknown basic field type ID: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
btr, btr->cur_basic_field_type,
status = read_basic_string_type_and_call(btr, false);
break;
default:
BT_LOGF("Unknown basic field type ID: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
btr, btr->cur_basic_field_type,
-enum bt_ctf_btr_status align_type_state(struct bt_ctf_btr *btr,
- struct bt_ctf_field_type *field_type, enum btr_state next_state)
+enum bt_btr_status align_type_state(struct bt_btr *btr,
+ struct bt_field_type *field_type, enum btr_state next_state)
if (field_alignment < 0) {
BT_LOGW("Cannot get field type's alignment: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
btr, field_type,
if (field_alignment < 0) {
BT_LOGW("Cannot get field type's alignment: "
"btr-addr=%p, ft-addr=%p, ft-id=%s",
btr, field_type,
- bt_ctf_field_type_id_string(
- bt_ctf_field_type_get_type_id(field_type)));
- status = BT_CTF_BTR_STATUS_ERROR;
+ bt_common_field_type_id_string(
+ bt_field_type_get_type_id(field_type)));
+ status = BT_BTR_STATUS_ERROR;
- return id == BT_CTF_FIELD_TYPE_ID_STRUCT || id == BT_CTF_FIELD_TYPE_ID_ARRAY ||
- id == BT_CTF_FIELD_TYPE_ID_SEQUENCE || id == BT_CTF_FIELD_TYPE_ID_VARIANT;
+ return id == BT_FIELD_TYPE_ID_STRUCT || id == BT_FIELD_TYPE_ID_ARRAY ||
+ id == BT_FIELD_TYPE_ID_SEQUENCE || id == BT_FIELD_TYPE_ID_VARIANT;
status = btr->user.cbs.types.compound_end(
top->base_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
status = btr->user.cbs.types.compound_end(
top->base_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
- switch (bt_ctf_field_type_get_type_id(top->base_type)) {
- case BT_CTF_FIELD_TYPE_ID_STRUCT:
- ret = bt_ctf_field_type_structure_get_field(
+ switch (bt_field_type_get_type_id(top->base_type)) {
+ case BT_FIELD_TYPE_ID_STRUCT:
+ ret = bt_field_type_structure_get_field_by_index(
top->base_type, NULL, &next_field_type,
top->index);
if (ret) {
next_field_type = NULL;
}
break;
top->base_type, NULL, &next_field_type,
top->index);
if (ret) {
next_field_type = NULL;
}
break;
/* Variant types are dynamic: query the user, he should know! */
next_field_type =
btr->user.cbs.query.get_variant_type(
/* Variant types are dynamic: query the user, he should know! */
next_field_type =
btr->user.cbs.query.get_variant_type(
"btr-addr=%p, base-ft-addr=%p, base-ft-id=%s, "
"index=%" PRId64,
btr, top->base_type,
"btr-addr=%p, base-ft-addr=%p, base-ft-id=%s, "
"index=%" PRId64,
btr, top->base_type,
- bt_ctf_field_type_id_string(
- bt_ctf_field_type_get_type_id(top->base_type)),
+ bt_common_field_type_id_string(
+ bt_field_type_get_type_id(top->base_type)),
status = btr->user.cbs.types.compound_begin(
next_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
status = btr->user.cbs.types.compound_begin(
next_field_type, btr->user.data);
BT_LOGV("User function returned: status=%s",
ret = stack_push_with_len(btr, next_field_type);
if (ret) {
/* stack_push_with_len() logs errors */
ret = stack_push_with_len(btr, next_field_type);
if (ret) {
/* stack_push_with_len() logs errors */
BT_LOGV("Handling state: btr-addr=%p, state=%s",
btr, btr_state_string(btr->state));
BT_LOGV("Handling state: btr-addr=%p, state=%s",
btr, btr_state_string(btr->state));
{
BT_LOGD("Resetting BTR: addr=%p", btr);
stack_clear(btr->stack);
BT_PUT(btr->cur_basic_field_type);
stitch_reset(btr);
btr->buf.addr = NULL;
{
BT_LOGD("Resetting BTR: addr=%p", btr);
stack_clear(btr->stack);
BT_PUT(btr->cur_basic_field_type);
stitch_reset(btr);
btr->buf.addr = NULL;
{
BT_LOGV("Updating packet offset for next call: "
"btr-addr=%p, cur-packet-offset=%zu, next-packet-offset=%zu",
{
BT_LOGV("Updating packet offset for next call: "
"btr-addr=%p, cur-packet-offset=%zu, next-packet-offset=%zu",
-size_t bt_ctf_btr_start(struct bt_ctf_btr *btr,
- struct bt_ctf_field_type *type, const uint8_t *buf,
+size_t bt_btr_start(struct bt_btr *btr,
+ struct bt_field_type *type, const uint8_t *buf,
size_t offset, size_t packet_offset, size_t sz,
size_t offset, size_t packet_offset, size_t sz,
BT_LOGV("Starting decoding: btr-addr=%p, ft-addr=%p, "
"buf-addr=%p, buf-size=%zu, offset=%zu, "
BT_LOGV("Starting decoding: btr-addr=%p, ft-addr=%p, "
"buf-addr=%p, buf-size=%zu, offset=%zu, "
*status = btr->user.cbs.types.compound_begin(
type, btr->user.data);
BT_LOGV("User function returned: status=%s",
*status = btr->user.cbs.types.compound_begin(
type, btr->user.data);
BT_LOGV("User function returned: status=%s",
stack_ret = stack_push_with_len(btr, type);
if (stack_ret) {
/* stack_push_with_len() logs errors */
stack_ret = stack_push_with_len(btr, type);
if (stack_ret) {
/* stack_push_with_len() logs errors */
BT_LOGV("Continuing decoding: btr-addr=%p, buf-addr=%p, buf-size=%zu",
btr, buf, sz);
BT_LOGV("Continuing decoding: btr-addr=%p, buf-addr=%p, buf-size=%zu",
btr, buf, sz);