summaryrefslogtreecommitdiffstats
path: root/tests/backtrace-dwarf.c
diff options
context:
space:
mode:
authorKurt Roeckx <[email protected]>2014-04-22 21:46:22 +0200
committerMark Wielaard <[email protected]>2014-04-23 10:56:01 +0200
commit02cefdaa6429e620d6457fdb3ad9934f194c5a93 (patch)
tree7825fc20716a17ec96529d0b9e289ed549bf3185 /tests/backtrace-dwarf.c
parent3232479483cad695d1872b879128a23da3953a7d (diff)
Unwinding is only supported on Linux
Signed-off-by: Kurt Roeckx <[email protected]>
Diffstat (limited to 'tests/backtrace-dwarf.c')
-rw-r--r--tests/backtrace-dwarf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index f75e1202..87d088aa 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -25,6 +25,18 @@
#include <sys/ptrace.h>
#include ELFUTILS_HEADER(dwfl)
+#ifndef __linux__
+
+int
+main (int argc __attribute__ ((unused)), char **argv)
+{
+ fprintf (stderr, "%s: Unwinding not supported for this architecture\n",
+ argv[0]);
+ return 77;
+}
+
+#else /* __linux__ */
+
static void cleanup_13_abort (void);
#define main cleanup_13_main
#include "cleanup-13.c"
@@ -148,3 +160,6 @@ main (int argc __attribute__ ((unused)), char **argv)
/* There is an exit (0) call if we find the "main" frame, */
error (1, 0, "dwfl_getthreads: %s", dwfl_errmsg (-1));
}
+
+#endif /* ! __linux__ */
+