-uint64_t ctf_uint_read(struct stream_pos *ppos,
- const struct declaration_integer *integer_declaration)
-{
- struct ctf_stream_pos *pos = ctf_pos(ppos);
- uint64_t v = 0;
-
- ctf_align_pos(pos, integer_declaration->p.alignment);
- if (integer_declaration->byte_order == LITTLE_ENDIAN)
- bt_bitfield_read_le(pos->base, unsigned long, pos->offset,
- integer_declaration->len, &v);
- else
- bt_bitfield_read_be(pos->base, unsigned long, pos->offset,
- integer_declaration->len, &v);
- ctf_move_pos(pos, integer_declaration->len);
- return v;
-}
-
-int64_t ctf_int_read(struct stream_pos *ppos,
- const struct declaration_integer *integer_declaration)
-{
- struct ctf_stream_pos *pos = ctf_pos(ppos);
- int64_t v = 0;
-
- ctf_align_pos(pos, integer_declaration->p.alignment);
- if (integer_declaration->byte_order == LITTLE_ENDIAN)
- bt_bitfield_read_le(pos->base, unsigned long, pos->offset,
- integer_declaration->len, &v);
- else
- bt_bitfield_read_be(pos->base, unsigned long, pos->offset,
- integer_declaration->len, &v);
- ctf_move_pos(pos, integer_declaration->len);
- return v;
-}
-
-void ctf_uint_write(struct stream_pos *ppos,
- const struct declaration_integer *integer_declaration,
- uint64_t v)
-{
- struct ctf_stream_pos *pos = ctf_pos(ppos);
-
- ctf_align_pos(pos, integer_declaration->p.alignment);
- if (pos->dummy)
- goto end;
- if (integer_declaration->byte_order == LITTLE_ENDIAN)
- bt_bitfield_write_le(pos->base, unsigned long, pos->offset,
- integer_declaration->len, v);
- else
- bt_bitfield_write_be(pos->base, unsigned long, pos->offset,
- integer_declaration->len, v);
-end:
- ctf_move_pos(pos, integer_declaration->len);
-}
-
-void ctf_int_write(struct stream_pos *ppos,
- const struct declaration_integer *integer_declaration,
- int64_t v)