On 5/31/22 4:57 PM, Andrii Nakryiko wrote:
On Thu, May 26, 2022 at 11:55 AM Yonghong Song <yhs@xxxxxx> wrote:
Add enum64 btf dumping support. For long long and unsigned long long
dump, suffixes 'LL' and 'ULL' are added to avoid compilation errors
in some cases.
Signed-off-by: Yonghong Song <yhs@xxxxxx>
---
tools/lib/bpf/btf.h | 5 ++
tools/lib/bpf/btf_dump.c | 128 ++++++++++++++++++++++++++++++---------
2 files changed, 103 insertions(+), 30 deletions(-)
I suspect we have bug in btf_dump_get_enum_value(), we unconditionally
sign-extend values. It seems wrong. Can you please extend that part to
take into account signed bit (kflag) and do a proper signed/unsigned
casting? Thanks!
You are right. Will fix.
Other than that, it looks good!