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 #include <libecc/config.h>
00037
00038 #ifndef CWDEBUG
00039
00040 #include <iostream>
00041
00042 #define AllocTag1(p)
00043 #define AllocTag2(p, desc)
00044 #define AllocTag_dynamic_description(p, x)
00045 #define AllocTag(p, x)
00046 #define Debug(x)
00047 #define Dout(a, b)
00048 #define DoutFatal(a, b) LibcwDoutFatal(::std, , a, b)
00049 #define ForAllDebugChannels(STATEMENT)
00050 #define ForAllDebugObjects(STATEMENT)
00051 #define LibcwDebug(dc_namespace, x)
00052 #define LibcwDout(a, b, c, d)
00053 #define LibcwDoutFatal(a, b, c, d) do { ::std::cerr << d << ::std::endl; ::std::exit(254); } while(1)
00054 #define NEW(x) new x
00055 #define CWDEBUG_ALLOC 0
00056 #define CWDEBUG_MAGIC 0
00057 #define CWDEBUG_LOCATION 0
00058 #define CWDEBUG_LIBBFD 0
00059 #define CWDEBUG_DEBUG 0
00060 #define CWDEBUG_DEBUGOUTPUT 0
00061 #define CWDEBUG_DEBUGM 0
00062 #define CWDEBUG_DEBUGT 0
00063 #define CWDEBUG_MARKER 0
00064
00065 #else // CWDEBUG
00066
00067 #ifndef DEBUGCHANNELS
00068 #define DEBUGCHANNELS ::libecc::debug::channels
00069 #endif
00070 #include <libcw/debug.h>
00071
00072 namespace libecc {
00073 namespace debug {
00074 namespace channels {
00075 namespace dc {
00076 using namespace ::libcw::debug::channels::dc;
00077
00078 extern ::libcw::debug::channel_ct ecc;
00079 extern ::libcw::debug::channel_ct polynomial;
00080 extern ::libcw::debug::channel_ct bitsetfind1;
00081 extern ::libcw::debug::channel_ct bitsetshift;
00082
00083 }
00084 }
00085 }
00086 }
00087
00088 #endif // CWDEBUG
00089
00090
00091 #ifdef CWDEBUG
00092 #define LibEccDout(cntrl, data) LibcwDout(DEBUGCHANNELS, libcw::debug::libcw_do, cntrl, data)
00093 #define LibEccDoutFatal(cntrl, data) LibcwDoutFatal(DEBUGCHANNELS, libcw::debug::libcw_do, cntrl, data)
00094 #else
00095 #define LibEccDout(cntrl, data)
00096 #define LibEccDoutFatal(cntrl, data) LibcwDoutFatal(::std, , cntrl, data)
00097 #endif
00098
00099 #endif // LIBECC_DEBUG_H