diff options
author | Ian Moffett <ian@osmora.org> | 2024-01-13 00:24:34 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-01-13 00:24:34 -0500 |
commit | 70c2523065091f23c95830d428f3334b3e60aeb2 (patch) | |
tree | 1550c6fe79534582a8f4981498657aa9e7583f7e /sys/include/lib/assert.h | |
parent | fc45b3117028a310ff9f98a011641bb54cffca78 (diff) |
kernel: assert: Be more verbose
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/lib/assert.h')
-rw-r--r-- | sys/include/lib/assert.h | 7 |
1 files 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 <sys/panic.h> #include <sys/types.h> -#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_ */ |