aboutsummaryrefslogtreecommitdiffstats
path: root/libtest/libtest_dump_stack.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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