summaryrefslogtreecommitdiffstats
path: root/tests/backtrace.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.c
parent3232479483cad695d1872b879128a23da3953a7d (diff)
Unwinding is only supported on Linux
Signed-off-by: Kurt Roeckx <[email protected]>
Diffstat (limited to 'tests/backtrace.c')
-rw-r--r--tests/backtrace.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/backtrace.c b/tests/backtrace.c
index 758dfed6..1a4709b9 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -38,6 +38,18 @@
#include <argp.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 int
dump_modules (Dwfl_Module *mod, void **userdata __attribute__ ((unused)),
const char *name, Dwarf_Addr start,
@@ -451,3 +463,6 @@ main (int argc __attribute__ ((unused)), char **argv)
dwfl_end (dwfl);
return 0;
}
+
+#endif /* ! __linux__ */
+