aboutsummaryrefslogtreecommitdiffstats
path: root/debug.h
blob: ec2f883e37b3806d699a9f748c89a10f4a88f975 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#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__, #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(); _nc_freeall()

#elif defined(DEBUGLITE)

   /* Assertions and core only */
   #ifdef NDEBUG
   #undef NDEBUG
   #endif
   #define debug_done() 

#else

   /* No debugging */
   #define NDEBUG
   #define debug_done() 

#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy