From 90a323e3b34cfecdf9df55d8a03d03649609f162 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 12 Apr 2025 13:44:04 -0400 Subject: Replace addr2line with libbacktrace to get improved stack traces --- src/environment.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/environment.h') 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 -#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); \ }) -- cgit v1.2.3