From e39e09910fc8e369e24f6a0cabaeb9356dbfae08 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Tue, 28 Aug 2018 14:04:25 +0200 Subject: lib/core: Use libdw to decode stack trace with debugging symbols, v2. libdw is a new dependency built from the elfutils package. It provides us a way to generate line numbers and file names from the instruction pointer. elfutils is LGPLv3 or GPLv2, so it's ok to link against it. Before: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:29661) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:29661) CRITICAL: Failed assertion: result == 1 (meta_test:29661) CRITICAL: error: 0 != 1 Stack trace: #0 [__igt_fail_assert+0x20a] #1 [test_result+0x7a] #2 [__real_main120+0x240] #3 [main+0x4a] #4 (../csu/libc-start.c) __libc_start_main:344 #5 [_start+0x2a] After: IGT-Version: 1.23-g8ae86abd419d (x86_64) (Linux: 4.16.0-1-amd64 x86_64) Starting subtest: fail-result (meta_test:1357) CRITICAL: Test assertion failure function test_result, file ../tests/meta_test.c:94: (meta_test:1357) CRITICAL: Failed assertion: result == 1 (meta_test:1357) CRITICAL: error: 0 != 1 Stack trace: #0 ../lib/igt_core.c:1467 __igt_fail_assert() #1 ../tests/meta_test.c:95 test_result() #2 ../tests/meta_test.c:137 __real_main120() #3 ../tests/meta_test.c:120 main() #4 ../csu/libc-start.c:344 __libc_start_main() #5 [_start+0x2a] Changes since v1: - Add libdw dependency to readme. - Change backtrace format slightly. Cc: Petri Latvala Signed-off-by: Maarten Lankhorst [mlankhorst: Add description about libdw in commit msg, name -> dwfl_name] Reviewed-by: Petri Latvala --- meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 7278c438..faf1b764 100644 --- a/meson.build +++ b/meson.build @@ -103,6 +103,7 @@ pciaccess = dependency('pciaccess', version : '>=0.10') libkmod = dependency('libkmod') libprocps = dependency('libprocps', required : true) libunwind = dependency('libunwind', required : true) +libdw = dependency('libdw', required : true) ssl = dependency('openssl', required : true) valgrind = null_dep -- cgit v1.2.3