summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index f57b084f..518730fd 100644
--- a/eval.c
+++ b/eval.c
@@ -438,6 +438,17 @@ void error_trace(val exsym, val exvals, val out_stream, val prefix)
break;
}
}
+
+#if CONFIG_DEBUG_SUPPORT
+ if (dbg_backtrace) {
+ format(out_stream, lit("~a backtrace:\n"), prefix, nao);
+ debug_dump_backtrace(out_stream, prefix);
+ } else {
+ format(std_error, lit("~a run with --backtrace to enable backtraces\n"), prefix, nao);
+ }
+#else
+ format(std_error, lit("~a not compiled with backtrace support\n"), prefix, nao);
+#endif
}
val lookup_global_var(val sym)