[PATCH 09/14] lib/igt_core: Implement conditional backtrace support using HAVE_LIBUNWIND
Jeevaka Prabu Badrappan
jeevaka.badrappan at intel.com
Thu May 15 19:52:02 UTC 2025
Add a log message indicating "backtrace not implemented" in the
print_backtrace function and return when HAVE_LIBUNWIND is not defined.
Signed-off-by: Jeevaka Prabu Badrappan <jeevaka.badrappan at intel.com>
---
lib/igt_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 1d7402cb7..097a556c9 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -383,6 +383,9 @@ static int _igt_dynamic_tests_executed = -1;
static void print_backtrace(void)
{
+#ifndef HAVE_LIBUNWIND
+ igt_info("backtrace not implemented\n");
+#else
unw_cursor_t cursor;
unw_context_t uc;
int stack_num = 0;
@@ -440,6 +443,7 @@ static void print_backtrace(void)
if (dwfl)
dwfl_end(dwfl);
+#endif
}
__attribute__((format(printf, 2, 3)))
--
2.34.1
More information about the igt-dev
mailing list