diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-12-17 21:11:48 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-12-17 21:11:48 +0100 |
commit | b3c810fb04a63813e0d0af28fd45fbd22c05df2e (patch) | |
tree | 21a67cba6dc666f3e3ca2ea3850c28b3f77eb085 /tests/backtrace-dwarf.c | |
parent | 6cd283c92084706a20519f82d3ec5477af332fec (diff) | |
download | elfutils-b3c810fb04a63813e0d0af28fd45fbd22c05df2e.tar.gz |
Remove tests/backtrace-dwarf.c unused code.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Diffstat (limited to 'tests/backtrace-dwarf.c')
-rw-r--r-- | tests/backtrace-dwarf.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c index 92c892dc..aa12315a 100644 --- a/tests/backtrace-dwarf.c +++ b/tests/backtrace-dwarf.c @@ -61,46 +61,6 @@ pid_to_dwfl (pid_t pid) return dwfl; } -static const char *executable = "/proc/self/exe"; - -static int -find_elf (Dwfl_Module *mod, void **userdata, const char *modname, - Dwarf_Addr base, char **file_name, Elf **elfp) -{ - if (executable && modname != NULL - && (strcmp (modname, "[exe]") == 0 || strcmp (modname, "[pie]") == 0)) - { - char *executable_dup = strdup (executable); - if (executable_dup) - { - free (*file_name); - *file_name = executable_dup; - return -1; - } - } - return dwfl_build_id_find_elf (mod, userdata, modname, base, file_name, elfp); -} - -static Dwfl * -dwfl_offline (void) -{ - static char *debuginfo_path; - static const Dwfl_Callbacks offline_callbacks = - { - .find_debuginfo = dwfl_standard_find_debuginfo, - .debuginfo_path = &debuginfo_path, - - .section_address = dwfl_offline_section_address, - - /* We use this table for core files too. */ - .find_elf = find_elf, - }; - Dwfl *dwfl = dwfl_begin (&offline_callbacks); - if (dwfl == NULL) - error (2, 0, "dwfl_begin: %s", dwfl_errmsg (-1)); - return dwfl; -} - static int frame_callback (Dwfl_Frame *state, void *frame_arg) { |