bool is_plain_text)
 {
        if (is_plain_text)
-               jsonw_printf(jw, "%p", *(unsigned long *)data);
+               jsonw_printf(jw, "%p", data);
        else
-               jsonw_printf(jw, "%u", *(unsigned long *)data);
+               jsonw_printf(jw, "%lu", *(unsigned long *)data);
 }
 
 static int btf_dumper_modifier(const struct btf_dumper *d, __u32 type_id,
        switch (BTF_INT_ENCODING(*int_type)) {
        case 0:
                if (BTF_INT_BITS(*int_type) == 64)
-                       jsonw_printf(jw, "%lu", *(__u64 *)data);
+                       jsonw_printf(jw, "%llu", *(__u64 *)data);
                else if (BTF_INT_BITS(*int_type) == 32)
                        jsonw_printf(jw, "%u", *(__u32 *)data);
                else if (BTF_INT_BITS(*int_type) == 16)
                break;
        case BTF_INT_SIGNED:
                if (BTF_INT_BITS(*int_type) == 64)
-                       jsonw_printf(jw, "%ld", *(long long *)data);
+                       jsonw_printf(jw, "%lld", *(long long *)data);
                else if (BTF_INT_BITS(*int_type) == 32)
                        jsonw_printf(jw, "%d", *(int *)data);
                else if (BTF_INT_BITS(*int_type) == 16)