From 2d3a573977417d917c16742d8d9d8ead047d0ebc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 8 May 2026 22:29:35 +0200 Subject: Misc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libtest/libtest_dump_stack.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 libtest/libtest_dump_stack.c (limited to 'libtest/libtest_dump_stack.c') diff --git a/libtest/libtest_dump_stack.c b/libtest/libtest_dump_stack.c new file mode 100644 index 0000000..ca0c9c7 --- /dev/null +++ b/libtest/libtest_dump_stack.c @@ -0,0 +1,34 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" +#ifndef TEST + + +#ifndef WITH_BACKTRACE +# if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wattributes" +# endif +CONST +#endif +void +libtest_dump_stack(const char *indent) +{ +#ifndef WITH_BACKTRACE + (void) indent; +#else + libtest_print_backtrace(stderr, indent, 1u, NULL); +#endif +} + + +#else + + +CONST int +main(void) +{ + /* How would one even test this, and what would be the point? */ + return 0; +} + + +#endif -- cgit v1.2.3-70-g09d2