diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:20 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:20 +0200 |
commit | 85bb4ad9cb820ac3b8e935a930084a06cbfd2847 (patch) | |
tree | 681fd9b2d9fa80931b2a8bec4bb6667865b7c569 /debug.h | |
parent | ea859f50d9438bc61ae96721a4d255b49de78653 (diff) | |
download | debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.tar.gz debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.tar.bz2 debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.zip |
Imported Upstream version 0.6.3upstream/0.6.3
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -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) -#endif - -#ifndef DEBUG +#else -#define NDEBUG - -#define debug_done() sleep(0) + /* No debugging */ + #define NDEBUG + #define debug_done() sleep(0) #endif + |