]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libctf: CTFv4: core opening (other than the type table)
authorNick Alcock <nick.alcock@oracle.com>
Thu, 24 Apr 2025 13:44:12 +0000 (14:44 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 25 Apr 2025 17:07:42 +0000 (18:07 +0100)
commitf7d05ab34273ea5140272c1d14564160d659df0c
tree3d4cb1fdf889635193c6edb109fb03ac87e8ae25
parent99e9ab48285cbbed4e09bcfc7a59864fa640133d
libctf: CTFv4: core opening (other than the type table)

This commit modifies the core opening code to handle opening CTFv4 and BTF.
Much of the back-compatibility side is left for later and is currently
untested, as is the type table side of things.

We keep the v3 header (if any) stashed away in ctf_dict_t.ctf_v3_header, for
the sake of the CTF dumper; we "upgrade" the BTF header to CTF (so that the
rest of the code can ignore the distinction, and so that you can do CTFish
things like adding symtypetab entries even to things opened as BTF), but
keep note of the fact that it was opened as BTF in ctf_dict_t.ctf_opened_btf,
so that things like ctf_import can allow for the absence of the various
parent-length fields.

A couple of ctf_dict_t fields are renamed for consistency with the headers'
names for them (ctf_parname becomes ctf_parent_name; ctf_dynparname becomes
ctf_dyn_parent_name; ctf_cuname becomes ctf_cu_name).  Not all users are yet
adjusted.
libctf/ctf-impl.h
libctf/ctf-open.c