mirror of https://github.com/xzeldon/htop.git
Add "debuglite" mode.
This commit is contained in:
parent
9da282d748
commit
57bd892b37
|
@ -29,3 +29,6 @@ ColumnsPanel.h
|
|||
|
||||
debug:
|
||||
$(MAKE) all CFLAGS="-g -DDEBUG"
|
||||
|
||||
debuglite:
|
||||
$(MAKE) all CFLAGS="-g -DDEBUGLITE"
|
||||
|
|
36
debug.h
36
debug.h
|
@ -1,22 +1,28 @@
|
|||
|
||||
#ifdef DEBUG
|
||||
#if defined(DEBUG)
|
||||
|
||||
#include "DebugMemory.h"
|
||||
/* Full debug */
|
||||
#include "DebugMemory.h"
|
||||
#define calloc(a, b) DebugMemory_calloc(a, b, __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();
|
||||
|
||||
#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 strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__);
|
||||
#define free(x) DebugMemory_free(x, __FILE__, __LINE__);
|
||||
#elif defined(DEBUGLITE)
|
||||
|
||||
#define debug_done() DebugMemory_report();
|
||||
/* Assertions and core only */
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#endif
|
||||
#define debug_done() sleep(0)
|
||||
|
||||
#else
|
||||
|
||||
/* No debugging */
|
||||
#define NDEBUG
|
||||
#define debug_done() sleep(0)
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG
|
||||
|
||||
#define NDEBUG
|
||||
|
||||
#define debug_done() sleep(0)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue