Re: [PATCH bpf] libbpf: teach btf_dumper to emit stand-alone anonymous enum definitions

2019-09-26 Thread Daniel Borkmann
On Wed, Sep 25, 2019 at 01:37:45PM -0700, Andrii Nakryiko wrote: > BTF-to-C converter previously skipped anonymous enums in an assumption > that those are embedded in struct's field definitions. This is not > always the case and a lot of kernel constants are defined as part of > anonymous enums. Th

[PATCH bpf] libbpf: teach btf_dumper to emit stand-alone anonymous enum definitions

2019-09-25 Thread Andrii Nakryiko
BTF-to-C converter previously skipped anonymous enums in an assumption that those are embedded in struct's field definitions. This is not always the case and a lot of kernel constants are defined as part of anonymous enums. This change fixes the logic by eagerly marking all types as either referenc