Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf: Allow kernel_struct_has_field to reach field in unnamed struc…
…t or union Some fields can belong to unnamed struct or union (e.g. rcu and rcu_users fields of task_struct). In C, they are accessed as if their belong directly to the parent of the unnamed struct or union but this is not the case for BTF. When looking for a field, kernel_struct_has_field should also look reccursively into unnamed structs or unions. That allows code such as the following to work as expected: BPF.kernel_struct_has_field('task_struct', 'rcu') Signed-off-by: Jerome Marchand <[email protected]>
- Loading branch information