From 70c2523065091f23c95830d428f3334b3e60aeb2 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 13 Jan 2024 00:24:34 -0500 Subject: kernel: assert: Be more verbose Signed-off-by: Ian Moffett --- sys/include/lib/assert.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/include/lib/assert.h b/sys/include/lib/assert.h index 1ecc0f4..78ebe05 100644 --- a/sys/include/lib/assert.h +++ b/sys/include/lib/assert.h @@ -33,9 +33,10 @@ #include #include -#define __assert(condition) \ - if ((uintptr_t)(condition) == 0) { \ - panic("Assert \"%s\" failed\n", #condition); \ +#define __assert(condition) \ + if ((uintptr_t)(condition) == 0) { \ + panic("Assert \"%s\" failed (%s() at %s:%d)\n", #condition, \ + __func__, __FILE__, __LINE__); \ } #endif /* !_LIB_ASSERT_H_ */ -- cgit v1.2.3