This is the mail archive of the 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


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

present in:
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.


2012-11-14  Jan Kratochvil  <>

	* (ELFUTILS_0.156): New entry dwfl_fd_find_debuginfo.

2012-11-14  Jan Kratochvil  <>

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

diff --git a/libdw/ b/libdw/
index bf65d83..3398089 100644
--- a/libdw/
+++ b/libdw/
@@ -259,6 +259,7 @@ ELFUTILS_0.156 {
+    dwfl_fd_find_debuginfo;
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)
+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]