This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

libbacktrace: allow using DWARF if the main executable lacks it


This fixes a bug that would prevent using DWARF debug info available in
dynamically linked libraries when the main executable did not have DWARF debug
info.

pd.fileline_fn is not examined after dl_iterate_phdr in backtrace_initialize,
so updating *fileline_fn in dl_iterate_phdr is useless as later it is
overwritten from elf_fileline_fn.  OK for trunk?

2013-07-22  Alexander Monakov  <amonakov@ispras.ru>

	* elf.c (backtrace_initialize): Pass elf_fileline_fn to
	dl_iterate_phdr callbacks.

diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c
index a90afaa..fde884a 100644
--- a/libbacktrace/elf.c
+++ b/libbacktrace/elf.c
@@ -865,7 +865,7 @@ backtrace_initialize (struct backtrace_state *state, int descriptor,
   pd.state = state;
   pd.error_callback = error_callback;
   pd.data = data;
-  pd.fileline_fn = fileline_fn;
+  pd.fileline_fn = &elf_fileline_fn;
   pd.found_sym = &found_sym;
   pd.found_dwarf = &found_dwarf;
 




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