diff --git a/btf_loader.c b/btf_loader.c index a71cece..5957572 100644 --- a/btf_loader.c +++ b/btf_loader.c @@ -541,13 +541,6 @@ static void btf__cu_delete(struct cu *cu) cu->priv = NULL; } -static const char *btf__strings_ptr(const struct cu *cu, strings_t s) -{ - const char *str = btf__str_by_offset(cu->priv, s); - - return str && str[0] == '\0' ? NULL : str; -} - static int libbpf_log(enum libbpf_print_level level, const char *format, va_list args) { return vfprintf(stderr, format, args); @@ -603,6 +596,5 @@ out_free: struct debug_fmt_ops btf__ops = { .name = "btf", .load_file = cus__load_btf, - .strings__ptr = btf__strings_ptr, .cu__delete = btf__cu_delete, }; diff --git a/ctf_loader.c b/ctf_loader.c index cae2bea..9aeeaa4 100644 --- a/ctf_loader.c +++ b/ctf_loader.c @@ -694,11 +694,6 @@ static void ctf__cu_delete(struct cu *cu) cu->priv = NULL; } -static const char *ctf__strings_ptr(const struct cu *cu, strings_t s) -{ - return ctf__string(cu->priv, s); -} - struct debug_fmt_ops ctf__ops; int ctf__load_file(struct cus *cus, struct conf_load *conf, @@ -745,6 +740,5 @@ int ctf__load_file(struct cus *cus, struct conf_load *conf, struct debug_fmt_ops ctf__ops = { .name = "ctf", .load_file = ctf__load_file, - .strings__ptr = ctf__strings_ptr, .cu__delete = ctf__cu_delete, }; diff --git a/dwarf_loader.c b/dwarf_loader.c index 0eb9e00..04137a6 100644 --- a/dwarf_loader.c +++ b/dwarf_loader.c @@ -2280,12 +2280,6 @@ static unsigned long long dwarf_tag__orig_id(const struct tag *tag, return cu->extra_dbg_info ? dtag->id : 0; } -static const char *dwarf__strings_ptr(const struct cu *cu __maybe_unused, - strings_t s) -{ - return s ? strings__ptr(strings, s) : NULL; -} - struct debug_fmt_ops dwarf__ops; static int die__process(Dwarf_Die *die, struct cu *cu) @@ -2923,7 +2917,6 @@ struct debug_fmt_ops dwarf__ops = { .init = dwarf__init, .exit = dwarf__exit, .load_file = dwarf__load_file, - .strings__ptr = dwarf__strings_ptr, .tag__decl_file = dwarf_tag__decl_file, .tag__decl_line = dwarf_tag__decl_line, .tag__orig_id = dwarf_tag__orig_id, diff --git a/dwarves.h b/dwarves.h index 90e2f4d..db2c524 100644 --- a/dwarves.h +++ b/dwarves.h @@ -202,7 +202,6 @@ struct debug_fmt_ops { const struct cu *cu); void (*tag__free_orig_info)(struct tag *tag, struct cu *cu); - const char *(*strings__ptr)(const struct cu *cu, strings_t s); void (*cu__delete)(struct cu *cu); bool has_alignment_info; };