diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-12 13:44:04 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-12 13:44:04 -0400 |
| commit | 90a323e3b34cfecdf9df55d8a03d03649609f162 (patch) | |
| tree | c9dcf3b40e6b0de736f0c38864383a01b369439c /src/environment.h | |
| parent | ba555a8aca47a78acb173780fd252b19d3cdd36e (diff) | |
Replace addr2line with libbacktrace to get improved stack traces
Diffstat (limited to 'src/environment.h')
| -rw-r--r-- | src/environment.h | 5 |
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); \ }) |
