aboutsummaryrefslogtreecommitdiff
path: root/src/environment.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-12 13:44:04 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-12 13:44:04 -0400
commit90a323e3b34cfecdf9df55d8a03d03649609f162 (patch)
treec9dcf3b40e6b0de736f0c38864383a01b369439c /src/environment.h
parentba555a8aca47a78acb173780fd252b19d3cdd36e (diff)
Replace addr2line with libbacktrace to get improved stack traces
Diffstat (limited to 'src/environment.h')
-rw-r--r--src/environment.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/environment.h b/src/environment.h
index 1484a4c4..f9ddd6b0 100644
--- a/src/environment.h
+++ b/src/environment.h
@@ -4,10 +4,11 @@
#include <gc/cord.h>
-#include "types.h"
#include "stdlib/print.h"
+#include "stdlib/stacktrace.h"
#include "stdlib/stdlib.h"
#include "stdlib/tables.h"
+#include "types.h"
typedef struct {
CORD local_typedefs;
@@ -79,7 +80,7 @@ env_t *namespace_env(env_t *env, const char *namespace_name);
if (_f && start && end) \
highlight_error(_f, start, end, "\x1b[31;1m", 2, USE_COLOR); \
if (getenv("TOMO_STACKTRACE")) \
- print_stack_trace(stderr, 1, 3); \
+ print_stacktrace(stderr, 1); \
raise(SIGABRT); \
exit(1); \
})