00001
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef LIBECC_DEBUG_H
00034 #define LIBECC_DEBUG_H
00035
00036 #ifndef CWDEBUG
00037
00038 #include <iostream>
00039
00040 #define AllocTag1(p)
00041 #define AllocTag2(p, desc)
00042 #define AllocTag_dynamic_description(p, x)
00043 #define AllocTag(p, x)
00044 #define Debug(x)
00045 #define Dout(a, b)
00046 #define DoutFatal(a, b) LibcwDoutFatal(::std, , a, b)
00047 #define ForAllDebugChannels(STATEMENT)
00048 #define ForAllDebugObjects(STATEMENT)
00049 #define LibcwDebug(dc_namespace, x)
00050 #define LibcwDout(a, b, c, d)
00051 #define LibcwDoutFatal(a, b, c, d) do { ::std::cerr << d << ::std::endl; ::std::exit(254); } while(1)
00052 #define NEW(x) new x
00053 #define CWDEBUG_ALLOC 0
00054 #define CWDEBUG_MAGIC 0
00055 #define CWDEBUG_LOCATION 0
00056 #define CWDEBUG_LIBBFD 0
00057 #define CWDEBUG_DEBUG 0
00058 #define CWDEBUG_DEBUGOUTPUT 0
00059 #define CWDEBUG_DEBUGM 0
00060 #define CWDEBUG_DEBUGT 0
00061 #define CWDEBUG_MARKER 0
00062
00063 #else // CWDEBUG
00064
00065 #ifndef DEBUGCHANNELS
00066 #define DEBUGCHANNELS ::libecc::debug::channels
00067 #endif
00068 #include <libcw/debug.h>
00069
00070 namespace libecc {
00071 namespace debug {
00072 namespace channels {
00073 namespace dc {
00074 using namespace ::libcw::debug::channels::dc;
00075
00076 extern ::libcw::debug::channel_ct ecc;
00077
00078 }
00079 }
00080 }
00081 }
00082
00083 #endif // CWDEBUG
00084
00085
00086 #ifdef CWDEBUG
00087 #define LibEccDout(cntrl, data) LibcwDout(DEBUGCHANNELS, libcw::debug::libcw_do, cntrl, data)
00088 #define LibEccDoutFatal(cntrl, data) LibcwDoutFatal(DEBUGCHANNELS, libcw::debug::libcw_do, cntrl, data)
00089 #else
00090 #define LibEccDout(cntrl, data)
00091 #define LibEccDoutFatal(cntrl, data) LibcwDoutFatal(::std, , cntrl, data)
00092 #endif
00093
00094 #endif // LIBECC_DEBUG_H