aboutsummaryrefslogtreecommitdiffstats
path: root/libtest/libtest_dump_stack.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-08 22:29:35 +0200
committerMattias Andrée <m@maandree.se>2026-05-08 22:29:35 +0200
commit2d3a573977417d917c16742d8d9d8ead047d0ebc (patch)
treecaeac52856a9df0478e2bee53e5dda1f84422461 /libtest/libtest_dump_stack.c
parentAdd DEFAULT_SUPPORT option and improve DEPENDENCIES (diff)
downloadlibrecrypt-2d3a573977417d917c16742d8d9d8ead047d0ebc.tar.gz
librecrypt-2d3a573977417d917c16742d8d9d8ead047d0ebc.tar.bz2
librecrypt-2d3a573977417d917c16742d8d9d8ead047d0ebc.tar.xz
Misc
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libtest/libtest_dump_stack.c')
-rw-r--r--libtest/libtest_dump_stack.c34
1 files changed, 34 insertions, 0 deletions
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