From 3b5bee069525a089d3256f41a6cc4d988dc80d38 Mon Sep 17 00:00:00 2001 From: Jacob Signorovitch Date: Wed, 18 Jun 2025 17:21:45 -0400 Subject: [PATCH] Added trap for GDB &c. --- src/include/util.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/include/util.h b/src/include/util.h index 7265cf1..d832956 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -1,6 +1,8 @@ #ifndef UTIL_H #define UTIL_H +#include + // Most of this file is cursed printing macros for `ast_print()`. Do not attempt // to comprehend. @@ -10,6 +12,9 @@ // Get the length of an array. #define arrln(A) (sizeof(A)/sizeof(*A)) +// Trap GDB &c. +#define TRAP() RAISE(SIGTRAP) + #ifdef DBG // Debug macros // Log a message.