HomeFreeBSD

ctfconvert: Give bitfield types names distinct from the base type

Description

ctfconvert: Give bitfield types names distinct from the base type

CTF integers have an explicit width and so can be used to represent
bitfields. Bitfield types emitted by ctfconvert(1) share the name of
the base integer type, so a struct field with type "unsigned int : 15"
will have a type named "unsigned int".

To avoid ambiguity when looking up types by name, add a suffix to names
of bitfield types to distinguish them from the base type. Then, if
ctfmerge happens to order bitfield types before the corresponding base
type in a CTF file, a name lookup will return the base type, which is
always going to be the desired behaviour.

PR: 265403
Reported by: cy
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 1165fc9a526630487a1feb63daef65c5aee1a583)

Details

Provenance
markjAuthored on Aug 3 2022, 12:32 AM
Parents
rGcf63676e086f: dtrace tests: Override RLIMIT_CORE for a test which triggers a core dump
Branches
Unknown
Tags
Unknown