public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "david.faust at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/111735] incorrect BTF representation of forward-declared enums Date: Tue, 05 Dec 2023 23:05:07 +0000 [thread overview] Message-ID: <bug-111735-4-OJSsFZNwix@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111735-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111735 David Faust <david.faust at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david.faust at oracle dot com --- Comment #1 from David Faust <david.faust at oracle dot com> --- Sorry for the delay, somehow I missed this until now. Confirmed... though this really ought to be further discussed and formalized with the kernel BPF folks. As of now, btf.rst does not specify any representation at all for forward-declared enums. And, it lists in 'encoding requirements' for BTF_KIND_ENUM that 'size' must be one of 1/2/4/8, so in a sense this de-facto representation is not really valid. IMO it would be better to adjust the BTF_KIND_FWD definition to support forward-declared enums. CTF for example encodes the kind of the forward in the 'type' field of its KIND_FWD, which in BTF is simply unused. Anyway, that can be raised for discussion on the bpf list. In the meanwhile, it should not be problematic to adapt GCC to follow clang and pahole in emitting KIND_ENUM with vlen=0.
next prev parent reply other threads:[~2023-12-05 23:05 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-09 11:37 [Bug debug/111735] New: " gprocida at google dot com 2023-12-05 23:05 ` david.faust at oracle dot com [this message] 2023-12-19 18:00 ` [Bug debug/111735] " cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-111735-4-OJSsFZNwix@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).