]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: create: structure and union member addition
authorNick Alcock <nick.alcock@oracle.com>
Thu, 24 Apr 2025 15:47:14 +0000 (16:47 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:07:42 +0000 (18:07 +0100)
commit20e6f72dc7a799b39f259a5138e307937969099b
tree929df9499b961009ec13c31f3071ed96d6a69224
parentcd8ea316666124567584637c179f3079d0083d11
libctf: create: structure and union member addition

There is one API addition here:

int ctf_add_member_bitfield (ctf_dict_t *, ctf_id_t souid,
                             const char *, ctf_id_t type,
                             unsigned long bit_offset,
                             int bit_width);

SoU addition handles the representational changes for bitfields and for
CTF_K_BIG structs (i.e. all structs you can add members to), errors out if
you add bitfields to structs that aren't created with the
CTF_ADD_STRUCT_BITFIELDS flag, and arranges to add padding as needed if
there is too much of a gap for the offsets to encode in one hop (that
part is still untested).
include/ctf-api.h
libctf/ctf-create.c
libctf/ctf-impl.h
libctf/ctf-types.c
libctf/libctf.ver