summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2014-01-07 21:00:44 +0100
committerChanho Park <chanho61.park@samsung.com>2014-08-22 20:38:24 +0900
commit7f40999b3db608961a2ddf59b9c56b611a856611 (patch)
treeb9f2d6815e8ea27e1af718450250a83f53379b47 /testsuite
parentaa7a88a347fda1b709ed18745f832e15441125dd (diff)
downloadltrace-7f40999b3db608961a2ddf59b9c56b611a856611.tar.gz
ltrace-7f40999b3db608961a2ddf59b9c56b611a856611.tar.bz2
ltrace-7f40999b3db608961a2ddf59b9c56b611a856611.zip
Add support for using elfutils as unwinder.
This adds support for using elfutils as unwinder with -w. Since elfutils 0.158 elfutils contains a simple unwinder interface that matches nicely on the ltrace backtrace support. The code reuses the libunwind infrastructure already in ltrace where possible (by defining HAVE_UNWINDER which is 1 if either libunwind or elfutils is used). It also reuses the ltrace proc_add_library callback to keep track of the ELF files mapped for the unwinder. The current implementation matches the output as if libunwind was used. But elfutils can also provide some more information since it can lookup the DWARF debuginfo. So if the source info of an address can be found through elfutils the backtrace will also include this as an additional output line per frame.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/Makefile.am1
-rw-r--r--testsuite/lib/ltrace.exp4
2 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index f9b6c0d..d999b2e 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -38,6 +38,7 @@ BUILT_SOURCES = env.exp
env.exp: Makefile
rm -f env.exp
echo set libelf_LD_LIBRARY_PATH '"$(libelf_LD_LIBRARY_PATH)"' >> $@
+ echo set elfutils_LD_LIBRARY_PATH '"$(elfutils_LD_LIBRARY_PATH)"' >> $@
echo set libunwind_LD_LIBRARY_PATH '"$(libunwind_LD_LIBRARY_PATH)"' >> $@
CLEANFILES = *.o *.so *.log *.sum *.ltrace site.bak setval.tmp site.exp env.exp
diff --git a/testsuite/lib/ltrace.exp b/testsuite/lib/ltrace.exp
index abb32f6..9931794 100644
--- a/testsuite/lib/ltrace.exp
+++ b/testsuite/lib/ltrace.exp
@@ -742,6 +742,10 @@ proc ld_library_path { args } {
if {[string length $libelf_LD_LIBRARY_PATH] > 0} {
lappend ALL_LIBRARY_PATHS $libelf_LD_LIBRARY_PATH
}
+ global elfutils_LD_LIBRARY_PATH
+ if {[string length $elfutils_LD_LIBRARY_PATH] > 0} {
+ lappend ALL_LIBRARY_PATHS $elfutils_LD_LIBRARY_PATH
+ }
global libunwind_LD_LIBRARY_PATH
if {[string length $libunwind_LD_LIBRARY_PATH] > 0} {
lappend ALL_LIBRARY_PATHS $libunwind_LD_LIBRARY_PATH