Hi Mark,

checked in as obvious, some leftover.


Thanks,
Jan
--- Begin Message ---
Signed-off-by: Jan Kratochvil <[email protected]>
---
 tests/ChangeLog         |  5 +++++
 tests/backtrace-dwarf.c | 40 ----------------------------------------
 2 files changed, 5 insertions(+), 40 deletions(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index f7007e5..61c4b84 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-17  Jan Kratochvil  <[email protected]>
+
+       * backtrace-dwarf.c (executable, find_elf, dwfl_offline): Remove unused
+       code.
+
 2013-12-15  Jan Kratochvil  <[email protected]>
 
        unwinder: ppc
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index 92c892d..aa12315 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)
 {
-- 
1.8.3.1

--- End Message ---

Reply via email to