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 #if defined(_GLIBCXX_DEBUG) && !CWDEBUG_GLIBCXX_DEBUG
00031 #error Libcwd was not compiled with -D_GLIBCXX_DEBUG while your application is. Please reconfigure libcwd with --enable-glibcxx-debug.
00032 #endif
00033 #if !defined(_GLIBCXX_DEBUG) && CWDEBUG_GLIBCXX_DEBUG
00034 #error Libcwd was compiled with -D_GLIBCXX_DEBUG but your application is not. Please reconfigure libcwd without --enable-glibcxx-debug or use -D_GLIBCXX_DEBUG.
00035 #endif
00036
00037
00038
00039
00040
00041 #include <libcwd/class_channel.h>
00042 #include <libcwd/class_fatal_channel.h>
00043 #include <libcwd/class_continued_channel.h>
00044 #include <libcwd/class_always_channel.h>
00045
00046 namespace libcwd {
00047
00048 namespace channels {
00049
00057 namespace dc {
00058 extern channel_ct debug;
00059 extern channel_ct notice;
00060 extern channel_ct system;
00061 extern channel_ct warning;
00062 #if CWDEBUG_ALLOC
00063 #ifdef LIBCWD_USE_EXTERNAL_C_LINKAGE_FOR_MALLOC
00064 extern channel_ct malloc;
00065 #else
00066 extern channel_ct __libcwd_malloc;
00067 #endif
00068 #else // !CWDEBUG_ALLOC
00069 extern channel_ct malloc;
00070 #endif
00071 #if CWDEBUG_LOCATION
00072 extern channel_ct bfd;
00073 #endif
00074 extern fatal_channel_ct fatal;
00075 extern fatal_channel_ct core;
00076 extern continued_channel_ct continued;
00077 extern continued_channel_ct finish;
00078 extern always_channel_ct always;
00079
00080 }
00081 }
00082
00083 }
00084
00085
00086
00087
00088
00089
00090 #include <libcwd/class_debug.h>
00091
00092 namespace libcwd {
00093
00094 extern debug_ct libcw_do;
00095
00096 }
00097
00098
00099
00100
00101
00102 #include <libcwd/macro_Libcwd_macros.h>
00103
00104
00105
00106
00107 #define __Debug(x) \
00108 LibcwDebug(::libcwd::channels, x)
00109 #define __Dout(cntrl, data) \
00110 LibcwDout(::libcwd::channels, ::libcwd::libcw_do, cntrl, data)
00111 #define __DoutFatal(cntrl, data) \
00112 LibcwDoutFatal(::libcwd::channels, ::libcwd::libcw_do, cntrl, data)
00113
00114
00115
00116
00117
00118 namespace libcwd {
00119
00120 extern channel_ct* find_channel(char const* label);
00121 extern void list_channels_on(debug_ct& debug_object);
00122
00123
00124 using std::operator<<;
00125
00126 }
00127
00128
00129 namespace libcwd_inserters {
00130 using libcwd::operator<<;
00131 }
00132 using namespace libcwd_inserters;
00133
00134 #include <libcwd/macro_ForAllDebugChannels.h>
00135 #include <libcwd/macro_ForAllDebugObjects.h>
00136 #include <libcwd/private_environ.h>
00137 #include <libcwd/class_rcfile.h>
00138 #include <libcwd/attach_gdb.h>
00139 #include <libcwd/demangle.h>
00140
00141
00142 #include <libcwd/private_allocator.inl>
00143 #include <libcwd/class_channel.inl>
00144 #include <libcwd/class_fatal_channel.inl>
00145 #include <libcwd/class_continued_channel.inl>
00146 #include <libcwd/class_always_channel.inl>
00147 #include <libcwd/class_debug.inl>
00148 #include <libcwd/class_debug_string.inl>
00149 #include <libcwd/class_channel_set.inl>
00150 #include <libcwd/class_location.inl>
00151
00152
00153 #if CWDEBUG_LOCATION // --enable-location
00154 #include <libcwd/bfd.h>
00155 #endif
00156 #include <libcwd/debugmalloc.h>
00157
00158 #endif // CWDEBUG
00159 #endif // LIBCWD_LIBRARIES_DEBUG_H
00160