+2013-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * backtrace-dwarf.c (executable, find_elf, dwfl_offline): Remove unused
+ code.
+
2013-12-15 Jan Kratochvil <jan.kratochvil@redhat.com>
unwinder: ppc
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)
{