]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Remove tests/backtrace-dwarf.c unused code.
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 17 Dec 2013 20:11:48 +0000 (21:11 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 17 Dec 2013 20:11:48 +0000 (21:11 +0100)
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
tests/ChangeLog
tests/backtrace-dwarf.c

index f7007e5a0a4d353ef766f7e6e8e4761e2a7056c0..61c4b8422a34fb1ba3335a26c9e5c6b739db8f7f 100644 (file)
@@ -1,3 +1,8 @@
+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
index 92c892dc5cfb9dfaf9a60131a9b07c52ed052129..aa12315a5ed24eb72554dc3ee8e87cbba0d2b9d2 100644 (file)
@@ -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)
 {