This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch 6/4] unwinder: New dwfl_fd_find_debuginfo stub


Hi,

dependent on:
	[patch 4/4] unwinder: The unwinder (x86* only)

present in:
	jankratochvil/forunwind-baseaddr-hookvars-corereport-unwindx86-nonx86-fddebuginfo
but this branch is not suitable for merge as it is unclear in which form get
checked in the patches above.  The branch is usable only for "git checkout",
neither diff nor merge should be done on it.

Linux kernel perf has its own logic how to find the separate debug info files.
I did not want to introduce two different ways of finding separate debug info
files into Linux kernel perf, therefore I have provided this stub function so
that an application can provide an open file descriptor with it this way.


Thanks,
Jan


libdw/
2012-11-14  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* libdw.map (ELFUTILS_0.156): New entry dwfl_fd_find_debuginfo.

libdwfl/
2012-11-14  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* find-debuginfo.c (dwfl_fd_find_debuginfo): New function.
	* libdwfl.h (dwfl_fd_find_debuginfo): New declaration.

diff --git a/libdw/libdw.map b/libdw/libdw.map
index bf65d83..3398089 100644
--- a/libdw/libdw.map
+++ b/libdw/libdw.map
@@ -259,6 +259,7 @@ ELFUTILS_0.156 {
   global:
     dwfl_core_filename_report;
     dwfl_report_elf_baseaddr;
+    dwfl_fd_find_debuginfo;
     dwfl_frame_state_pid;
     dwfl_frame_state_core;
     dwfl_frame_state_data;
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c
index 21db91a..40c9640 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
@@ -269,3 +269,11 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod,
   return fd;
 }
 INTDEF (dwfl_standard_find_debuginfo)
+
+bool
+dwfl_fd_find_debuginfo (Dwfl_Module *mod, GElf_Word debuglink_crc, int fd)
+{
+  bool cancheck = debuglink_crc != (GElf_Word) 0;
+  return validate (mod, fd, cancheck, debuglink_crc);
+}
+INTDEF (dwfl_fd_find_debuginfo)
diff --git a/libdwfl/libdwfl.h b/libdwfl/libdwfl.h
index dee3e2f..b63e6f8 100644
--- a/libdwfl/libdwfl.h
+++ b/libdwfl/libdwfl.h
@@ -304,6 +304,10 @@ extern int dwfl_standard_find_debuginfo (Dwfl_Module *, void **,
 					 const char *, const char *,
 					 GElf_Word, char **);
 
+/* Provide supplied separate debug info file FD for MOD.  */
+extern bool dwfl_fd_find_debuginfo (Dwfl_Module *mod, GElf_Word debuglink_crc,
+                                    int fd);
+
 
 /* This callback must be used when using dwfl_offline_* to report modules,
    if ET_REL is to be supported.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]