From: Nick Alcock Date: Sun, 9 Nov 2025 14:39:03 +0000 (+0000) Subject: include: struct members must be added in ascending order by offset X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8da1903fb588ebfa191892cfeaef44b0b5d12f14;p=thirdparty%2Fbinutils-gdb.git include: struct members must be added in ascending order by offset We've thrown ECTF_DESCENDING for some time if this wasn't true. (In theory this restriction could be lifted later on if necessary, but in practice since this means adding the members in a different order from their C declaration, this seems unlikely ever to be something anyone would want to do.) include/ * ctf-api.h (ctf_add_member): You cannot add struct members backwards any more. --- diff --git a/include/ctf-api.h b/include/ctf-api.h index e6c11164a2c..c85427ad4bc 100644 --- a/include/ctf-api.h +++ b/include/ctf-api.h @@ -1024,7 +1024,7 @@ extern ctf_ret_t ctf_add_enumerator (ctf_dict_t *, ctf_id_t, const char *, int64 /* Add a member to a struct or union, either at the next available offset (with suitable padding for the alignment) or at a specific offset, and possibly with a specific encoding (creating a slice for you). Offsets need not be - unique, and need not be added in ascending order. ctf_add_member_bitfield + unique, but must be added in ascending order. ctf_add_member_bitfield with a nonzero bit_width will fail unless the struct was created with CTF_ADD_STRUCT_BITFIELDS. */