Add "debuglite" mode.

This commit is contained in:
Hisham Muhammad 2006-05-30 14:26:30 +00:00
parent 9da282d748
commit 57bd892b37
2 changed files with 24 additions and 15 deletions

View File

@ -29,3 +29,6 @@ ColumnsPanel.h
debug:
$(MAKE) all CFLAGS="-g -DDEBUG"
debuglite:
$(MAKE) all CFLAGS="-g -DDEBUGLITE"

20
debug.h
View File

@ -1,22 +1,28 @@
#ifdef DEBUG
#if defined(DEBUG)
/* Full debug */
#include "DebugMemory.h"
#define calloc(a, b) DebugMemory_calloc(a, b, __FILE__, __LINE__);
#define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__);
#define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__);
#define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__, #x);
#define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__, #x);
#define strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__);
#define free(x) DebugMemory_free(x, __FILE__, __LINE__);
#define debug_done() DebugMemory_report();
#elif defined(DEBUGLITE)
/* Assertions and core only */
#ifdef NDEBUG
#undef NDEBUG
#endif
#define debug_done() sleep(0)
#ifndef DEBUG
#else
/* No debugging */
#define NDEBUG
#define debug_done() sleep(0)
#endif