pahole: Use conf_load.kabi_prefix
Should work just as before, i.e. we hook at wher we read strings from DWARF. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
2b9bd83e63
commit
f4a77d0390
3
pahole.c
3
pahole.c
|
@ -1322,7 +1322,8 @@ static error_t pahole__options_parser(int key, char *arg,
|
|||
case ARGP_btf_base:
|
||||
base_btf_file = arg; break;
|
||||
case ARGP_kabi_prefix:
|
||||
kabi_prefix = arg; break;
|
||||
conf_load.kabi_prefix = arg;
|
||||
conf_load.kabi_prefix_len = strlen(arg); break;
|
||||
case ARGP_numeric_version:
|
||||
print_numeric_version = true; break;
|
||||
case ARGP_btf_gen_floats:
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include "dutil.h"
|
||||
|
||||
const char *kabi_prefix;
|
||||
|
||||
struct strings *strings__new(void)
|
||||
{
|
||||
struct strings *strs = malloc(sizeof(*strs));
|
||||
|
@ -50,10 +48,7 @@ strings_t strings__add(struct strings *strs, const char *str)
|
|||
if (str == NULL)
|
||||
return 0;
|
||||
|
||||
if (kabi_prefix && strncmp(str, kabi_prefix, strlen(kabi_prefix)) == 0)
|
||||
index = btf__add_str(strs->btf, kabi_prefix);
|
||||
else
|
||||
index = btf__add_str(strs->btf, str);
|
||||
index = btf__add_str(strs->btf, str);
|
||||
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue