diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-12-01 14:46:28 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-01-24 15:58:24 -0300 |
commit | 74f21ed08e4313f0a41c64f7b5d3dfbd87580d42 (patch) | |
tree | b9fc3b14ceb7747982660755000cea83957e520f | |
parent | bc1538dcb14bc4d9c8b5095b0de4e1b7f7e14fbb (diff) | |
download | pahole-74f21ed08e4313f0a41c64f7b5d3dfbd87580d42.tar.gz |
pahole: Set libbpf debug printer in -V mode
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | pahole.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1181,6 +1181,13 @@ static void print_containers(struct cu *cu, uint32_t type, int ident) } } +static int +libbpf_print_all_levels(__maybe_unused enum libbpf_print_level level, + const char *format, va_list args) +{ + return vfprintf(stderr, format, args); +} + /* Name and version of program. */ ARGP_PROGRAM_VERSION_HOOK_DEF = dwarves_print_version; @@ -1704,7 +1711,9 @@ static error_t pahole__options_parser(int key, char *arg, formatter = NULL; break; case 't': separator = arg[0]; break; case 'u': defined_in = 1; break; - case 'V': global_verbose = 1; break; + case 'V': global_verbose = 1; + libbpf_set_print(libbpf_print_all_levels); + break; case 'w': word_size = atoi(arg); break; case 'X': cu__exclude_prefix = arg; cu__exclude_prefix_len = strlen(cu__exclude_prefix); |