00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00022 #ifndef LIBCWD_LIBRARIES_DEBUG_H
00023 #define LIBCWD_LIBRARIES_DEBUG_H
00024
00025 #ifdef CWDEBUG
00026
00027 #include <libcwd/config.h>
00028
00029
00030
00031
00032
00033 #include <libcwd/class_channel.h>
00034 #include <libcwd/class_fatal_channel.h>
00035 #include <libcwd/class_continued_channel.h>
00036 #include <libcwd/class_always_channel.h>
00037
00038 namespace libcwd {
00039
00040 namespace channels {
00041
00049 namespace dc {
00050 extern channel_ct debug;
00051 extern channel_ct notice;
00052 extern channel_ct system;
00053 extern channel_ct warning;
00054 #if CWDEBUG_ALLOC
00055 #ifdef LIBCWD_USE_EXTERNAL_C_LINKAGE_FOR_MALLOC
00056 extern channel_ct malloc;
00057 #else
00058 extern channel_ct __libcwd_malloc;
00059 #endif
00060 #else // !CWDEBUG_ALLOC
00061 extern channel_ct malloc;
00062 #endif
00063 #if CWDEBUG_LOCATION
00064 extern channel_ct bfd;
00065 #endif
00066 extern fatal_channel_ct fatal;
00067 extern fatal_channel_ct core;
00068 extern continued_channel_ct continued;
00069 extern continued_channel_ct finish;
00070 extern always_channel_ct always;
00071
00072 }
00073 }
00074
00075 }
00076
00077
00078
00079
00080
00081
00082 #include <libcwd/class_debug.h>
00083
00084 namespace libcwd {
00085
00086 extern debug_ct libcw_do;
00087
00088 }
00089
00090
00091
00092
00093
00094 #include <libcwd/macro_Libcwd_macros.h>
00095
00096
00097
00098
00099 #define __Debug(x) \
00100 LibcwDebug(::libcwd::channels, x)
00101 #define __Dout(cntrl, data) \
00102 LibcwDout(::libcwd::channels, ::libcwd::libcw_do, cntrl, data)
00103 #define __DoutFatal(cntrl, data) \
00104 LibcwDoutFatal(::libcwd::channels, ::libcwd::libcw_do, cntrl, data)
00105
00106
00107
00108
00109
00110 namespace libcwd {
00111
00112 extern channel_ct* find_channel(char const* label);
00113 extern void list_channels_on(debug_ct& debug_object);
00114
00115
00116 using std::operator<<;
00117
00118 }
00119
00120
00121 namespace libcwd_inserters {
00122 using libcwd::operator<<;
00123 }
00124 using namespace libcwd_inserters;
00125
00126 #include <libcwd/macro_ForAllDebugChannels.h>
00127 #include <libcwd/macro_ForAllDebugObjects.h>
00128 #include <libcwd/private_environ.h>
00129 #include <libcwd/class_rcfile.h>
00130 #include <libcwd/attach_gdb.h>
00131 #include <libcwd/demangle.h>
00132
00133
00134 #include <libcwd/private_allocator.inl>
00135 #include <libcwd/class_channel.inl>
00136 #include <libcwd/class_fatal_channel.inl>
00137 #include <libcwd/class_continued_channel.inl>
00138 #include <libcwd/class_always_channel.inl>
00139 #include <libcwd/class_debug.inl>
00140 #include <libcwd/class_debug_string.inl>
00141 #include <libcwd/class_channel_set.inl>
00142 #include <libcwd/class_location.inl>
00143
00144
00145 #if CWDEBUG_LOCATION // --enable-location
00146 #include <libcwd/bfd.h>
00147 #endif
00148 #include <libcwd/debugmalloc.h>
00149
00150 #endif // CWDEBUG
00151 #endif // LIBCWD_LIBRARIES_DEBUG_H
00152