From 4c75a9638c6868c70f2cd4c854e4dcb4096114a7 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 8 Sep 2013 22:28:56 +0800 Subject: [PATCH] Usermode/libc - Switched assert() to use SysDebug instead of stderr - Since most debugging atm is done from the serial log, this is acceptable --- Usermode/Libraries/libc.so_src/include_exp/assert.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Usermode/Libraries/libc.so_src/include_exp/assert.h b/Usermode/Libraries/libc.so_src/include_exp/assert.h index 826e92e5..dde4aeeb 100644 --- a/Usermode/Libraries/libc.so_src/include_exp/assert.h +++ b/Usermode/Libraries/libc.so_src/include_exp/assert.h @@ -9,12 +9,15 @@ #define _LIBC__ASSERT_H_ #include +//#include +#include //extern void exit(int status); #ifdef NDEBUG # define assert(expr) do{}while(0) #else -# define assert(expr) do{if(!(expr)) { fprintf(stderr, "%s:%i: Assertion '%s' failed\n", __FILE__, __LINE__, #expr); exit(-1);}}while(0) +//# define assert(expr) do{if(!(expr)) { fprintf(stderr, "%s:%i: Assertion '%s' failed\n", __FILE__, __LINE__, #expr); exit(-1);}}while(0) +# define assert(expr) do{if(!(expr)) { _SysDebug("%s:%i: Assertion '%s' failed", __FILE__, __LINE__, #expr); exit(-1);}}while(0) #endif #endif -- 2.20.1