Thread: [libcw-cvs] [CVS] Module src (Page 6)
Abandoned project
Status: Beta
Brought to you by:
libcw
From: Carlo W. <li...@us...> - 2002-02-12 05:40:43
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-12 05:40:42 UTC Modified files: libcwd/debug.cc libcwd/threading.cc libcwd/include/libcw/class_debug.h libcwd/include/libcw/class_debug.inl libcwd/include/libcw/debug.h libcwd/include/libcw/macro_ForAllDebugObjects.h libcwd/include/libcw/private_threading.h libcwd/tests/threads4.cc Log message: ostream locking first try. ---------------------- diff included ---------------------- Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.66 src/libcwd/debug.cc:1.67 --- src/libcwd/debug.cc:1.66 Sat Feb 9 21:41:58 2002 +++ src/libcwd/debug.cc Mon Feb 11 21:40:31 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.66 2002/02/10 05:41:58 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.67 2002/02/12 05:40:31 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -70,7 +70,11 @@ pos_type position; #endif public: +#ifdef LIBCWD_THREAD_SAFE + void writeto(std::ostream* os, _private_::lock_interface_base_ct* mutex LIBCWD_COMMA_TSD_PARAM) +#else void writeto(std::ostream* os LIBCWD_COMMA_TSD_PARAM) +#endif { char* buf; bool used_malloc = false; @@ -91,7 +95,25 @@ ++LIBCWD_DO_TSD_MEMBER_OFF(libcw_do); #endif LIBCWD_DISABLE_CANCEL // We don't want Dout() to be a cancellation point. - os->write(buf, curlen); + if (mutex) + { + mutex->lock(); + os->write(buf, curlen); + mutex->unlock(); + } + else if (_private_::WST_multi_threaded) + { + static bool WST_second_time = false; // Break infinite loop. + if (WST_second_time) + os->write(buf, curlen); + else + { + WST_second_time = true; + DoutFatal(dc::core, "When using multiple threads, you must provide a locking mechanism for the debug output stream. You can pass a pointer to a mutex with `debug_ct::set_ostream'."); + } + } + else + os->write(buf, curlen); LIBCWD_ENABLE_CANCEL #ifdef DEBUGMALLOC --LIBCWD_DO_TSD_MEMBER_OFF(libcw_do); @@ -323,9 +345,6 @@ // Force allocation of a __cxa_eh_globals struct in libsupc++. (void)std::uncaught_exception(); #endif -#if defined(DEBUGDEBUG) && defined(LIBCWD_THREAD_SAFE) - _private_::WST_multi_threaded = true; -#endif } namespace _private_ { @@ -630,6 +649,12 @@ /** \} */ +#ifdef LIBCWD_THREAD_SAFE +#define LIBCWD_COMMA_MUTEX ,debug_object.M_mutex +#else +#define LIBCWD_COMMA_MUTEX +#endif + void debug_tsd_st::start(debug_ct& debug_object, channel_set_data_st& channel_set LIBCWD_COMMA_TSD_PARAM) { #ifdef DEBUGDEBUG @@ -651,7 +676,23 @@ if (!(current->mask & continued_expected_maskbit)) { std::ostream* target_os = (channel_set.mask & cerr_cf) ? &std::cerr : debug_object.real_os; +#ifdef LIBCWD_THREAD_SAFE + // Try to get the lock, but don't try too long... + int res; + struct timespec const t = { 0, 5000000 }; + for(int count = 0; count < 40; ++count) + { + res = debug_object.M_mutex->trylock(); + if (res == 0) + break; + nanosleep(&t, NULL); + } +#endif target_os->put('\n'); +#ifdef LIBCWD_THREAD_SAFE + if (res == 0) + debug_object.M_mutex->unlock(); +#endif char const* channame = (channel_set.mask & finish_maskbit) ? "finish" : "continued"; #ifdef DEBUGUSEBFD DoutFatal(dc::core, "Using `dc::" << channame << "' in " << @@ -684,11 +725,11 @@ // (current->mask & continued_cf_maskbit) is false and this if is skipped. LIBCWD_ASSERT( current != reinterpret_cast<laf_ct*>(_private_::WST_dummy_laf) ); #endif - // Write out what is in the buffer till now. + // Append <unfinished> to the current buffer. + current_oss->write("<unfinished>\n", 13); // Continued debug output should end on a space by itself, + // And write out what is in the buffer till now. std::ostream* target_os = (channel_set.mask & cerr_cf) ? &std::cerr : debug_object.real_os; - static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_TSD); - // Append <unfinished> to it. - target_os->write("<unfinished>\n", 13); // Continued debug output should end on a space by itself, + static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD); // Truncate the buffer to its prefix and append "<continued>" to it already. static_cast<buffer_ct*>(current_oss)->restore_position(); current_oss->write("<continued> ", 12); // therefore we repeat the space here. @@ -784,7 +825,7 @@ if ((current->mask & flush_cf)) { // Write buffer to ostream. - static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_TSD); + static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD); // Flush ostream. Note that in the case of nested debug output this `os' can be an stringstream, // in that case, no actual flushing is done until the debug output to the real ostream has // finished. @@ -804,7 +845,7 @@ current_oss->put('\n'); // Write buffer to ostream. - static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_TSD); + static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD); // Handle control flags, if any: if (current->mask != 0) @@ -829,12 +870,18 @@ } if ((current->mask & wait_cf)) { +#ifdef LIBCWD_THREAD_SAFE + debug_object.M_mutex->lock(); +#endif *target_os << "(type return)"; if (debug_object.interactive) { *target_os << std::flush; while(std::cin.get() != '\n'); } +#ifdef LIBCWD_THREAD_SAFE + debug_object.M_mutex->unlock(); +#endif } if ((current->mask & flush_cf)) { @@ -906,6 +953,10 @@ if (WNS_initialized) return; +#ifdef LIBCWD_THREAD_SAFE + M_mutex = NULL; +#endif + #ifdef DEBUGDEBUG if (!WST_debug_object_init_magic) init_debug_object_init_magic(); @@ -1466,6 +1517,37 @@ core_dump(); // off() and on() where called and not in equal pairs. off_cnt = state.off_cnt; // Restore. } + +#ifdef LIBCWD_THREAD_SAFE +/** + * \brief Set output device and provide external pthread mutex. + * \ingroup group_destination + * + * Assign a new \c ostream to this %debug object. + * The \c ostream will only be written to after obtaining the lock + * that is passed as second argument. + * + * <b>Example:</b> + * + * \code + * pthread_mutex_t lock; + * + * // Use the same lock as you use in your application for std::cerr. + * Debug( libcw_do.set_ostream(&std::cerr, &lock) ); + * + * pthread_mutex_lock(&lock); + * std::cerr << "The application uses cerr too\n"; + * pthread_mutex_unlock(&lock); + * \endcode + */ +// Specialization +template<> + void debug_ct::set_ostream(std::ostream* os, pthread_mutex_t* mutex) + { + M_mutex = new _private_::pthread_lock_interface_ct(mutex); + private_set_ostream(os); + } +#endif // LIBCWD_THREAD_SAFE } // namespace debug } // namespace libcw Index: src/libcwd/include/libcw/class_debug.h diff -u src/libcwd/include/libcw/class_debug.h:1.9 src/libcwd/include/libcw/class_debug.h:1.10 --- src/libcwd/include/libcw/class_debug.h:1.9 Thu Feb 7 20:03:47 2002 +++ src/libcwd/include/libcw/class_debug.h Mon Feb 11 21:40:32 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.9 2002/02/08 04:03:47 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.10 2002/02/12 05:40:32 libcw Exp $ // // Copyright (C) 2000 - 2002, by // @@ -38,6 +38,10 @@ namespace libcw { namespace debug { +namespace _private_ { + class lock_interface_base_ct; +} // namespace _private_ + //=================================================================================================== // class debug_ct // @@ -83,7 +87,13 @@ // std::ostream* real_os; - // The original output ostream (as set with set_ostream() or set_fd()). + // The original output ostream (as set with set_ostream()). + // +#ifdef LIBCWD_THREAD_SAFE + _private_::lock_interface_base_ct* M_mutex; + // Pointer to the mutex that should be used for `real_os' or NULL when no lock is used. + // A value of NULL is only allowed prior to creating a second thread. +#endif private: //------------------------------------------------------------------------------------------------- @@ -182,12 +192,24 @@ debug_ct(void); ~debug_ct(); +private: + void private_set_ostream(std::ostream* os); + public: //------------------------------------------------------------------------------------------------- // Manipulators: // void set_ostream(std::ostream* os); +#ifdef LIBCWD_THREAD_SAFE + template<class T> + void set_ostream(std::ostream* os, T* mutex); +#ifdef LIBCW_DOXYGEN + // Specialization. + template<> + void set_ostream(std::ostream* os, pthread_mutex_t* mutex); +#endif +#endif void off(void); void on(void); @@ -235,8 +257,73 @@ * \returns The previous value. */ bool keep_tsd(bool keep); -#endif +#endif // LIBCWD_THREAD_SAFE +}; + +#ifdef LIBCWD_THREAD_SAFE +namespace _private_ { + +class lock_interface_base_ct { +public: + virtual int trylock(void) = 0; + virtual void lock(void) = 0; + virtual void unlock(void) = 0; }; + +template<class T> + class lock_interface_tct : public lock_interface_base_ct { + private: + T* ptr; + virtual int trylock(void) { return ptr->trylock(); } + virtual void lock(void) { ptr->lock(); } + virtual void unlock(void) { ptr->unlock(); } + public: + lock_interface_tct(T* mutex) : ptr(mutex) { } + }; + + class pthread_lock_interface_ct : public lock_interface_base_ct { + private: + pthread_mutex_t* ptr; + virtual int trylock(void) { return pthread_mutex_trylock(ptr); } + virtual void lock(void) { pthread_mutex_lock(ptr); } + virtual void unlock(void) { pthread_mutex_unlock(ptr); } + public: + pthread_lock_interface_ct(pthread_mutex_t* mutex) : ptr(mutex) { } + }; + +} // namespace _private_ + +/** + * \brief Set output device and provide external lock. + * \ingroup group_destination + * + * Assign a new \c ostream to this %debug object. + * The \c ostream will only be written to after obtaining the lock + * that is passed as second argument. Each \c ostream needs to have + * a unique lock. If the application also writes directly + * to the same \c ostream then use the same lock. + * + * <b>Example:</b> + * + * \code + * MyLock lock; + * + * // Uses MyLock::lock(), MyLock::trylock() and MyLock::unlock(). + * Debug( libcw_do.set_ostream(&std::cerr, &lock) ); + * + * lock.lock(); + * std::cerr << "The application uses cerr too\n"; + * lock.unlock(); + * \endcode + */ +template<class T> + void debug_ct::set_ostream(std::ostream* os, T* mutex) + { + M_mutex = new _private_::lock_interface_tct<T>(mutex); + private_set_ostream(os); + } + +#endif // LIBCWD_THREAD_SAFE } // namespace debug } // namespace libcw Index: src/libcwd/include/libcw/class_debug.inl diff -u src/libcwd/include/libcw/class_debug.inl:1.6 src/libcwd/include/libcw/class_debug.inl:1.7 --- src/libcwd/include/libcw/class_debug.inl:1.6 Tue Feb 5 16:46:08 2002 +++ src/libcwd/include/libcw/class_debug.inl Mon Feb 11 21:40:32 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.inl,v 1.6 2002/02/06 00:46:08 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.inl,v 1.7 2002/02/12 05:40:32 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -167,15 +167,9 @@ return real_os; } -/** - * \brief Set output device. - * \ingroup group_destination - * - * Assign a new \c ostream to this %debug object (default is <CODE>std::cerr</CODE>). - */ __inline__ void -debug_ct::set_ostream(std::ostream* os) +debug_ct::private_set_ostream(std::ostream* os) { real_os = os; #ifdef DEBUGDEBUG @@ -184,6 +178,19 @@ if (LIBCWD_TSD_MEMBER(laf_stack).size() == 0) LIBCWD_TSD_MEMBER(current_oss) = NULL; #endif +} + +/** + * \brief Set output device. + * \ingroup group_destination + * + * Assign a new \c ostream to this %debug object (default is <CODE>std::cerr</CODE>). + */ +__inline__ +void +debug_ct::set_ostream(std::ostream* os) +{ + private_set_ostream(os); } /** \} */ Index: src/libcwd/include/libcw/debug.h diff -u src/libcwd/include/libcw/debug.h:1.41 src/libcwd/include/libcw/debug.h:1.42 --- src/libcwd/include/libcw/debug.h:1.41 Fri Feb 8 14:29:29 2002 +++ src/libcwd/include/libcw/debug.h Mon Feb 11 21:40:32 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debug.h,v 1.41 2002/02/08 22:29:29 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debug.h,v 1.42 2002/02/12 05:40:32 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -148,15 +148,16 @@ * <b>Examples:</b> * * \code - * Debug( check_configuration() ); // Configuration consistency check. - * Debug( dc::notice.on() ); // Switch debug channel NOTICE on. - * Debug( libcw_do.on() ); // Turn all debugging temporally off. - * Debug( list_channels_on(libcw_do) ); // List all debug channels. + * Debug( check_configuration() ); // Configuration consistency check. + * Debug( dc::notice.on() ); // Switch debug channel NOTICE on. + * Debug( libcw_do.on() ); // Turn all debugging temporally off. + * Debug( list_channels_on(libcw_do) ); // List all debug channels. * Debug( make_all_allocations_invisible_except(NULL) ); // Hide all allocations so far. - * Debug( list_allocations_on(libcw_do) ); // List all allocations. - * Debug( libcw_do.set_ostream(&std::cout) ); // Use std::cout as debug output stream. - * Debug( libcw_do.inc_indent(4) ); // Increment indentation by 4 spaces. - * Debug( libcw_do.get_ostream()->flush() ); // Flush the current debug output stream. + * Debug( list_allocations_on(libcw_do) ); // List all allocations. + * Debug( libcw_do.set_ostream(&std::cout) ); // Use std::cout as debug output stream. + * Debug( libcw_do.set_ostream(&std::cout, &mutex) ); // use `mutex' as lock for std::cout. + * Debug( libcw_do.inc_indent(4) ); // Increment indentation by 4 spaces. + * Debug( libcw_do.get_ostream()->flush() ); // Flush the current debug output stream. * \endcode */ #define Debug(x) \ Index: src/libcwd/include/libcw/macro_ForAllDebugObjects.h diff -u src/libcwd/include/libcw/macro_ForAllDebugObjects.h:1.5 src/libcwd/include/libcw/macro_ForAllDebugObjects.h:1.6 --- src/libcwd/include/libcw/macro_ForAllDebugObjects.h:1.5 Sat Feb 2 20:15:11 2002 +++ src/libcwd/include/libcw/macro_ForAllDebugObjects.h Mon Feb 11 21:40:32 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_ForAllDebugObjects.h,v 1.5 2002/02/03 04:15:11 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_ForAllDebugObjects.h,v 1.6 2002/02/12 05:40:32 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -104,7 +104,7 @@ * For example, * * \code - * ForAllDebugObjects( debugObject.set_ostream(&std::cerr) ); + * ForAllDebugObjects( debugObject.set_ostream(&std::cerr, &cerr_mutex) ); * \endcode * * would set the output stream of all %debug objects to <CODE>std::cerr</CODE>. Index: src/libcwd/include/libcw/private_threading.h diff -u src/libcwd/include/libcw/private_threading.h:1.21 src/libcwd/include/libcw/private_threading.h:1.22 --- src/libcwd/include/libcw/private_threading.h:1.21 Thu Feb 7 20:03:47 2002 +++ src/libcwd/include/libcw/private_threading.h Mon Feb 11 21:40:32 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_threading.h,v 1.21 2002/02/08 04:03:47 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_threading.h,v 1.22 2002/02/12 05:40:32 libcw Exp $ // // Copyright (C) 2001 - 2002, by // @@ -78,9 +78,7 @@ namespace _private_ { extern void initialize_global_mutexes(void) throw(); -#ifdef DEBUGDEBUG extern bool WST_multi_threaded; -#endif //=================================================================================================== // Index: src/libcwd/tests/threads4.cc diff -u src/libcwd/tests/threads4.cc:1.9 src/libcwd/tests/threads4.cc:1.10 --- src/libcwd/tests/threads4.cc:1.9 Tue Feb 5 16:46:08 2002 +++ src/libcwd/tests/threads4.cc Mon Feb 11 21:40:32 2002 @@ -76,7 +76,8 @@ #ifdef DEBUGMALLOC libcw::debug::make_all_allocations_invisible_except(NULL); #endif - Debug( libcw_do.set_ostream(&std::cout) ); + pthread_mutex_t cout_mutex = PTHREAD_MUTEX_INITIALIZER; + Debug( libcw_do.set_ostream(&std::cout, &cout_mutex) ); Debug( libcw_do.on() ); char margin[32]; sprintf(margin, "%-10lu (%04lu) ", pthread_self(), thread_index(pthread_self())); Index: src/libcwd/threading.cc diff -u src/libcwd/threading.cc:1.9 src/libcwd/threading.cc:1.10 --- src/libcwd/threading.cc:1.9 Sat Feb 9 21:41:58 2002 +++ src/libcwd/threading.cc Mon Feb 11 21:40:32 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/threading.cc,v 1.9 2002/02/10 05:41:58 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/threading.cc,v 1.10 2002/02/12 05:40:32 libcw Exp $ // // Copyright (C) 2001, by // @@ -22,9 +22,7 @@ namespace _private_ { #ifdef LIBCWD_THREAD_SAFE -#ifdef DEBUGDEBUG bool WST_multi_threaded = false; -#endif #ifdef DEBUGDEBUG int instance_locked[instance_locked_size]; #endif @@ -86,6 +84,7 @@ mutex_tct<tsd_initialization_instance>::unlock(); if (thread_index(pthread_self()) != 0) // Is this a second (or later) thread? { + WST_multi_threaded = true; set_alloc_checking_off(*this); for (int i = 0; i < LIBCWD_DO_MAX; ++i) if (old_array[i]) ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-13 03:55:37
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-13 03:55:36 UTC Modified files: libcwd/debug.cc libcwd/threading.cc libcwd/include/libcw/Makefile.am libcwd/include/libcw/class_debug.h libcwd/include/libcw/class_debug.inl libcwd/include/libcw/private_threading.h libcwd/testsuite/libcwd.nodebug/nodebug.cc libcwd/testsuite/libcwd.nodebug/nodebug.re libcwd/testsuite/libcwd.tst/alloctag.cc libcwd/testsuite/libcwd.tst/bfd.cc libcwd/testsuite/libcwd.tst/dlopen.re libcwd/testsuite/libcwd.tst/flush.cc libcwd/testsuite/libcwd.tst/leak.cc libcwd/testsuite/libcwd.tst/marker.cc libcwd/testsuite/libcwd.tst/test_delete.cc Added files: libcwd/include/libcw/private_lock_interface.h libcwd/include/libcw/set_ostream.inl Log message: Make 'make full-check' work again. Use locking inside set_ostream and free the previous mutex if any. ---------------------- diff included ---------------------- Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.67 src/libcwd/debug.cc:1.68 --- src/libcwd/debug.cc:1.67 Mon Feb 11 21:40:31 2002 +++ src/libcwd/debug.cc Tue Feb 12 19:55:25 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.67 2002/02/12 05:40:31 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.68 2002/02/13 03:55:25 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -94,6 +94,7 @@ ++__libcwd_tsd.library_call; ++LIBCWD_DO_TSD_MEMBER_OFF(libcw_do); #endif +#ifdef LIBCWD_THREAD_SAFE LIBCWD_DISABLE_CANCEL // We don't want Dout() to be a cancellation point. if (mutex) { @@ -109,12 +110,16 @@ else { WST_second_time = true; - DoutFatal(dc::core, "When using multiple threads, you must provide a locking mechanism for the debug output stream. You can pass a pointer to a mutex with `debug_ct::set_ostream'."); + DoutFatal(dc::core, "When using multiple threads, you must provide a locking mechanism for the debug output stream. " + "You can pass a pointer to a mutex with `debug_ct::set_ostream' (see documentation/html/group__group__destination.html)."); } } else os->write(buf, curlen); LIBCWD_ENABLE_CANCEL +#else // !LIBCWD_THREAD_SAFE + os->write(buf, curlen); +#endif // !LIBCWD_THREAD_SAFE #ifdef DEBUGMALLOC --LIBCWD_DO_TSD_MEMBER_OFF(libcw_do); --__libcwd_tsd.library_call; @@ -1544,10 +1549,44 @@ template<> void debug_ct::set_ostream(std::ostream* os, pthread_mutex_t* mutex) { - M_mutex = new _private_::pthread_lock_interface_ct(mutex); + _private_::lock_interface_base_ct* new_mutex = new _private_::pthread_lock_interface_ct(mutex); + LIBCWD_DEFER_CANCEL + _private_::mutex_tct<_private_::set_ostream_instance>::lock(); + _private_::lock_interface_base_ct* old_mutex = M_mutex; + if (old_mutex) + old_mutex->lock(); // Make sure all other threads left this critical area. + M_mutex = new_mutex; + if (old_mutex) + { + old_mutex->unlock(); + delete old_mutex; + } private_set_ostream(os); + _private_::mutex_tct<_private_::set_ostream_instance>::unlock(); + LIBCWD_RESTORE_CANCEL } #endif // LIBCWD_THREAD_SAFE + +/** + * \brief Set output device. + * \ingroup group_destination + * + * Assign a new \c ostream to this %debug object (default is <CODE>std::cerr</CODE>). + */ +void debug_ct::set_ostream(std::ostream* os) +{ +#ifdef LIBCWD_THREAD_SAFE + if (_private_::WST_multi_threaded) + Dout(dc::warning, location_ct((char*)__builtin_return_address(0) + builtin_return_address_offset) << ": You should passing a locking mechanism to `set_ostream' for the ostream (see documentation/html/group__group__destination.html)"); + LIBCWD_DEFER_CANCEL + _private_::mutex_tct<_private_::set_ostream_instance>::lock(); +#endif + private_set_ostream(os); +#ifdef LIBCWD_THREAD_SAFE + _private_::mutex_tct<_private_::set_ostream_instance>::unlock(); + LIBCWD_RESTORE_CANCEL +#endif +} } // namespace debug } // namespace libcw Index: src/libcwd/include/libcw/Makefile.am diff -u src/libcwd/include/libcw/Makefile.am:1.23 src/libcwd/include/libcw/Makefile.am:1.24 --- src/libcwd/include/libcw/Makefile.am:1.23 Fri Feb 8 14:29:29 2002 +++ src/libcwd/include/libcw/Makefile.am Tue Feb 12 19:55:26 2002 @@ -43,9 +43,11 @@ private_internal_string.h \ private_internal_stringstream.h \ private_internal_vector.h \ + private_lock_interface.h \ private_set_alloc_checking.h \ private_struct_TSD.h \ private_threading.h \ + set_ostream.inl \ strerrno.h \ struct_debug_tsd.h \ type_info.h Index: src/libcwd/include/libcw/class_debug.h diff -u src/libcwd/include/libcw/class_debug.h:1.10 src/libcwd/include/libcw/class_debug.h:1.11 --- src/libcwd/include/libcw/class_debug.h:1.10 Mon Feb 11 21:40:32 2002 +++ src/libcwd/include/libcw/class_debug.h Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.10 2002/02/12 05:40:32 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.11 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2000 - 2002, by // @@ -30,6 +30,9 @@ #ifndef LIBCW_STRUCT_DEBUG_TSD #include <libcw/struct_debug_tsd.h> #endif +#ifndef LIBCW_PRIVATE_LOCK_INTERFACE_H +#include <libcw/private_lock_interface.h> +#endif #ifndef LIBCW_IOSFWD #define LIBCW_IOSFWD #include <iosfwd> @@ -38,10 +41,6 @@ namespace libcw { namespace debug { -namespace _private_ { - class lock_interface_base_ct; -} // namespace _private_ - //=================================================================================================== // class debug_ct // @@ -260,73 +259,12 @@ #endif // LIBCWD_THREAD_SAFE }; -#ifdef LIBCWD_THREAD_SAFE -namespace _private_ { - -class lock_interface_base_ct { -public: - virtual int trylock(void) = 0; - virtual void lock(void) = 0; - virtual void unlock(void) = 0; -}; - -template<class T> - class lock_interface_tct : public lock_interface_base_ct { - private: - T* ptr; - virtual int trylock(void) { return ptr->trylock(); } - virtual void lock(void) { ptr->lock(); } - virtual void unlock(void) { ptr->unlock(); } - public: - lock_interface_tct(T* mutex) : ptr(mutex) { } - }; - - class pthread_lock_interface_ct : public lock_interface_base_ct { - private: - pthread_mutex_t* ptr; - virtual int trylock(void) { return pthread_mutex_trylock(ptr); } - virtual void lock(void) { pthread_mutex_lock(ptr); } - virtual void unlock(void) { pthread_mutex_unlock(ptr); } - public: - pthread_lock_interface_ct(pthread_mutex_t* mutex) : ptr(mutex) { } - }; - -} // namespace _private_ - -/** - * \brief Set output device and provide external lock. - * \ingroup group_destination - * - * Assign a new \c ostream to this %debug object. - * The \c ostream will only be written to after obtaining the lock - * that is passed as second argument. Each \c ostream needs to have - * a unique lock. If the application also writes directly - * to the same \c ostream then use the same lock. - * - * <b>Example:</b> - * - * \code - * MyLock lock; - * - * // Uses MyLock::lock(), MyLock::trylock() and MyLock::unlock(). - * Debug( libcw_do.set_ostream(&std::cerr, &lock) ); - * - * lock.lock(); - * std::cerr << "The application uses cerr too\n"; - * lock.unlock(); - * \endcode - */ -template<class T> - void debug_ct::set_ostream(std::ostream* os, T* mutex) - { - M_mutex = new _private_::lock_interface_tct<T>(mutex); - private_set_ostream(os); - } - -#endif // LIBCWD_THREAD_SAFE - } // namespace debug } // namespace libcw + +#ifndef LIBCW_SET_OSTREAM_INL +#include <libcw/set_ostream.inl> +#endif #endif // LIBCW_CLASS_DEBUG_H Index: src/libcwd/include/libcw/class_debug.inl diff -u src/libcwd/include/libcw/class_debug.inl:1.7 src/libcwd/include/libcw/class_debug.inl:1.8 --- src/libcwd/include/libcw/class_debug.inl:1.7 Mon Feb 11 21:40:32 2002 +++ src/libcwd/include/libcw/class_debug.inl Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.inl,v 1.7 2002/02/12 05:40:32 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.inl,v 1.8 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -178,19 +178,6 @@ if (LIBCWD_TSD_MEMBER(laf_stack).size() == 0) LIBCWD_TSD_MEMBER(current_oss) = NULL; #endif -} - -/** - * \brief Set output device. - * \ingroup group_destination - * - * Assign a new \c ostream to this %debug object (default is <CODE>std::cerr</CODE>). - */ -__inline__ -void -debug_ct::set_ostream(std::ostream* os) -{ - private_set_ostream(os); } /** \} */ Index: src/libcwd/include/libcw/private_lock_interface.h diff -u /dev/null src/libcwd/include/libcw/private_lock_interface.h:1.1 --- /dev/null Tue Feb 12 19:55:36 2002 +++ src/libcwd/include/libcw/private_lock_interface.h Tue Feb 12 19:55:26 2002 @@ -0,0 +1,60 @@ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_lock_interface.h,v 1.1 2002/02/13 03:55:26 libcw Exp $ +// +// Copyright (C) 2002, by +// +// Carlo Wood, Run on IRC <ca...@al...> +// RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt +// Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61 +// +// This file may be distributed under the terms of the Q Public License +// version 1.0 as appearing in the file LICENSE.QPL included in the +// packaging of this file. +// + +/** \file private_lock_interface.h + * Do not include this header file directly, instead include "\ref preparation_step2 "debug.h"". + */ + +#ifndef LIBCW_PRIVATE_LOCK_INTERFACE_H +#define LIBCW_PRIVATE_LOCK_INTERFACE_H + +#ifdef LIBCWD_THREAD_SAFE +namespace libcw { + namespace debug { + namespace _private_ { + +class lock_interface_base_ct { +public: + virtual int trylock(void) = 0; + virtual void lock(void) = 0; + virtual void unlock(void) = 0; + virtual ~lock_interface_base_ct() { } +}; + +template<class T> + class lock_interface_tct : public lock_interface_base_ct { + private: + T* ptr; + virtual int trylock(void) { return ptr->trylock(); } + virtual void lock(void) { ptr->lock(); } + virtual void unlock(void) { ptr->unlock(); } + public: + lock_interface_tct(T* mutex) : ptr(mutex) { } + }; + +class pthread_lock_interface_ct : public lock_interface_base_ct { + private: + pthread_mutex_t* ptr; + virtual int trylock(void) { return pthread_mutex_trylock(ptr); } + virtual void lock(void) { pthread_mutex_lock(ptr); } + virtual void unlock(void) { pthread_mutex_unlock(ptr); } + public: + pthread_lock_interface_ct(pthread_mutex_t* mutex) : ptr(mutex) { } +}; + + } // namespace _private_ + } // namespace debug +} // namespace libcw +#endif // LIBCWD_THREAD_SAFE +#endif // LIBCW_PRIVATE_LOCK_INTERFACE_H + Index: src/libcwd/include/libcw/private_threading.h diff -u src/libcwd/include/libcw/private_threading.h:1.22 src/libcwd/include/libcw/private_threading.h:1.23 --- src/libcwd/include/libcw/private_threading.h:1.22 Mon Feb 11 21:40:32 2002 +++ src/libcwd/include/libcw/private_threading.h Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_threading.h,v 1.22 2002/02/12 05:40:32 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_threading.h,v 1.23 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2001 - 2002, by // @@ -112,6 +112,7 @@ type_info_of_instance, dlopen_map_instance, write_max_len_instance, + set_ostream_instance, debug_objects_instance, // rwlock debug_channels_instance, // rwlock // Values reserved for read/write locks. Index: src/libcwd/include/libcw/set_ostream.inl diff -u /dev/null src/libcwd/include/libcw/set_ostream.inl:1.1 --- /dev/null Tue Feb 12 19:55:36 2002 +++ src/libcwd/include/libcw/set_ostream.inl Tue Feb 12 19:55:26 2002 @@ -0,0 +1,75 @@ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/set_ostream.inl,v 1.1 2002/02/13 03:55:26 libcw Exp $ +// +// Copyright (C) 2002, by +// +// Carlo Wood, Run on IRC <ca...@al...> +// RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt +// Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61 +// +// This file may be distributed under the terms of the Q Public License +// version 1.0 as appearing in the file LICENSE.QPL included in the +// packaging of this file. +// + +#ifndef LIBCW_SET_OSTREAM_INL +#define LIBCW_SET_OSTREAM_INL + +#ifndef LIBCW_PRIVATE_LOCK_INTERFACE_H +#include <libcw/private_lock_interface.h> +#endif +#ifndef LIBCW_PRIVATE_THREADING_H +#include <libcw/private_threading.h> +#endif + +#ifdef LIBCWD_THREAD_SAFE +namespace libcw { + namespace debug { + +/** + * \brief Set output device and provide external lock. + * \ingroup group_destination + * + * Assign a new \c ostream to this %debug object. + * The \c ostream will only be written to after obtaining the lock + * that is passed as second argument. Each \c ostream needs to have + * a unique lock. If the application also writes directly + * to the same \c ostream then use the same lock. + * + * <b>Example:</b> + * + * \code + * MyLock lock; + * + * // Uses MyLock::lock(), MyLock::trylock() and MyLock::unlock(). + * Debug( libcw_do.set_ostream(&std::cerr, &lock) ); + * + * lock.lock(); + * std::cerr << "The application uses cerr too\n"; + * lock.unlock(); + * \endcode + */ +template<class T> + void debug_ct::set_ostream(std::ostream* os, T* mutex) + { + _private_::lock_interface_base_ct* new_mutex = new _private_::lock_interface_tct<T>(mutex); + LIBCWD_DEFER_CANCEL + _private_::mutex_tct<_private_::set_ostream_instance>::lock(); + _private_::lock_interface_base_ct* old_mutex = M_mutex; + if (old_mutex) + old_mutex->lock(); // Make sure all other threads left this critical area. + M_mutex = new_mutex; + if (old_mutex) + { + old_mutex->unlock(); + delete old_mutex; + } + private_set_ostream(os); + _private_::mutex_tct<_private_::set_ostream_instance>::unlock(); + LIBCWD_RESTORE_CANCEL + } + + } // namespace debug +} // namespace libcw +#endif // LIBCWD_THREAD_SAFE +#endif // LIBCW_SET_OSTREAM_INL + Index: src/libcwd/testsuite/libcwd.nodebug/nodebug.cc diff -u src/libcwd/testsuite/libcwd.nodebug/nodebug.cc:1.7 src/libcwd/testsuite/libcwd.nodebug/nodebug.cc:1.8 --- src/libcwd/testsuite/libcwd.nodebug/nodebug.cc:1.7 Wed Sep 19 16:34:50 2001 +++ src/libcwd/testsuite/libcwd.nodebug/nodebug.cc Tue Feb 12 19:55:26 2002 @@ -7,13 +7,13 @@ DoutFatal(dc::fatal, "Expected Failure."); #endif - Debug( make_all_allocations_invisible_except(NULL) ); - Debug( libcw_do.on() ); Debug( dc::malloc.on() ); #ifdef DEBUGUSEBFD Debug( dc::bfd.on() ); #endif + + Debug( make_all_allocations_invisible_except(NULL) ); int* p = new int [100]; Index: src/libcwd/testsuite/libcwd.nodebug/nodebug.re diff -u src/libcwd/testsuite/libcwd.nodebug/nodebug.re:1.10 src/libcwd/testsuite/libcwd.nodebug/nodebug.re:1.11 --- src/libcwd/testsuite/libcwd.nodebug/nodebug.re:1.10 Tue Jan 8 18:20:50 2002 +++ src/libcwd/testsuite/libcwd.nodebug/nodebug.re Tue Feb 12 19:55:26 2002 @@ -8,6 +8,10 @@ does not have a line number, perhaps the unit containing the function `_*main' wasn't compiled with flag -(g|ggdb)\? MALLOC : <continued> 0x[a-f0-9]+ -MALLOC : Allocated memory: 400 bytes in 1 blocks\. +MALLOC : Allocated memory: (400|408) bytes in (1|2) blocks\. new\[\] 0x[a-f0-9]+ (_*main|) *<unknown type>; \(sz = 400\) +// input lines 2 +// output till ^MALLOC +(malloc 0x[a-f0-9]+ *eh_globals\.cc:[0-9]* *<unknown type>; \(sz = 8\) +)* MALLOC : delete\[\] 0x[a-f0-9]+ (_*main|) *<unknown type>; \(sz = 400\) Index: src/libcwd/testsuite/libcwd.tst/alloctag.cc diff -u src/libcwd/testsuite/libcwd.tst/alloctag.cc:1.17 src/libcwd/testsuite/libcwd.tst/alloctag.cc:1.18 --- src/libcwd/testsuite/libcwd.tst/alloctag.cc:1.17 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/alloctag.cc Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/alloctag.cc,v 1.17 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/alloctag.cc,v 1.18 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -90,5 +90,7 @@ free(cp2i); free(rp); free(rpi); + + Debug( libcw_do.off() ); return 0; } Index: src/libcwd/testsuite/libcwd.tst/bfd.cc diff -u src/libcwd/testsuite/libcwd.tst/bfd.cc:1.24 src/libcwd/testsuite/libcwd.tst/bfd.cc:1.25 --- src/libcwd/testsuite/libcwd.tst/bfd.cc:1.24 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/bfd.cc Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/bfd.cc,v 1.24 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/bfd.cc,v 1.25 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -157,5 +157,6 @@ #endif libcw_bfd_test(); + Debug( libcw_do.off() ); return 0; } Index: src/libcwd/testsuite/libcwd.tst/dlopen.re diff -u src/libcwd/testsuite/libcwd.tst/dlopen.re:1.11 src/libcwd/testsuite/libcwd.tst/dlopen.re:1.12 --- src/libcwd/testsuite/libcwd.tst/dlopen.re:1.11 Sat Feb 9 21:41:58 2002 +++ src/libcwd/testsuite/libcwd.tst/dlopen.re Tue Feb 12 19:55:26 2002 @@ -18,6 +18,6 @@ malloc 0x[0-9a-f]* module\.cc:19 void\*; \(sz = 310\) Allocated inside global_test_symbol // input lines 2 // output till ^NOTICE -(malloc 0x[0-9a-f]* *(dl-[a-z]*\.c|stl_alloc\.h|specific\.c|dlerror\.c):[0-9]* *<unknown type>; \(sz = [0-9]*\) +(malloc 0x[0-9a-f]* *(dl-[a-z]*\.c|stl_alloc\.h|specific\.c|dlerror\.c|eh_globals\.cc):[0-9]* *<unknown type>; \(sz = [0-9]*\) )* NOTICE : Finished Index: src/libcwd/testsuite/libcwd.tst/flush.cc diff -u src/libcwd/testsuite/libcwd.tst/flush.cc:1.10 src/libcwd/testsuite/libcwd.tst/flush.cc:1.11 --- src/libcwd/testsuite/libcwd.tst/flush.cc:1.10 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/flush.cc Tue Feb 12 19:55:26 2002 @@ -46,4 +46,6 @@ Dout( dc::continued, "part2... " ); generate_tables(); Dout( dc::finish, "done" ); + + Debug( libcw_do.off() ); } Index: src/libcwd/testsuite/libcwd.tst/leak.cc diff -u src/libcwd/testsuite/libcwd.tst/leak.cc:1.16 src/libcwd/testsuite/libcwd.tst/leak.cc:1.17 --- src/libcwd/testsuite/libcwd.tst/leak.cc:1.16 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/leak.cc Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/leak.cc,v 1.16 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/leak.cc,v 1.17 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -160,5 +160,6 @@ free(ptr2); free(ptr3); + Debug( libcw_do.off() ); return 0; } Index: src/libcwd/testsuite/libcwd.tst/marker.cc diff -u src/libcwd/testsuite/libcwd.tst/marker.cc:1.15 src/libcwd/testsuite/libcwd.tst/marker.cc:1.16 --- src/libcwd/testsuite/libcwd.tst/marker.cc:1.15 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/marker.cc Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/marker.cc,v 1.15 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/marker.cc,v 1.16 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -87,5 +87,6 @@ Dout(dc::notice, "Finished successfully."); + Debug( libcw_do.off() ); exit(0); } Index: src/libcwd/testsuite/libcwd.tst/test_delete.cc diff -u src/libcwd/testsuite/libcwd.tst/test_delete.cc:1.11 src/libcwd/testsuite/libcwd.tst/test_delete.cc:1.12 --- src/libcwd/testsuite/libcwd.tst/test_delete.cc:1.11 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/test_delete.cc Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/test_delete.cc,v 1.11 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/test_delete.cc,v 1.12 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -85,5 +85,6 @@ std::cout << "Finished successfully.\n"; #endif + Debug( libcw_do.off() ); exit(0); } Index: src/libcwd/threading.cc diff -u src/libcwd/threading.cc:1.10 src/libcwd/threading.cc:1.11 --- src/libcwd/threading.cc:1.10 Mon Feb 11 21:40:32 2002 +++ src/libcwd/threading.cc Tue Feb 12 19:55:26 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/threading.cc,v 1.10 2002/02/12 05:40:32 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/threading.cc,v 1.11 2002/02/13 03:55:26 libcw Exp $ // // Copyright (C) 2001, by // @@ -33,6 +33,7 @@ mutex_tct<mutex_initialization_instance>::initialize(); rwlock_tct<object_files_instance>::initialize(); mutex_tct<dlopen_map_instance>::initialize(); + mutex_tct<set_ostream_instance>::initialize(); #ifdef DEBUGMALLOC mutex_tct<alloc_tag_desc_instance>::initialize(); mutex_tct<memblk_map_instance>::initialize(); ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-13 04:04:06
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-13 04:04:06 UTC Modified files: libcwd/debug.cc Log message: Small documentation update. ---------------------- diff included ---------------------- Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.68 src/libcwd/debug.cc:1.69 --- src/libcwd/debug.cc:1.68 Tue Feb 12 19:55:25 2002 +++ src/libcwd/debug.cc Tue Feb 12 20:03:56 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.68 2002/02/13 03:55:25 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.69 2002/02/13 04:03:56 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -1529,8 +1529,8 @@ * \ingroup group_destination * * Assign a new \c ostream to this %debug object. - * The \c ostream will only be written to after obtaining the lock - * that is passed as second argument. + * The \c ostream will only be written to after acquiring the + * pthread mutex passed in the second argument. * * <b>Example:</b> * @@ -1568,10 +1568,11 @@ #endif // LIBCWD_THREAD_SAFE /** - * \brief Set output device. + * \brief Set output device (single threaded applications). * \ingroup group_destination * * Assign a new \c ostream to this %debug object (default is <CODE>std::cerr</CODE>). + * For use in single threaded applications only. */ void debug_ct::set_ostream(std::ostream* os) { ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-13 05:41:35
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-13 05:41:34 UTC Modified files: libcwd/configure.in Log message: Configure options help text update. ---------------------- diff included ---------------------- Index: src/libcwd/configure.in diff -u src/libcwd/configure.in:1.102 src/libcwd/configure.in:1.103 --- src/libcwd/configure.in:1.102 Fri Feb 8 19:22:59 2002 +++ src/libcwd/configure.in Tue Feb 12 21:41:24 2002 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision: 1.102 $)dnl +AC_REVISION($Revision: 1.103 $)dnl dnl General intialization of `autoconf' varaibles. dnl Ensure that the directory specified with --srcdir was correct @@ -49,8 +49,8 @@ AC_SUBST(CW_CONFIG_BUILTIN_RETURN_ADDRESS_OFFSET) dnl Manual configuration options of libcwd. -AC_ARG_ENABLE(libcwd, -[Options of package libcwd:]) +AC_ARG_ENABLE(libcwd, [ +Options of package libcwd:]) libcwd_config_alloc=yes AC_ARG_ENABLE(libcwd-alloc, @@ -69,8 +69,8 @@ libcwd_config_location=yes AC_ARG_ENABLE(libcwd-location, - [ --disable-libcwd-location disable the ability to lookup source file and line number, - you might need this on a non-ELF32 system.], + [ --disable-libcwd-location disable the ability to lookup source file and line + number, you might need this on a non-ELF32 system.], libcwd_config_location=$enableval) libcwd_config_bfd=no ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-13 14:46:06
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-13 14:46:01 UTC Modified files: libcwd/libcwd.spec.in libcwd/include/libcw/Makefile.am Log message: rpm build and install bug fixes. ---------------------- diff included ---------------------- Index: src/libcwd/include/libcw/Makefile.am diff -u src/libcwd/include/libcw/Makefile.am:1.24 src/libcwd/include/libcw/Makefile.am:1.25 --- src/libcwd/include/libcw/Makefile.am:1.24 Tue Feb 12 19:55:26 2002 +++ src/libcwd/include/libcw/Makefile.am Wed Feb 13 06:45:50 2002 @@ -60,5 +60,6 @@ MAINTAINERCLEANFILES = Makefile.in install-data-local: + $(mkinstalldirs) $(DESTDIR)$(libcwddir) $(INSTALL_DATA) $(EXTRA_HEADERS) $(DESTDIR)$(libcwddir) Index: src/libcwd/libcwd.spec.in diff -u src/libcwd/libcwd.spec.in:1.9 src/libcwd/libcwd.spec.in:1.10 --- src/libcwd/libcwd.spec.in:1.9 Sat Dec 29 20:17:47 2001 +++ src/libcwd/libcwd.spec.in Wed Feb 13 06:45:50 2002 @@ -11,7 +11,7 @@ Requires: gcc-c++ >= 2.95.1, binutils >= 2.9 %endif Buildroot: %{_tmppath}/%{name}-root -BuildPrereq: make, m4, which >= 2.5, autoconf = 2.13, automake >= 1.4p1, libtool >= 1.4 +BuildPrereq: make, m4, which >= 2.5, autoconf >= 2.13, automake >= 1.4p1, libtool >= 1.4 URL: http://libcw.sourceforge.net/debugging/ %description ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-13 14:58:36
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-13 14:58:33 UTC Modified files: libcwd/libcwd.spec.in Log message: Update of spec file. ---------------------- diff included ---------------------- Index: src/libcwd/libcwd.spec.in diff -u src/libcwd/libcwd.spec.in:1.10 src/libcwd/libcwd.spec.in:1.11 --- src/libcwd/libcwd.spec.in:1.10 Wed Feb 13 06:45:50 2002 +++ src/libcwd/libcwd.spec.in Wed Feb 13 06:58:23 2002 @@ -17,9 +17,9 @@ %description Libcwd is a full-featured, professional, well documented library to support C++ developers with debugging their applications. It includes support for -ostream-based debug output, custom debug channels and devices, powerful -memory allocation debugging, run-time sourcefile:linenumber information and -demangled type-names of variables. +ostream-based debug output, custom debug channels and devices, threading, +powerful memory allocation debugging, run-time sourcefile:linenumber +information and demangled type-names of variables. %prep %setup @@ -41,7 +41,8 @@ echo echo "Please look at %{__prefix}/doc/libcwd-%{version}/example-project.tar.gz" echo "for an example of how to write an application that uses libcwd." -echo "Detailed documentation can be found in file://%{__prefix}/doc/libcwd-%{version}/html/index.html" +echo "Detailed documentation can be found in" +echo "file://%{__prefix}/doc/libcwd-%{version}/html/index.html" echo %files @@ -60,6 +61,9 @@ %{__prefix}/include/libcw/* %changelog +* Wed Feb 13 2002 Carlo Wood <li...@al...> +- Allow also version of autoconf larger than 2.13. + * Sun Dec 09 2001 Carlo Wood <li...@al...> - Added a URL: and BuildPrereq: entry. - Added doxygen documentation to the rpm. ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-13 14:59:50
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-13 14:59:45 UTC Removed files: libcwd/wrapcnclpnts.c Log message: Remove old file. ---------------------- diff included ---------------------- Index: src/libcwd/wrapcnclpnts.c diff -u src/libcwd/wrapcnclpnts.c:1.3 src/libcwd/wrapcnclpnts.c:removed --- src/libcwd/wrapcnclpnts.c:1.3 Thu Jan 31 21:21:05 2002 +++ src/libcwd/wrapcnclpnts.c Wed Feb 13 06:59:45 2002 @@ -1,119 +0,0 @@ -#include <libcw/debug_config.h> // Needed for DEBUGDEBUGTHREADS - -#ifdef DEBUGDEBUGTHREADS - -#define _LARGEFILE64_SOURCE -#include <unistd.h> -#include <fcntl.h> -#include <sys/mman.h> -#include <pthread.h> -#include <stdarg.h> -#include <stddef.h> -#include <stdlib.h> -#include <termios.h> -#include <sys/resource.h> -#include <sys/wait.h> -#include <sys/socket.h> - -#define CANCELABLE_SYSCALL(res_type, name, param_list, params) \ -res_type __libc_##name param_list; \ -res_type \ -__attribute__ ((weak)) \ -name param_list \ -{ \ - res_type result; \ - int oldtype; \ - pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype); \ - result = __libc_##name params; \ - pthread_setcanceltype (oldtype, NULL); \ - return result; \ -} - -#define CANCELABLE_SYSCALL_VA(res_type, name, param_list, params, last_arg) \ -res_type __libc_##name param_list; \ -res_type \ -__attribute__ ((weak)) \ -name param_list \ -{ \ - res_type result; \ - int oldtype; \ - va_list ap; \ - pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype); \ - va_start (ap, last_arg); \ - result = __libc_##name params; \ - va_end (ap); \ - pthread_setcanceltype (oldtype, NULL); \ - return result; \ -} - -#define strong_alias(name, aliasname) extern __typeof (name) aliasname __attribute__ ((alias (#name))); - -CANCELABLE_SYSCALL (int, close, (int fd), (fd)) -strong_alias (close, __close) - -CANCELABLE_SYSCALL_VA (int, fcntl, (int fd, int cmd, ...), (fd, cmd, va_arg (ap, long int)), cmd) -strong_alias (fcntl, __fcntl) - -CANCELABLE_SYSCALL (int, fsync, (int fd), (fd)) - -CANCELABLE_SYSCALL (off_t, lseek, (int fd, off_t offset, int whence), (fd, offset, whence)) -strong_alias (lseek, __lseek) - -CANCELABLE_SYSCALL (off64_t, lseek64, (int fd, off64_t offset, int whence), (fd, offset, whence)) - -CANCELABLE_SYSCALL (int, msync, (__ptr_t addr, size_t length, int flags), (addr, length, flags)) - -CANCELABLE_SYSCALL (int, nanosleep, (const struct timespec *requested_time, struct timespec *remaining), (requested_time, remaining)) - -CANCELABLE_SYSCALL_VA (int, open, (const char *pathname, int flags, ...), (pathname, flags, va_arg (ap, mode_t)), flags) -strong_alias (open, __open) - -CANCELABLE_SYSCALL_VA (int, open64, (const char *pathname, int flags, ...), (pathname, flags, va_arg (ap, mode_t)), flags) -strong_alias (open64, __open64) - -CANCELABLE_SYSCALL (int, pause, (void), ()) - -CANCELABLE_SYSCALL (ssize_t, pread, (int fd, void *buf, size_t count, off_t offset), (fd, buf, count, offset)) - -CANCELABLE_SYSCALL (ssize_t, pread64, (int fd, void *buf, size_t count, off64_t offset), (fd, buf, count, offset)) -strong_alias (pread64, __pread64) - -CANCELABLE_SYSCALL (ssize_t, pwrite, (int fd, const void *buf, size_t n, off_t offset), (fd, buf, n, offset)) - -CANCELABLE_SYSCALL (ssize_t, pwrite64, (int fd, const void *buf, size_t n, off64_t offset), (fd, buf, n, offset)) -strong_alias (pwrite64, __pwrite64) - -CANCELABLE_SYSCALL (ssize_t, read, (int fd, void *buf, size_t count), (fd, buf, count)) -strong_alias (read, __read) - -CANCELABLE_SYSCALL (int, system, (const char *line), (line)) - -CANCELABLE_SYSCALL (int, tcdrain, (int fd), (fd)) - -CANCELABLE_SYSCALL (__pid_t, wait, (__WAIT_STATUS_DEFN stat_loc), (stat_loc)) -strong_alias (wait, __wait) - -CANCELABLE_SYSCALL (__pid_t, waitpid, (__pid_t pid, int *stat_loc, int options), (pid, stat_loc, options)) - -CANCELABLE_SYSCALL (ssize_t, write, (int fd, const void *buf, size_t n), (fd, buf, n)) -strong_alias (write, __write) - -CANCELABLE_SYSCALL (int, accept, (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len), (fd, addr, addr_len)) - -CANCELABLE_SYSCALL (int, connect, (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len), (fd, addr, len)) -strong_alias (connect, __connect) - -CANCELABLE_SYSCALL (ssize_t, recv, (int fd, __ptr_t buf, size_t n, int flags), (fd, buf, n, flags)) - -CANCELABLE_SYSCALL (ssize_t, recvfrom, (int fd, __ptr_t buf, size_t n, int flags, __SOCKADDR_ARG addr, socklen_t *addr_len), (fd, buf, n, flags, addr, addr_len)) - -CANCELABLE_SYSCALL (ssize_t, recvmsg, (int fd, struct msghdr *message, int flags), (fd, message, flags)) - -CANCELABLE_SYSCALL (ssize_t, send, (int fd, const __ptr_t buf, size_t n, int flags), (fd, buf, n, flags)) -strong_alias (send, __send) - -CANCELABLE_SYSCALL (ssize_t, sendmsg, (int fd, const struct msghdr *message, int flags), (fd, message, flags)) - -CANCELABLE_SYSCALL (ssize_t, sendto, (int fd, const __ptr_t buf, size_t n, int flags, __CONST_SOCKADDR_ARG addr, socklen_t addr_len), (fd, buf, n, flags, addr, addr_len)) - -#endif // DEBUGDEBUGTHREADS ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-13 16:18:42
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-13 16:18:39 UTC Modified files: libcwd/documentation/scripts/load_style_sheets.js Log message: Needed for on-line inclusion of documentation on sourceforge. ---------------------- diff included ---------------------- Index: src/libcwd/documentation/scripts/load_style_sheets.js diff -u src/libcwd/documentation/scripts/load_style_sheets.js:1.2 src/libcwd/documentation/scripts/load_style_sheets.js:1.3 --- src/libcwd/documentation/scripts/load_style_sheets.js:1.2 Sat Dec 29 20:17:48 2001 +++ src/libcwd/documentation/scripts/load_style_sheets.js Wed Feb 13 08:18:29 2002 @@ -2,24 +2,25 @@ { var styles_path; var rootpath; - var rootpos = location.href.lastIndexOf("libcw.sourceforge.net"); + var rootpos; + rootpos = location.pathname.lastIndexOf("/documentation/"); if (rootpos != -1) - rootpath = location.href.substring(0,rootpos) + "libcw.sourceforge.net/"; + rootpath = location.pathname.substring(0,rootpos) + "/documentation/"; else { - rootpos = location.pathname.lastIndexOf("/html/"); - if (rootpos != -1) - rootpath = location.pathname.substring(0,rootpos) + "/"; + rootpos = location.href.lastIndexOf("libcw.sourceforge.net"); + if (rootpos != -1) + rootpath = location.href.substring(0,rootpos) + "libcw.sourceforge.net/"; else { - rootpos = location.pathname.lastIndexOf("/tutorial/"); + rootpos = location.pathname.lastIndexOf("/html/"); if (rootpos != -1) rootpath = location.pathname.substring(0,rootpos) + "/"; else { - rootpos = location.pathname.lastIndexOf("/documentation/"); - if (rootpos != -1) - rootpath = location.pathname.substring(0,rootpos) + "/documentation/"; + rootpos = location.pathname.lastIndexOf("/tutorial/"); + if (rootpos != -1) + rootpath = location.pathname.substring(0,rootpos) + "/"; } } } ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-14 18:43:39
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-14 18:43:33 UTC Modified files: libcwd/NEWS libcwd/bfd.cc libcwd/documentation/Makefile Log message: Temporary fix for reported bug. ---------------------- diff included ---------------------- Index: src/libcwd/NEWS diff -u src/libcwd/NEWS:1.68 src/libcwd/NEWS:1.69 --- src/libcwd/NEWS:1.68 Sun Feb 10 19:00:24 2002 +++ src/libcwd/NEWS Thu Feb 14 10:43:23 2002 @@ -13,7 +13,7 @@ New are environment variables that influence libcwd. At the moment there are two: LIBCWD_NO_STARTUP_MSGS : Don't print anything before main(). - LIBCWD_ALWAYS_PRINT_LOADING : Print messages about loading + LIBCWD_PRINT_LOADING : Print messages about loading the shared libraries, even when this is done before libcw_do is turned on (except when LIBCWD_NO_STARTUP_MSGS is defined). Index: src/libcwd/bfd.cc diff -u src/libcwd/bfd.cc:1.101 src/libcwd/bfd.cc:1.102 --- src/libcwd/bfd.cc:1.101 Sat Feb 9 18:42:16 2002 +++ src/libcwd/bfd.cc Thu Feb 14 10:43:23 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.101 2002/02/10 02:42:16 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.102 2002/02/14 18:43:23 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -782,7 +782,8 @@ DoutFatal(dc::fatal|error_cf, "Failed to execute \"" << ps_prog << "\""); } - if (argv0.find('/') == _private_::ST_internal_string::npos) + //std::cerr << "argv0 = \"" << argv0 << '"' << std::endl; + if (argv0.find('/') != 0) { _private_::ST_internal_string prog_name(argv0); _private_::ST_internal_string path_list(getenv("PATH")); Index: src/libcwd/documentation/Makefile diff -u src/libcwd/documentation/Makefile:1.2 src/libcwd/documentation/Makefile:1.3 --- src/libcwd/documentation/Makefile:1.2 Sat Dec 29 20:17:47 2001 +++ src/libcwd/documentation/Makefile Thu Feb 14 10:43:23 2002 @@ -15,7 +15,12 @@ -e 's/"sys\.h"/"<a class="code" href="#preparation_step2">sys.h<\/a>"/' \ > html/preparation.html rm html/preparation.tmp - + for i in `grep -l '<h2>Modules</h2>' html/*.html`; do \ + mv $$i $$i.tmp; \ + cat $$i.tmp | \ + sed -e 's%<h2>Modules</h2>%<h2>Related</h2>%' > $$i; \ + rm $$i.tmp; \ + done external: external/INSTALL external/sys.h external/debug.h external/debug.cc ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-14 23:32:25
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-14 23:32:23 UTC Modified files: libcwd/documentation/tutorial/faq.m4 libcwd/documentation/tutorial/tut1.m4 libcwd/documentation/tutorial/tut2.m4 libcwd/documentation/tutorial/tut5.in Log message: Errors (using '<' instead of <) in tutorial. ---------------------- diff included ---------------------- Index: src/libcwd/documentation/tutorial/faq.m4 diff -u src/libcwd/documentation/tutorial/faq.m4:1.4 src/libcwd/documentation/tutorial/faq.m4:1.5 --- src/libcwd/documentation/tutorial/faq.m4:1.4 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/tutorial/faq.m4 Thu Feb 14 15:32:12 2002 @@ -295,7 +295,7 @@ Dout(dc::notice, "An error occured"); exit(0); - cerr << "We should never reach this\n"; + cerr << "We should never reach this\n"; </PRE> <P>If the complete line <SPAN class="code">Dout(dc::notice, "An error occured");</SPAN>, @@ -309,7 +309,7 @@ if (error) Dout(dc::notice, "An error occured"); else - cout << "Everything is ok\n"; + cout << "Everything is ok\n"; </PRE> <P>because after macro expansion that would become:</P> @@ -318,8 +318,8 @@ if (error) ; ; - else // <-- syntax error - cout << "Everything is ok\n"; + else // <-- syntax error + cout << "Everything is ok\n"; </PRE> <A name="LibcwDout"></A> @@ -341,7 +341,7 @@ <PRE class="code"> if (debug object and any of the debug channels are turned on) - the_ostream << your message; + the_ostream << your message; </PRE> <P>and so, "your message" is <EM>not</EM> evaluated when it isn't also Index: src/libcwd/documentation/tutorial/tut1.m4 diff -u src/libcwd/documentation/tutorial/tut1.m4:1.4 src/libcwd/documentation/tutorial/tut1.m4:1.5 --- src/libcwd/documentation/tutorial/tut1.m4:1.4 Fri Feb 8 13:32:13 2002 +++ src/libcwd/documentation/tutorial/tut1.m4 Thu Feb 14 15:32:12 2002 @@ -114,7 +114,7 @@ <CODE>dc::notice</CODE> is turned on.</P> <P>Output is written as if everything in the second field of the macro <CODE>Dout</CODE> is -written to an ostream; It is "equivalent" with: <CODE>cerr << "Hello World" << '\n';</CODE></P> +written to an ostream; It is "equivalent" with: <CODE>cerr << "Hello World" << '\n';</CODE></P> <DIV class="faq-frame"><H4>FAQ</H4><UL class="faq"> <LI><A HREF="faq.html#macros">Why is <CODE>Dout</CODE> a macro and not a template?</A></LI> Index: src/libcwd/documentation/tutorial/tut2.m4 diff -u src/libcwd/documentation/tutorial/tut2.m4:1.3 src/libcwd/documentation/tutorial/tut2.m4:1.4 --- src/libcwd/documentation/tutorial/tut2.m4:1.3 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/tutorial/tut2.m4 Thu Feb 14 15:32:12 2002 @@ -41,19 +41,19 @@ #define ForAllDebugObjects(STATEMENT) #define LibcwDebug(dc_namespace, x) #define LibcwDout(a, b, c, d) -#define LibcwDoutFatal(a, b, c, d) do { ::std::cerr << d << ::std::endl; ::std::exit(254); } while(1) +#define LibcwDoutFatal(a, b, c, d) do { ::std::cerr << d << ::std::endl; ::std::exit(254); } while(1) #define NEW(x) new x #else // CWDEBUG #ifndef DEBUGCHANNELS -// This must be defined before <libcw/debug.h> is included and must be the +// This must be defined before <libcw/debug.h> is included and must be the // name of the namespace containing your `dc' namespace (see below). // You can use any namespace(s) you like, except existing namespaces // (like ::, ::std and ::libcw). #define DEBUGCHANNELS ::myproject::debug::channels #endif -#include <libcw/debug.h> +#include <libcw/debug.h> namespace myproject { namespace debug { Index: src/libcwd/documentation/tutorial/tut5.in diff -u src/libcwd/documentation/tutorial/tut5.in:1.2 src/libcwd/documentation/tutorial/tut5.in:1.3 --- src/libcwd/documentation/tutorial/tut5.in:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/documentation/tutorial/tut5.in Thu Feb 14 15:32:13 2002 @@ -552,12 +552,12 @@ Debug( libcw_do.on() ); ForAllDebugChannels( if (!debugChannel.is_on()) debugChannel.on() ); - Debug( libcw_do.<SPAN class="highlight">set_margin</SPAN>("<-- margin -->") ); - Debug( libcw_do.<SPAN class="highlight">set_marker</SPAN>("<-- marker -->") ); + Debug( libcw_do.<SPAN class="highlight">set_margin</SPAN>("<-- margin -->") ); + Debug( libcw_do.<SPAN class="highlight">set_marker</SPAN>("<-- marker -->") ); Dout( dc::cat|dc::mouse, "The cat chases the mouse." ); Dout( dc::mouse|dc::elephant, "The mouse chases the elephant." ); Dout( dc::notice|<SPAN class="highlight">nolabel_cf</SPAN>, "Setting indentation to 8 spaces:" ); - Dout( dc::notice|<SPAN class="highlight">blank_label_cf</SPAN>, "<------>" ); + Dout( dc::notice|<SPAN class="highlight">blank_label_cf</SPAN>, "<------>" ); Debug( libcw_do.<SPAN class="highlight">set_indent(8)</SPAN> ); Dout( dc::cat, "The cat sleeps." ); Dout( dc::elephant, "The elephant looks around:" ); ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-15 05:19:44
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-15 05:19:42 UTC Modified files: libcwd/NEWS libcwd/acconfig.h libcwd/bfd.cc libcwd/configure.in libcwd/documentation/styles/Makefile libcwd/documentation/styles/defines.h libcwd/documentation/styles/main.css libcwd/documentation/tutorial/tut1.m4 libcwd/include/sys.ho.in Log message: Several bug fixes. ---------------------- diff included ---------------------- Index: src/libcwd/NEWS diff -u src/libcwd/NEWS:1.69 src/libcwd/NEWS:1.70 --- src/libcwd/NEWS:1.69 Thu Feb 14 10:43:23 2002 +++ src/libcwd/NEWS Thu Feb 14 21:19:31 2002 @@ -1,3 +1,22 @@ +libcwd-0.99.17 + + Bug fixes: + + Libcwd failed to find an executable in the current directory + when one of the command line parameters contained a '/'. + + The tutorial had several occurances of '<' where '<' should + have been used, with as result that parts of example code didn't + show up in a browser. + + `pthread_kill_other_threads_np' was not detected by ./configure. + + Due to a problem with how RedHat ships fonts, using mozilla, + italic helvetica looks horrible. The documentation now uses + plain 'sans-serif' instead which will use the default font + that is defined under preferences -> appearance -> fonts. + This should be set to -adobe-helvetica-*-. + libcwd-0.99.16 * libcwd is now thread-safe * Index: src/libcwd/acconfig.h diff -u src/libcwd/acconfig.h:1.11 src/libcwd/acconfig.h:1.12 --- src/libcwd/acconfig.h:1.11 Sun Feb 10 19:00:24 2002 +++ src/libcwd/acconfig.h Thu Feb 14 21:19:31 2002 @@ -22,6 +22,9 @@ // Defined when both -lpthread and pthread.h could be found. #undef LIBCWD_HAVE_PTHREAD +// This is needed when using threading, for example to get `pthread_kill_other_threads_np'. +#undef _GNU_SOURCE + // Defined when --enable-libcwd-threading is used. #undef LIBCWD_THREAD_SAFE @BOTTOM@ Index: src/libcwd/bfd.cc diff -u src/libcwd/bfd.cc:1.102 src/libcwd/bfd.cc:1.103 --- src/libcwd/bfd.cc:1.102 Thu Feb 14 10:43:23 2002 +++ src/libcwd/bfd.cc Thu Feb 14 21:19:31 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.102 2002/02/14 18:43:23 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.103 2002/02/15 05:19:31 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -782,15 +782,16 @@ DoutFatal(dc::fatal|error_cf, "Failed to execute \"" << ps_prog << "\""); } - //std::cerr << "argv0 = \"" << argv0 << '"' << std::endl; - if (argv0.find('/') != 0) + argv0 += '\0'; + // argv0 now contains a zero terminated string optionally followed by the command line + // arguments (which is why we can't use argv0.find('/') here), all seperated by the 0 character. + if (!strchr(argv0.data(), '/')) { _private_::ST_internal_string prog_name(argv0); _private_::ST_internal_string path_list(getenv("PATH")); _private_::ST_internal_string::size_type start_pos = 0, end_pos; _private_::ST_internal_string path; struct stat finfo; - prog_name += '\0'; for (;;) { end_pos = path_list.find(':', start_pos); Index: src/libcwd/configure.in diff -u src/libcwd/configure.in:1.103 src/libcwd/configure.in:1.104 --- src/libcwd/configure.in:1.103 Tue Feb 12 21:41:24 2002 +++ src/libcwd/configure.in Thu Feb 14 21:19:32 2002 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision: 1.103 $)dnl +AC_REVISION($Revision: 1.104 $)dnl dnl General intialization of `autoconf' varaibles. dnl Ensure that the directory specified with --srcdir was correct @@ -368,13 +368,6 @@ * include posix threads by itself and I can't find -lpthread. * Use --disable-libcwd-threading to compile a libcwd that is not thread safe. ])]) - AC_LANG_RESTORE - CW_CONFIG_THREAD_SAFE=define - SAVE_LIBS="$LIBS" - LIBS="$LIBS $LIB_THREADS" - AC_CHECK_FUNCS(pthread_kill_other_threads_np) - LIBS="$SAVE_LIBS" - if test "$ac_cv_search_pthread_create" = "none required"; then dnl Even if nothing is required, we still need to use -lpthread explicitly dnl while linking a shared library, otherwise the versioning info of @@ -382,6 +375,17 @@ dnl itself even!. AC_CHECK_LIB(pthread, pthread_create, [LIB_THREADS_SHARED=-lpthread]) fi + + AC_LANG_RESTORE + CW_CONFIG_THREAD_SAFE=define + + dnl pthread_kill_other_threads_np is a GNU extension, therefore we need to + dnl define _GNU_SOURCE. The extension also needs -lpthread to be available. + AC_DEFINE_UNQUOTED(_GNU_SOURCE, "1") + SAVE_LIBS="$LIBS" + LIBS="$LIBS $LIB_THREADS $LIB_THREADS_SHARED" + AC_CHECK_FUNCS(pthread_kill_other_threads_np) + LIBS="$SAVE_LIBS" fi dnl This test needs the full set of libraries we just determined. Index: src/libcwd/documentation/styles/Makefile diff -u src/libcwd/documentation/styles/Makefile:1.2 src/libcwd/documentation/styles/Makefile:1.3 --- src/libcwd/documentation/styles/Makefile:1.2 Sat Dec 29 20:17:48 2001 +++ src/libcwd/documentation/styles/Makefile Thu Feb 14 21:19:32 2002 @@ -4,15 +4,15 @@ all: $(OUTPUT) -%/main.css: main.css +%/main.css: main.css defines.h @MACRO=`echo $@ | sed -e 's%\([^/]*\)/.*%\1%' | tr a-z A-Z`; \ cat main.css | gcc -D$$MACRO -E -c - | egrep -v '^(#|$$)' > $@ -%/doxygen.css: doxygen.css +%/doxygen.css: doxygen.css defines.h @MACRO=`echo $@ | sed -e 's%\([^/]*\)/.*%\1%' | tr a-z A-Z`; \ cat doxygen.css | gcc -D$$MACRO -E -c - | egrep -v '^(#|$$)' > $@ -%/tutorial.css: tutorial.css +%/tutorial.css: tutorial.css defines.h @MACRO=`echo $@ | sed -e 's%\([^/]*\)/.*%\1%' | tr a-z A-Z`; \ cat tutorial.css | gcc -D$$MACRO -E -c - | egrep -v '^(#|$$)' > $@ Index: src/libcwd/documentation/styles/defines.h diff -u src/libcwd/documentation/styles/defines.h:1.2 src/libcwd/documentation/styles/defines.h:1.3 --- src/libcwd/documentation/styles/defines.h:1.2 Sat Dec 29 20:17:48 2001 +++ src/libcwd/documentation/styles/defines.h Thu Feb 14 21:19:32 2002 @@ -23,6 +23,13 @@ #endif #define NORMAL_FONT font-family: arial, sans-serif; font-size: NORMAL_SIZE; font-size-adjust: none +/* Don't use helvetica, it is broken on RedHat which has an alias "-alias-helvetica-medium-i-normal--*-iso8859-1" + * installed that is actually a horrible looking japanese font. See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=59911 */ +#ifndef IE +#define NORMAL_ITALICS_FONT font-family: sans-serif; font-size: NORMAL_SIZE; font-size-adjust: none +#else +#define NORMAL_ITALICS_FONT NORMAL_FONT +#endif #ifdef KONQUEROR #define HSIZE1 24pt Index: src/libcwd/documentation/styles/main.css diff -u src/libcwd/documentation/styles/main.css:1.2 src/libcwd/documentation/styles/main.css:1.3 --- src/libcwd/documentation/styles/main.css:1.2 Sat Dec 29 20:17:48 2001 +++ src/libcwd/documentation/styles/main.css Thu Feb 14 21:19:32 2002 @@ -216,3 +216,11 @@ font-size : NORMAL_SIZE; } +I { + NORMAL_ITALICS_FONT +} + +EM { + NORMAL_ITALICS_FONT +} + Index: src/libcwd/documentation/tutorial/tut1.m4 diff -u src/libcwd/documentation/tutorial/tut1.m4:1.5 src/libcwd/documentation/tutorial/tut1.m4:1.6 --- src/libcwd/documentation/tutorial/tut1.m4:1.5 Thu Feb 14 15:32:12 2002 +++ src/libcwd/documentation/tutorial/tut1.m4 Thu Feb 14 21:19:32 2002 @@ -13,14 +13,16 @@ <P>Compile as: <SPAN class="shell-command">g++ -g -DCWDEBUG hello_world.cc -lcwd -o hello_world</SPAN></P> <PRE> -#define _GNU_SOURCE // This must be defined before including <libcw/sysd.h> -#include <libcw/sysd.h> // This must be the first header file +// These two lines should actually be part of a custom "sys.h" file. See <A HREF="tut2.html">tutorial 2</A>. +#define _GNU_SOURCE // This must be defined before including <libcw/sysd.h> +#include <libcw/sysd.h> // This must be the first header file +// This line should actually be part of a custom "debug.h" file. See <A HREF="tut2.html">tutorial 2</A>. #include <libcw/debug.h> int main(void) { - Debug( dc::notice.on() ); // Turn on the NOTICE Debug Channel - Debug( libcw_do.on() ); // Turn on the default Debug Object + Debug( dc::notice.on() ); // Turn on the NOTICE Debug Channel. + Debug( libcw_do.on() ); // Turn on the default Debug Object. Dout( dc::notice, "Hello World" ); @@ -37,7 +39,7 @@ In order to make you explicitely aware of the fact that it is defined, libcwd does not define this macro itself (which it could do inside <libcw/sysd.h>), but forces you to define it when using libcwd. -Note you only really have to define it when you compiled libcwd with +Note that you only really have to define it when you compiled libcwd with threading support. If you do not define this macro and libcwd needs it, then you will get a compile error in <libcw/sysd.h> telling you so.</P> Index: src/libcwd/include/sys.ho.in diff -u src/libcwd/include/sys.ho.in:1.7 src/libcwd/include/sys.ho.in:1.8 --- src/libcwd/include/sys.ho.in:1.7 Tue Jan 8 15:04:59 2002 +++ src/libcwd/include/sys.ho.in Thu Feb 14 21:19:32 2002 @@ -1,5 +1,5 @@ // @configure_input@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.7 2002/01/08 23:04:59 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.8 2002/02/15 05:19:32 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -20,7 +20,7 @@ // // Use all GNU extensions. // -#ifndef _GNU_SOURCE +#if !defined(_GNU_SOURCE) && defined(LIBCWD_THREAD_SAFE) #define _GNU_SOURCE #endif ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-15 05:36:20
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-15 05:36:19 UTC Modified files: libcwd/INSTALL libcwd/acinclude.m4 libcwd/configure.in libcwd/debug.cc libcwd/documentation/doxygen.config Log message: Also use -O in maintainer mode. ---------------------- diff included ---------------------- Index: src/libcwd/INSTALL diff -u src/libcwd/INSTALL:1.24 src/libcwd/INSTALL:1.25 --- src/libcwd/INSTALL:1.24 Sat Feb 9 18:42:16 2002 +++ src/libcwd/INSTALL Thu Feb 14 21:36:09 2002 @@ -55,7 +55,7 @@ Don't delete those libraries if you have them though since existing binaries might need to link with them. -libcwd-0.99.16 was tested with gcc-2.95.x, gcc-2.96-98 (RedHat) +libcwd-0.99.17 was tested with gcc-2.95.x, gcc-2.96-98 (RedHat) and gcc-3.0.x. Packages needed to run the testsuite @@ -178,10 +178,10 @@ Finally, you can also build libcwd in a different directory than the source tree is in: -tar xzf libcwd-0.99.16.tar.gz +tar xzf libcwd-0.99.17.tar.gz mkdir libcwd-objdir cd libcwd-objdir -../libcwd-0.99.16/configure --prefix=/usr +../libcwd-0.99.17/configure --prefix=/usr make su make install Index: src/libcwd/acinclude.m4 diff -u src/libcwd/acinclude.m4:1.48 src/libcwd/acinclude.m4:1.49 --- src/libcwd/acinclude.m4:1.48 Fri Jan 18 21:08:54 2002 +++ src/libcwd/acinclude.m4 Thu Feb 14 21:36:09 2002 @@ -885,7 +885,7 @@ dnl Other options if test "$USE_MAINTAINER_MODE" = yes; then -EXTRAOPTS="" +EXTRAOPTS="-O" DEBUGOPTS="-ggdb3" else EXTRAOPTS="-O" Index: src/libcwd/configure.in diff -u src/libcwd/configure.in:1.104 src/libcwd/configure.in:1.105 --- src/libcwd/configure.in:1.104 Thu Feb 14 21:19:32 2002 +++ src/libcwd/configure.in Thu Feb 14 21:36:09 2002 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision: 1.104 $)dnl +AC_REVISION($Revision: 1.105 $)dnl dnl General intialization of `autoconf' varaibles. dnl Ensure that the directory specified with --srcdir was correct @@ -22,7 +22,7 @@ dnl INTERFACE_AGE : Increment if interfaces have been added; or set to 0 when interfaces have been removed. INTERFACE_VERSION=99 dnl 0.99 actually -INTERFACE_VERSION_REVISION=16 +INTERFACE_VERSION_REVISION=17 INTERFACE_AGE=99 dnl 0.99 actually VERSION_MAJOR=`expr $INTERFACE_VERSION - $INTERFACE_AGE` Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.69 src/libcwd/debug.cc:1.70 --- src/libcwd/debug.cc:1.69 Tue Feb 12 20:03:56 2002 +++ src/libcwd/debug.cc Thu Feb 14 21:36:09 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.69 2002/02/13 04:03:56 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.70 2002/02/15 05:36:09 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -685,13 +685,14 @@ // Try to get the lock, but don't try too long... int res; struct timespec const t = { 0, 5000000 }; - for(int count = 0; count < 40; ++count) + int count = 0; + do { - res = debug_object.M_mutex->trylock(); - if (res == 0) + if (!(res = debug_object.M_mutex->trylock())) break; nanosleep(&t, NULL); } + while(++count < 40); #endif target_os->put('\n'); #ifdef LIBCWD_THREAD_SAFE Index: src/libcwd/documentation/doxygen.config diff -u src/libcwd/documentation/doxygen.config:1.3 src/libcwd/documentation/doxygen.config:1.4 --- src/libcwd/documentation/doxygen.config:1.3 Sat Feb 9 18:42:16 2002 +++ src/libcwd/documentation/doxygen.config Thu Feb 14 21:36:09 2002 @@ -4,7 +4,7 @@ # General configuration options #--------------------------------------------------------------------------- PROJECT_NAME = libcwd -PROJECT_NUMBER = "libcwd 0.99.16" +PROJECT_NUMBER = "libcwd 0.99.17" OUTPUT_DIRECTORY = OUTPUT_LANGUAGE = English EXTRACT_ALL = NO ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-17 01:42:19
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-17 01:42:17 UTC Modified files: libcwd/NEWS libcwd/debug.cc libcwd/debugmalloc.cc libcwd/elf32.cc libcwd/include/sys.ho.in libcwd/include/libcw/class_debug.h libcwd/include/libcw/private_struct_TSD.h libcwd/testsuite/libcwd.tst/sys.h Log message: Fixed two theoretically possible dead locks. ---------------------- diff included ---------------------- Index: src/libcwd/NEWS diff -u src/libcwd/NEWS:1.70 src/libcwd/NEWS:1.71 --- src/libcwd/NEWS:1.70 Thu Feb 14 21:19:31 2002 +++ src/libcwd/NEWS Sat Feb 16 17:42:06 2002 @@ -17,6 +17,28 @@ that is defined under preferences -> appearance -> fonts. This should be set to -adobe-helvetica-*-. + Fixed a dead lock in object_file_ct::find_nearest_line(). + The dead lock occured when debug output written from + load_dwarf/load_stabs, which must be done with userspace + allocations, caused a recursive entry into this function. + + Fixed a dead lock in std::__default_allocator<true, 0>, the + default userspace allocator of the STL. The problem here + is that this lock is set when it calls malloc() to increase + its internal memory pool, causing a dead lock when memory + needs to be allocated during the writing of debug output + to dc::malloc or dc::bfd (this happens *extremely* seldom, + I even knew about this when I released 0.99.16). The solution + is to queue messages instead of writing them to the final + ostream when we find that the std::__default_allocator<true, 0> + is set and we are printing debug output from within malloc() + et al (then we assume we took the lock). The queued messages + are flushed the first time this condition is not true. The + queue is debug object specific which means that if you use + two or more different debug objects that write to the same + ostream, the ordering of messages could become non chronologic, + but then again - we could also put a man on Pluto next year. + libcwd-0.99.16 * libcwd is now thread-safe * Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.70 src/libcwd/debug.cc:1.71 --- src/libcwd/debug.cc:1.70 Thu Feb 14 21:36:09 2002 +++ src/libcwd/debug.cc Sat Feb 16 17:42:06 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.70 2002/02/15 05:36:09 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.71 2002/02/17 01:42:06 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -13,6 +13,14 @@ #include "sys.h" #include <libcw/debug_config.h> + +#if (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGMALLOC) +// This has to be very early (must not have been included elsewhere already). +#define private public // Ugly, I know. +#include <bits/stl_alloc.h> +#undef private +#endif // (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGMALLOC) + #include <errno.h> #include <iostream> #include <sys/time.h> // Needed for setrlimit() @@ -59,8 +67,42 @@ namespace libcw { namespace debug { +namespace _private_ { + +#if (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGMALLOC) +// The following tries to take the "node allocator" lock -- the lock of the +// default allocator for threaded applications. The parameter is the value to +// return when no lock exist. This should probably be implemented as a macro +// test instead. +__inline__ +bool allocator_trylock(void) +{ + if (!(__NODE_ALLOCATOR_THREADS)) return true; +#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) + if (!std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_init_flag) + std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_initialize(); +#endif + return (__gthread_mutex_trylock(&std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_lock) == 0); +} + +// The following unlocks the node allocator. +__inline__ +void allocator_unlock(void) +{ + if (!(__NODE_ALLOCATOR_THREADS)) return; +#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) + if (!std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_init_flag) + std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_initialize(); +#endif + __gthread_mutex_unlock(&std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_lock); +} +#endif // (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGMALLOC) + +} // namespace _private_ + using _private_::set_alloc_checking_on; using _private_::set_alloc_checking_off; + using _private_::debug_message_st; class buffer_ct : public _private_::internal_stringstream { private: @@ -71,24 +113,56 @@ #endif public: #ifdef LIBCWD_THREAD_SAFE - void writeto(std::ostream* os, _private_::lock_interface_base_ct* mutex LIBCWD_COMMA_TSD_PARAM) + void writeto(std::ostream* os, _private_::lock_interface_base_ct* mutex LIBCWD_COMMA_TSD_PARAM, debug_ct& +#ifdef DEBUGMALLOC + debug_object +#endif + ) #else - void writeto(std::ostream* os LIBCWD_COMMA_TSD_PARAM) + void writeto(std::ostream* os LIBCWD_COMMA_TSD_PARAM, debug_ct& +#ifdef DEBUGMALLOC + debug_object #endif + ) +#endif // LIBCWD_THREAD_SAFE { - char* buf; - bool used_malloc = false; - int curlen = rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out) - rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); - if (curlen > 512 || !(buf = (char*)__builtin_alloca(curlen))) +#if defined(DEBUGMALLOC) && defined(LIBCWD_THREAD_SAFE) + typedef debug_message_st* msgbuf_t; + msgbuf_t msgbuf; + // Queue the message when the default (STL) allocator is locked and it could be that we + // did that (because we got here via malloc or free). At least as important: if + // this is the last thread, just prior to exiting the application, and we CAN + // get the lock - then DON'T queue the message (and thus flush all possibly queued + // messages); this garantees that there will never messages be left in the queue + // when the application exits. + bool const queue_msg = __libcwd_tsd.inside_malloc_or_free && !_private_::allocator_trylock(); + if (__libcwd_tsd.inside_malloc_or_free && !queue_msg) + _private_::allocator_unlock(); // Always immedeately release the lock again. + int const extra_size = sizeof(debug_message_st) - sizeof(msgbuf->buf); +#else + typedef char* msgbuf_t; + msgbuf_t msgbuf; + bool const queue_msg = false; + int const extra_size = 0; +#endif + int curlen; + curlen = rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out) - rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); + bool free_msgbuf = false; + if (queue_msg) + msgbuf = (msgbuf_t)malloc(curlen + extra_size); + else if (curlen > 512 || !(msgbuf = (msgbuf_t)__builtin_alloca(curlen + extra_size))) { - set_alloc_checking_off(LIBCWD_TSD); - buf = (char*)malloc(curlen); - set_alloc_checking_on(LIBCWD_TSD); - used_malloc = true; + msgbuf = (msgbuf_t)malloc(curlen + extra_size); + free_msgbuf = true; } - rdbuf()->sgetn(buf, curlen); +#if defined(DEBUGMALLOC) && defined(LIBCWD_THREAD_SAFE) + rdbuf()->sgetn(msgbuf->buf, curlen); +#else + rdbuf()->sgetn(msgbuf, curlen); +#endif #ifdef DEBUGMALLOC // Writing to the final std::ostream (ie std::cerr) must be non-internal! + // LIBCWD_DISABLE_CANCEL/LIBCWD_ENABLE_CANCEL must be done non-internal too. int saved_internal = __libcwd_tsd.internal; __libcwd_tsd.internal = 0; ++__libcwd_tsd.library_call; @@ -97,40 +171,69 @@ #ifdef LIBCWD_THREAD_SAFE LIBCWD_DISABLE_CANCEL // We don't want Dout() to be a cancellation point. if (mutex) - { mutex->lock(); - os->write(buf, curlen); - mutex->unlock(); - } else if (_private_::WST_multi_threaded) { static bool WST_second_time = false; // Break infinite loop. - if (WST_second_time) - os->write(buf, curlen); - else + if (!WST_second_time) { WST_second_time = true; DoutFatal(dc::core, "When using multiple threads, you must provide a locking mechanism for the debug output stream. " "You can pass a pointer to a mutex with `debug_ct::set_ostream' (see documentation/html/group__group__destination.html)."); } } +#endif // !LIBCWD_THREAD_SAFE +#if defined(DEBUGMALLOC) && defined(LIBCWD_THREAD_SAFE) + if (queue_msg) // Inside a call to malloc and possibly owning lock of std::__default_alloc_template<true, 0>? + { + // We don't write debug output to the final ostream when inside malloc and std::__default_alloc_template<true, 0> is locked. + // It is namely possible that this will again try to acquire the lock in std::__default_alloc_template<true, 0>, resulting + // in a dead lock. Append it to the queue instead. + msgbuf->curlen = curlen; + msgbuf->prev = NULL; + msgbuf->next = debug_object.queue; + if (debug_object.queue) + debug_object.queue->prev = msgbuf; + else + debug_object.queue_top = msgbuf; + debug_object.queue = msgbuf; + } else - os->write(buf, curlen); + { + debug_message_st* message = debug_object.queue_top; + if (message) + { + // First empty the whole queue. + debug_message_st* next_message; + do + { + next_message = message->prev; + os->write(message->buf, message->curlen); + __libcwd_tsd.internal = 1; + free(message); + __libcwd_tsd.internal = 0; + } + while ((message = next_message)); + debug_object.queue_top = debug_object.queue = NULL; + } + // Then write the new message. + os->write(msgbuf->buf, curlen); + } +#else // !(defined(DEBUGMALLOC) && defined(LIBCWD_THREAD_SAFE)) + os->write(msgbuf, curlen); +#endif // !DEBUGMALLOC +#ifdef LIBCWD_THREAD_SAFE + if (mutex) + mutex->unlock(); LIBCWD_ENABLE_CANCEL -#else // !LIBCWD_THREAD_SAFE - os->write(buf, curlen); #endif // !LIBCWD_THREAD_SAFE #ifdef DEBUGMALLOC --LIBCWD_DO_TSD_MEMBER_OFF(libcw_do); --__libcwd_tsd.library_call; __libcwd_tsd.internal = saved_internal; #endif - if (used_malloc) - { - set_alloc_checking_off(LIBCWD_TSD); - free(buf); - set_alloc_checking_on(LIBCWD_TSD); - } + if (free_msgbuf) + free(msgbuf); } void store_position(void) { position = rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); @@ -735,7 +838,7 @@ current_oss->write("<unfinished>\n", 13); // Continued debug output should end on a space by itself, // And write out what is in the buffer till now. std::ostream* target_os = (channel_set.mask & cerr_cf) ? &std::cerr : debug_object.real_os; - static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD); + static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD, debug_object); // Truncate the buffer to its prefix and append "<continued>" to it already. static_cast<buffer_ct*>(current_oss)->restore_position(); current_oss->write("<continued> ", 12); // therefore we repeat the space here. @@ -831,7 +934,7 @@ if ((current->mask & flush_cf)) { // Write buffer to ostream. - static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD); + static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD, debug_object); // Flush ostream. Note that in the case of nested debug output this `os' can be an stringstream, // in that case, no actual flushing is done until the debug output to the real ostream has // finished. @@ -851,7 +954,7 @@ current_oss->put('\n'); // Write buffer to ostream. - static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD); + static_cast<buffer_ct*>(current_oss)->writeto(target_os LIBCWD_COMMA_MUTEX LIBCWD_COMMA_TSD, debug_object); // Handle control flags, if any: if (current->mask != 0) @@ -1066,44 +1169,14 @@ debug_tsd_st::~debug_tsd_st() { - if (!tsd_initialized) // Don't de-initialize when it wasn't initialized. + if (!tsd_initialized) // Skip when it wasn't initialized. return; // Sanity checks: if (continued_stack.size()) DoutFatal( dc::core|cerr_cf, "Destructing debug_tsd_st with a non-empty continued_stack (missing dc::finish?)" ); if (laf_stack.size()) DoutFatal( dc::core|cerr_cf, "Destructing debug_tsd_st with a non-empty laf_stack" ); - - LIBCWD_TSD_DECLARATION - set_alloc_checking_off(LIBCWD_TSD); - marker.ST_internal_deinit(); - margin.ST_internal_deinit(); - set_alloc_checking_on(LIBCWD_TSD); - tsd_initialized = false; - } - - /** - * \brief Destructor - */ - debug_ct::~debug_ct() - { - WNS_initialized = false; -#ifdef DEBUGDEBUG - init_magic = 0; -#endif - LIBCWD_TSD_DECLARATION - LIBCWD_DEFER_CANCEL - set_alloc_checking_off(LIBCWD_TSD); - DEBUG_OBJECTS_ACQUIRE_WRITE_LOCK - { - _private_::debug_objects_ct::container_type& objects(_private_::debug_objects.write_locked()); - objects.erase(find(objects.begin(), objects.end(), this)); - if (objects.empty()) - _private_::debug_objects.ST_uninit(); - } - DEBUG_OBJECTS_RELEASE_WRITE_LOCK - set_alloc_checking_on(LIBCWD_TSD); - LIBCWD_RESTORE_CANCEL + // Don't actually deinitialize anything. } /** @@ -1450,7 +1523,7 @@ LIBCWD_TSD_DECLARATION if (__libcwd_tsd.recursive_assert #ifdef DEBUGDEBUGMALLOC - || __libcwd_tsd.recursive + || __libcwd_tsd.inside_malloc_or_free #endif ) { Index: src/libcwd/debugmalloc.cc diff -u src/libcwd/debugmalloc.cc:1.82 src/libcwd/debugmalloc.cc:1.83 --- src/libcwd/debugmalloc.cc:1.82 Fri Feb 8 19:22:59 2002 +++ src/libcwd/debugmalloc.cc Sat Feb 16 17:42:06 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.82 2002/02/09 03:22:59 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.83 2002/02/17 01:42:06 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -122,12 +122,6 @@ #define DEBUGMALLOC_INTERNAL #include "sys.h" #include <libcw/debug_config.h> -#if defined(LIBCWD_THREAD_SAFE) && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) -// This has to be very early (must not have been included elsewhere already). -#define private public // Ugly, I know. -#include <bits/stl_alloc.h> -#undef private -#endif // __GNUC__ >= 3 && LIBCWD_THREAD_SAFE #if defined(DEBUGMALLOC) || defined(LIBCW_DOXYGEN) @@ -222,37 +216,6 @@ namespace _private_ { -#if __GNUC__ >= 3 || __GNUC_MINOR__ >= 97 -#ifdef LIBCWD_THREAD_SAFE -// The following tries to take the "node allocator" lock -- the lock of the -// default allocator for threaded applications. The parameter is the value to -// return when no lock exist. This should probably be implemented as a macro -// test instead. -bool allocator_trylock(bool when_no_threads) -{ - if (!(__NODE_ALLOCATOR_THREADS)) return when_no_threads; - -#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) - if (!std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_init_flag) - std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_initialize(); -#endif - return (__gthread_mutex_trylock(&std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_lock) == 0); -} - -// The following unlocks the node allocator. -void allocator_unlock(void) -{ - if (!(__NODE_ALLOCATOR_THREADS)) return; - -#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION) - if (!std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_init_flag) - std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_initialize(); -#endif - __gthread_mutex_unlock(&std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_lock); -} -#endif // LIBCWD_THREAD_SAFE -#endif // __GNUC__ >= 3 - void no_alloc_print_int_to(std::ostream* os, unsigned long val, bool hexadecimal) { char buf[32]; // 32 > x where x is the number of digits of the largest unsigned long. @@ -1297,12 +1260,11 @@ { #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #endif #if defined(DEBUGDEBUGMALLOC) && defined(__GLIBCPP__) && !defined(DEBUGMALLOCEXTERNALCLINKAGE) LIBCWD_ASSERT( _private_::WST_ios_base_initialized || __libcwd_tsd.internal ); @@ -1325,12 +1287,7 @@ #endif // DEBUGDEBUGMALLOC #ifdef DEBUGMAGICMALLOC if (!ptr) - { -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif return; - } ptr = static_cast<size_t*>(ptr) - 2; if (from == from_delete) { @@ -1357,22 +1314,18 @@ ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_TWELVE(((size_t*)ptr)[1])))[-1] ^= (size_t)-1; #endif // DEBUGMAGICMALLOC __libc_free(ptr); -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif return; } // internal + ++__libcwd_tsd.inside_malloc_or_free; if (!ptr) { -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif #if defined(DEBUGDEBUGMALLOC) && defined(DEBUGDEBUGOUTPUT) DoutInternal( dc_malloc, "Trying to free NULL - ignored [" << ++__libcwd_tsd.marker << "]." ); #else DoutInternal( dc_malloc, "Trying to free NULL - ignored." ); #endif + --__libcwd_tsd.inside_malloc_or_free; return; } @@ -1502,9 +1455,7 @@ if (visible) DoutInternal( dc::finish, "" ); } -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; } void init_debugmalloc(void) @@ -1527,16 +1478,13 @@ #endif // __GLIBCPP__ ) { - WST_initialization_state = 1; // ST_initialize_globals() calls malloc again of course. -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; // Allow that. -#endif + WST_initialization_state = 1; // ST_initialize_globals() calls malloc again of course. + int recursive_store = __libcwd_tsd.inside_malloc_or_free; + __libcwd_tsd.inside_malloc_or_free = 0; // Allow that (this call to malloc will not have done from STL allocator). libcw::debug::ST_initialize_globals(); // This doesn't belong in the malloc department at all, but malloc() happens // to be a function that is called _very_ early - and hence this is a good moment // to initialize ALL of libcwd. -#ifdef DEBUGDEBUGMALLOC - ++__libcwd_tsd.recursive; -#endif + __libcwd_tsd.inside_malloc_or_free = recursive_store; } } } @@ -1645,7 +1593,7 @@ #ifdef DEBUGDEBUGMALLOC { LIBCWD_TSD_DECLARATION - LIBCWD_ASSERT( !__libcwd_tsd.recursive && !__libcwd_tsd.internal ); + LIBCWD_ASSERT( !__libcwd_tsd.inside_malloc_or_free && !__libcwd_tsd.internal ); } #endif @@ -1805,7 +1753,7 @@ { #ifdef DEBUGDEBUGMALLOC LIBCWD_TSD_DECLARATION - LIBCWD_ASSERT( !__libcwd_tsd.recursive && !__libcwd_tsd.internal ); + LIBCWD_ASSERT( !__libcwd_tsd.inside_malloc_or_free && !__libcwd_tsd.internal ); #endif Dout( dc_malloc, "New libcw::debug::marker_ct at " << this ); bool error = false; @@ -1837,7 +1785,7 @@ { #ifdef DEBUGDEBUGMALLOC LIBCWD_TSD_DECLARATION - LIBCWD_ASSERT( !__libcwd_tsd.recursive && !__libcwd_tsd.internal ); + LIBCWD_ASSERT( !__libcwd_tsd.inside_malloc_or_free && !__libcwd_tsd.internal ); #endif LIBCWD_DEFER_CANCEL_NO_BRACE @@ -1882,7 +1830,7 @@ { #ifdef DEBUGDEBUGMALLOC LIBCWD_TSD_DECLARATION - LIBCWD_ASSERT( !__libcwd_tsd.recursive && !__libcwd_tsd.internal ); + LIBCWD_ASSERT( !__libcwd_tsd.inside_malloc_or_free && !__libcwd_tsd.internal ); #endif LIBCWD_DEFER_CANCEL_NO_BRACE @@ -1980,7 +1928,7 @@ { #ifdef DEBUGDEBUGMALLOC LIBCWD_TSD_DECLARATION - LIBCWD_ASSERT( !__libcwd_tsd.recursive && !__libcwd_tsd.internal ); + LIBCWD_ASSERT( !__libcwd_tsd.inside_malloc_or_free && !__libcwd_tsd.internal ); #endif alloc_ct const* res; @@ -2096,10 +2044,9 @@ // void register_external_allocation(void const* mptr, size_t size) { -#ifdef DEBUGDEBUGMALLOC LIBCWD_TSD_DECLARATION - LIBCWD_ASSERT( !__libcwd_tsd.recursive && !__libcwd_tsd.internal ); - ++__libcwd_tsd.recursive; +#ifdef DEBUGDEBUGMALLOC + LIBCWD_ASSERT( !__libcwd_tsd.inside_malloc_or_free && !__libcwd_tsd.internal ); #endif #if defined(DEBUGDEBUGMALLOC) && defined(__GLIBCPP__) LIBCWD_ASSERT( _private_::WST_ios_base_initialized ); @@ -2108,7 +2055,7 @@ DoutFatalInternal( dc::core, "Calling register_external_allocation while `internal' is non-zero! " "You can't use RegisterExternalAlloc() inside a Dout() et. al. " "(or whenever alloc_checking is off)." ); - + ++__libcwd_tsd.inside_malloc_or_free; DoutInternal( dc_malloc, "register_external_allocation(" << (void*)mptr << ", " << size << ')' ); if (WST_initialization_state == 0) // Only true once. @@ -2150,10 +2097,7 @@ #ifdef DEBUGUSEBFD memblk_info.get_alloc_node()->location_reference().move(loc); #endif - -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; } #endif // !DEBUGMALLOCEXTERNALCLINKAGE @@ -2190,21 +2134,14 @@ void* __libcwd_malloc(size_t size) { -#if (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGDEBUG) - bool locked = false; - if (_private_::WST_multi_threaded) - locked = _private_::allocator_trylock(true); // Fake a std::string (etc) lock. -#endif - LIBCWD_TSD_DECLARATION #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - FATALDEBUGDEBUG_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + FATALDEBUGDEBUG_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #ifdef DEBUGDEBUGOUTPUT int saved_marker = ++__libcwd_tsd.marker; #endif @@ -2217,49 +2154,34 @@ DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Entering `__libcwd_malloc(" << size << ")' [" << saved_marker << ']' ); #if !defined(DEBUGDEBUGMALLOC) && !defined(DEBUGMAGICMALLOC) - UNLOCK return __libc_malloc(size); #else // defined(DEBUGDEBUGMALLOC) || defined(DEBUGMAGICMALLOC) #ifndef DEBUGMAGICMALLOC void* ptr = __libc_malloc(size); -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `__libcwd_malloc': " << ptr << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC - UNLOCK return ptr; #else // DEBUGMAGICMALLOC void* ptr = __libc_malloc(SIZE_PLUS_TWELVE(size)); if (!ptr) - { -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif - UNLOCK return NULL; - } ((size_t*)ptr)[0] = INTERNAL_MAGIC_MALLOC_BEGIN; ((size_t*)ptr)[1] = size; ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_TWELVE(size)))[-1] = INTERNAL_MAGIC_MALLOC_END; -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `__libcwd_malloc': " << static_cast<size_t*>(ptr) + 2 << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC - UNLOCK return static_cast<size_t*>(ptr) + 2; #endif // DEBUGMAGICMALLOC #endif // defined(DEBUGDEBUGMALLOC) || defined(DEBUGMAGICMALLOC) } // internal + ++__libcwd_tsd.inside_malloc_or_free; #if defined(DEBUGDEBUGMALLOC) && defined(DEBUGDEBUGOUTPUT) DoutInternal( dc_malloc|continued_cf, "malloc(" << size << ") = [" << saved_marker << ']' ); #else DoutInternal( dc_malloc|continued_cf, "malloc(" << size << ") = " ); #endif void* ptr = internal_malloc(size, memblk_type_malloc CALL_ADDRESS LIBCWD_COMMA_TSD SAVEDMARKER); - #ifdef DEBUGMAGICMALLOC if (ptr) { @@ -2268,11 +2190,7 @@ ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_FOUR(size)))[-1] = MAGIC_MALLOC_END; } #endif - -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif - UNLOCK + --__libcwd_tsd.inside_malloc_or_free; return ptr; } @@ -2281,12 +2199,11 @@ LIBCWD_TSD_DECLARATION #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #ifdef DEBUGDEBUGOUTPUT int saved_marker = ++__libcwd_tsd.marker; #endif @@ -2304,34 +2221,24 @@ #ifndef DEBUGMAGICMALLOC void* ptr = __libc_calloc(nmemb, size); -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `__libcwd_calloc': " << ptr << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif return ptr; #else // DEBUGMAGICMALLOC void* ptr = __libc_malloc(SIZE_PLUS_TWELVE(nmemb * size)); if (!ptr) - { -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif return NULL; - } memset(static_cast<void*>(static_cast<size_t*>(ptr) + 2), 0, nmemb * size); ((size_t*)ptr)[0] = INTERNAL_MAGIC_MALLOC_BEGIN; ((size_t*)ptr)[1] = nmemb * size; ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_TWELVE(nmemb * size)))[-1] = INTERNAL_MAGIC_MALLOC_END; -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `__libcwd_calloc': " << static_cast<size_t*>(ptr) + 2 << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return static_cast<size_t*>(ptr) + 2; #endif // DEBUGMAGICMALLOC #endif // defined(DEBUGDEBUGMALLOC) || defined(DEBUGMAGICMALLOC) } // internal + ++__libcwd_tsd.inside_malloc_or_free; #if defined(DEBUGDEBUGMALLOC) && defined(DEBUGDEBUGOUTPUT) DoutInternal( dc_malloc|continued_cf, "calloc(" << nmemb << ", " << size << ") = [" << saved_marker << ']' ); #else @@ -2341,7 +2248,6 @@ size *= nmemb; if ((ptr = internal_malloc(size, memblk_type_malloc CALL_ADDRESS LIBCWD_COMMA_TSD SAVEDMARKER))) memset(ptr, 0, size); - #ifdef DEBUGMAGICMALLOC if (ptr) { @@ -2350,10 +2256,7 @@ ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_FOUR(size)))[-1] = MAGIC_MALLOC_END; } #endif - -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; return ptr; } @@ -2369,12 +2272,11 @@ LIBCWD_TSD_DECLARATION #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #ifdef DEBUGDEBUGOUTPUT int saved_marker = ++__libcwd_tsd.marker; #endif @@ -2392,10 +2294,7 @@ #ifndef DEBUGMAGICMALLOC void* ptr1 = __libc_realloc(ptr, size); -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `__libcwd_realloc': " << ptr1 << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return ptr1; #else // DEBUGMAGICMALLOC void* ptr1; @@ -2408,10 +2307,7 @@ if (size == 0) { __libc_free(ptr); -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `__libcwd_realloc': NULL [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return NULL; } ptr1 = __libc_realloc(ptr, SIZE_PLUS_TWELVE(size)); @@ -2421,16 +2317,14 @@ ((size_t*)ptr1)[0] = INTERNAL_MAGIC_MALLOC_BEGIN; ((size_t*)ptr1)[1] = size; ((size_t*)(static_cast<char*>(ptr1) + SIZE_PLUS_TWELVE(size)))[-1] = INTERNAL_MAGIC_MALLOC_END; -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `__libcwd_realloc': " << static_cast<size_t*>(ptr1) + 2 << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return static_cast<size_t*>(ptr1) + 2; #endif // DEBUGMAGICMALLOC #endif // defined(DEBUGDEBUGMALLOC) || defined(DEBUGMAGICMALLOC) } // internal + ++__libcwd_tsd.inside_malloc_or_free; #if defined(DEBUGDEBUGMALLOC) && defined(DEBUGDEBUGOUTPUT) DoutInternal( dc_malloc|continued_cf, "realloc(" << ptr << ", " << size << ") = [" << saved_marker << ']' ); #else @@ -2449,10 +2343,7 @@ ((size_t*)(static_cast<char*>(mptr) + SIZE_PLUS_FOUR(size)))[-1] = MAGIC_MALLOC_END; } #endif - -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; return mptr; } @@ -2493,15 +2384,15 @@ // again set a lock and again try to find the ptr in the memblk_map. // It might print "free" instead of "realloc", but the program is ill-formed // anyway in this case. -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; internal_free(ptr, from_free LIBCWD_COMMA_TSD); + ++__libcwd_tsd.inside_malloc_or_free; #if defined(DEBUGDEBUGMALLOC) && defined(DEBUGDEBUGOUTPUT) DoutInternal( dc::finish, "NULL [" << saved_marker << ']' ); #else DoutInternal( dc::finish, "NULL" ); #endif + --__libcwd_tsd.inside_malloc_or_free; return NULL; } @@ -2537,9 +2428,7 @@ DoutInternal( dc::finish, "NULL" ); #endif DoutInternal( dc_malloc, "Out of memory! This is only a pre-detection!" ); -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; return NULL; // A fatal error should occur directly after this } #ifdef DEBUGMAGICMALLOC @@ -2579,9 +2468,7 @@ #else DoutInternal( dc::finish, (void*)(mptr) ); #endif -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; return mptr; } @@ -2597,12 +2484,11 @@ LIBCWD_TSD_DECLARATION #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #ifdef DEBUGDEBUGOUTPUT int saved_marker = ++__libcwd_tsd.marker; #endif @@ -2619,10 +2505,7 @@ void* ptr = __libc_malloc(size); if (!ptr) DoutFatalInternal( dc::core, "Out of memory in `operator new'" ); -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `operator new': " << ptr << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return ptr; #else // DEBUGMAGICMALLOC void* ptr = __libc_malloc(SIZE_PLUS_TWELVE(size)); @@ -2631,16 +2514,14 @@ ((size_t*)ptr)[0] = INTERNAL_MAGIC_NEW_BEGIN; ((size_t*)ptr)[1] = size; ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_TWELVE(size)))[-1] = INTERNAL_MAGIC_NEW_END; -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `operator new': " << static_cast<size_t*>(ptr) + 2 << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return static_cast<size_t*>(ptr) + 2; #endif // DEBUGMAGICMALLOC #endif // defined(DEBUGDEBUGMALLOC) || defined(DEBUGMAGICMALLOC) } // internal + ++__libcwd_tsd.inside_malloc_or_free; #if defined(DEBUGDEBUGMALLOC) && defined(DEBUGDEBUGOUTPUT) DoutInternal( dc_malloc|continued_cf, "operator new (size = " << size << ") = [" << saved_marker << ']' ); #else @@ -2657,9 +2538,7 @@ ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_FOUR(size)))[-1] = MAGIC_NEW_END; } #endif -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; return ptr; } @@ -2668,12 +2547,11 @@ LIBCWD_TSD_DECLARATION #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #ifdef DEBUGDEBUGOUTPUT int saved_marker = ++__libcwd_tsd.marker; #endif @@ -2690,10 +2568,7 @@ void* ptr = __libc_malloc(size); if (!ptr) DoutFatalInternal( dc::core, "Out of memory in `operator new[]'" ); -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `operator new[]': " << ptr << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return ptr; #else // DEBUGMAGICMALLOC void* ptr = __libc_malloc(SIZE_PLUS_TWELVE(size)); @@ -2702,16 +2577,14 @@ ((size_t*)ptr)[0] = INTERNAL_MAGIC_NEW_ARRAY_BEGIN; ((size_t*)ptr)[1] = size; ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_TWELVE(size)))[-1] = INTERNAL_MAGIC_NEW_ARRAY_END; -#ifdef DEBUGDEBUGMALLOC DEBUGDEBUGMALLOC_CERR( "DEBUGDEBUGMALLOC: Internal: Leaving `operator new[]': " << static_cast<size_t*>(ptr) + 2 << " [" << saved_marker << ']' ); - --__libcwd_tsd.recursive; -#endif // DEBUGDEBUGMALLOC return static_cast<size_t*>(ptr) + 2; #endif // DEBUGMAGICMALLOC #endif // defined(DEBUGDEBUGMALLOC) || defined(DEBUGMAGICMALLOC) } // internal + ++__libcwd_tsd.inside_malloc_or_free; #if defined(DEBUGDEBUGMALLOC) && defined(DEBUGDEBUGOUTPUT) DoutInternal( dc_malloc|continued_cf, "operator new[] (size = " << size << ") = [" << saved_marker << ']' ); #else @@ -2728,9 +2601,7 @@ ((size_t*)(static_cast<char*>(ptr) + SIZE_PLUS_FOUR(size)))[-1] = MAGIC_NEW_ARRAY_END; } #endif -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif + --__libcwd_tsd.inside_malloc_or_free; return ptr; } @@ -2744,19 +2615,15 @@ LIBCWD_TSD_DECLARATION #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #endif #if defined(DEBUGDEBUGMALLOC) && defined(__GLIBCPP__) && !defined(DEBUGMALLOCEXTERNALCLINKAGE) LIBCWD_ASSERT( _private_::WST_ios_base_initialized || __libcwd_tsd.internal ); #endif -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif internal_free(ptr, from_delete LIBCWD_COMMA_TSD); } @@ -2765,22 +2632,18 @@ LIBCWD_TSD_DECLARATION #ifdef DEBUGDEBUGMALLOC // We can't use `assert' here, because that can call malloc. - if (__libcwd_tsd.recursive > __libcwd_tsd.library_call && !__libcwd_tsd.internal) + if (__libcwd_tsd.inside_malloc_or_free > __libcwd_tsd.library_call && !__libcwd_tsd.internal) { - DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.recursive <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); + DEBUGDEBUGMALLOC_CERR("DEBUGDEBUGMALLOC: debugmalloc.cc:" << __LINE__ - 2 << ": " << __PRETTY_FUNCTION__ << ": Assertion `__libcwd_tsd.inside_malloc_or_free <= __libcwd_tsd.library_call || __libcwd_tsd.internal' failed."); core_dump(); } - ++__libcwd_tsd.recursive; #endif #if defined(DEBUGDEBUGMALLOC) && defined(__GLIBCPP__) && !defined(DEBUGMALLOCEXTERNALCLINKAGE) LIBCWD_ASSERT( _private_::WST_ios_base_initialized || __libcwd_tsd.internal ); #endif -#ifdef DEBUGDEBUGMALLOC - --__libcwd_tsd.recursive; -#endif internal_free(ptr, from_delete_array LIBCWD_COMMA_TSD); // Note that the standard demands that we call free(), and not delete(). - // This forces everyone to overload both, operator delete() and operator delete[]() - // and not only operator delete(). + // This forces everyone to overload both, operator delete() and operator + // delete[]() and not only operator delete(). } #endif /* DEBUGMALLOC */ Index: src/libcwd/elf32.cc diff -u src/libcwd/elf32.cc:1.36 src/libcwd/elf32.cc:1.37 --- src/libcwd/elf32.cc:1.36 Sat Feb 2 20:15:11 2002 +++ src/libcwd/elf32.cc Sat Feb 16 17:42:06 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.36 2002/02/03 04:15:11 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.37 2002/02/17 01:42:06 libcw Exp $ // // Copyright (C) 2001, by // @@ -798,7 +798,11 @@ object_files_string_set_ct M_source_files; object_files_range_location_map_ct M_ranges; bool M_debug_info_loaded; +#ifndef LIBCWD_THREAD_SAFE bool M_inside_find_nearest_line; +#else + static pthread_t S_thread_inside_find_nearest_line; +#endif Elf32_Word M_stabs_section_index; Elf32_Word M_dwarf_debug_info_section_index; Elf32_Word M_dwarf_debug_abbrev_section_index; @@ -827,6 +831,10 @@ uint32_t elf_hash(unsigned char const* name, unsigned char delim) const; }; +#ifdef LIBCWD_THREAD_SAFE +pthread_t object_file_ct::S_thread_inside_find_nearest_line; +#endif + //------------------------------------------------------------------------------------------------------------------------------------------- void location_ct::M_store(void) @@ -1868,13 +1876,11 @@ void object_file_ct::find_nearest_line(asymbol_st const* symbol, Elf32_Addr offset, char const** file, char const** func, unsigned int* line) { - if (!M_debug_info_loaded) + while (!M_debug_info_loaded) // So we can use 'break'. { -#ifdef LIBCWD_THREAD_SAFE - // `object_files_string' and the STL containers using `_private_::object_files_allocator' in the - // following functions need this lock. - _private_::rwlock_tct<_private_::object_files_instance>::wrlock(); -#endif + // The call to load_dwarf()/load_stabs() below can call malloc, causing us to recursively enter this function + // for this object or another object_file_ct. +#ifndef LIBCWD_THREAD_SAFE if (M_inside_find_nearest_line) // Break loop caused by re-entry through a call to malloc. { *file = NULL; @@ -1883,6 +1889,29 @@ return; } M_inside_find_nearest_line = true; +#else + // `S_thread_inside_find_nearest_line' is only *changed* inside the critical area + // of `object_files_instance'. Therefore, when it is set to our thread id at + // this moment - then other threads can't change it. + if (pthread_equal(S_thread_inside_find_nearest_line, pthread_self())) + { + // This thread set the lock. Don't try to acquire it again... + *file = NULL; + *func = symbol->name; + *line = 0; + return; + } + // Ok, now we are sure that THIS thread doesn't hold the following lock, try to acquire it. + // `object_files_string' and the STL containers using `_private_::object_files_allocator' in the following functions need this lock. + _private_::rwlock_tct<_private_::object_files_instance>::wrlock(); + // Now we acquired the lock, check again if another thread not already read the debug info. + if (M_debug_info_loaded) + { + _private_::rwlock_tct<_private_::object_files_instance>::wrunlock(); + break; + } + S_thread_inside_find_nearest_line = pthread_self(); +#endif #if DEBUGSTABS || DEBUGDWARF libcw::debug::debug_ct::OnOffState state; Debug( libcw_do.force_on(state) ); @@ -1897,11 +1926,14 @@ Debug( dc::bfd.restore(state2) ); Debug( libcw_do.restore(state) ); #endif +#ifndef LIBCWD_THREAD_SAFE M_inside_find_nearest_line = false; -#ifdef LIBCWD_THREAD_SAFE +#else + S_thread_inside_find_nearest_line = (pthread_t) 0; _private_::rwlock_tct<_private_::object_files_instance>::wrunlock(); #endif M_input_stream.close(); + break; } range_st range; range.start = offset; @@ -1991,7 +2023,9 @@ if (DEBUGELF32) Debug( libcw_do.inc_indent(4) ); M_debug_info_loaded = false; +#ifndef LIBCWD_THREAD_SAFE M_inside_find_nearest_line = false; +#endif M_stabs_section_index = 0; M_dwarf_debug_line_section_index = 0; for(int i = 0; i < M_header.e_shnum; ++i) Index: src/libcwd/include/libcw/class_debug.h diff -u src/libcwd/include/libcw/class_debug.h:1.11 src/libcwd/include/libcw/class_debug.h:1.12 --- src/libcwd/include/libcw/class_debug.h:1.11 Tue Feb 12 19:55:26 2002 +++ src/libcwd/include/libcw/class_debug.h Sat Feb 16 17:42:07 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.11 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.12 2002/02/17 01:42:07 libcw Exp $ // // Copyright (C) 2000 - 2002, by // @@ -41,6 +41,19 @@ namespace libcw { namespace debug { +#ifdef DEBUGMALLOC +namespace _private_ { + +struct debug_message_st { + struct debug_message_st* next; + struct debug_message_st* prev; + int curlen; + char buf[sizeof(int)]; +}; + +} +#endif + //=================================================================================================== // class debug_ct // @@ -110,6 +123,14 @@ bool interactive; // Set true if the last or current debug output is to cerr +#ifdef DEBUGMALLOC +public: + _private_::debug_message_st* queue; + _private_::debug_message_st* queue_top; + // Queue of messages written inside malloc/realloc/calloc/free/new/delete. + // Locked by mutex provided through set_ostream. +#endif + public: /** \addtogroup group_formatting */ /** \{ */ @@ -189,7 +210,6 @@ // debug_ct(void); - ~debug_ct(); private: void private_set_ostream(std::ostream* os); Index: src/libcwd/include/libcw/private_struct_TSD.h diff -u src/libcwd/include/libcw/private_struct_TSD.h:1.7 src/libcwd/include/libcw/private_struct_TSD.h:1.8 --- src/libcwd/include/libcw/private_struct_TSD.h:1.7 Sat Feb 9 21:41:58 2002 +++ src/libcwd/include/libcw/private_struct_TSD.h Sat Feb 16 17:42:07 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_struct_TSD.h,v 1.7 2002/02/10 05:41:58 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_struct_TSD.h,v 1.8 2002/02/17 01:42:07 libcw Exp $ // // Copyright (C) 2001, by // @@ -136,9 +136,9 @@ #ifdef DEBUGMALLOC int internal; int library_call; + int inside_malloc_or_free; // Set when entering a (de)allocation routine non-internal. #ifdef DEBUGDEBUGMALLOC int marker; - int recursive; // Used for sanity double checks in debugmalloc.cc. #endif #endif // DEBUGMALLOC bool recursive_fatal; // Detect loop involving dc::fatal or dc::core. Index: src/libcwd/include/sys.ho.in diff -u src/libcwd/include/sys.ho.in:1.8 src/libcwd/include/sys.ho.in:1.9 --- src/libcwd/include/sys.ho.in:1.8 Thu Feb 14 21:19:32 2002 +++ src/libcwd/include/sys.ho.in Sat Feb 16 17:42:07 2002 @@ -1,5 +1,5 @@ // @configure_input@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.8 2002/02/15 05:19:32 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.9 2002/02/17 01:42:07 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -15,6 +15,7 @@ #ifndef SYS_H #define SYS_H +#undef _GNU_SOURCE // Could be defined by g++ itself and redefined in ../config.h #include "../config.h" // Index: src/libcwd/testsuite/libcwd.tst/sys.h diff -u src/libcwd/testsuite/libcwd.tst/sys.h:1.4 src/libcwd/testsuite/libcwd.tst/sys.h:1.5 --- src/libcwd/testsuite/libcwd.tst/sys.h:1.4 Thu Feb 7 20:03:47 2002 +++ src/libcwd/testsuite/libcwd.tst/sys.h Sat Feb 16 17:42:07 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/sys.h,v 1.4 2002/02/08 04:03:47 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/sys.h,v 1.5 2002/02/17 01:42:07 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -19,6 +19,7 @@ #endif #include <libcw/sysd.h> +#undef _GNU_SOURCE #include "../../config.h" #ifdef HAVE__G_CONFIG_H #include <_G_config.h> ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-17 15:01:02
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-17 15:01:00 UTC Modified files: libcwd/documentation/styles/defines.h libcwd/documentation/styles/doxygen.css libcwd/documentation/styles/main.css Log message: Correct fix for helvetica italics. ---------------------- diff included ---------------------- Index: src/libcwd/documentation/styles/defines.h diff -u src/libcwd/documentation/styles/defines.h:1.3 src/libcwd/documentation/styles/defines.h:1.4 --- src/libcwd/documentation/styles/defines.h:1.3 Thu Feb 14 21:19:32 2002 +++ src/libcwd/documentation/styles/defines.h Sun Feb 17 07:00:49 2002 @@ -26,9 +26,9 @@ /* Don't use helvetica, it is broken on RedHat which has an alias "-alias-helvetica-medium-i-normal--*-iso8859-1" * installed that is actually a horrible looking japanese font. See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=59911 */ #ifndef IE -#define NORMAL_ITALICS_FONT font-family: sans-serif; font-size: NORMAL_SIZE; font-size-adjust: none +#define ITALICS font-family: sans-serif; font-style: italic; #else -#define NORMAL_ITALICS_FONT NORMAL_FONT +#define ITALICS font-style: italic; #endif #ifdef KONQUEROR Index: src/libcwd/documentation/styles/doxygen.css diff -u src/libcwd/documentation/styles/doxygen.css:1.3 src/libcwd/documentation/styles/doxygen.css:1.4 --- src/libcwd/documentation/styles/doxygen.css:1.3 Sun Jan 20 08:25:11 2002 +++ src/libcwd/documentation/styles/doxygen.css Sun Feb 17 07:00:49 2002 @@ -85,7 +85,7 @@ DIV.groupText { margin-left : 16px; - font-style : italic; + ITALICS font-size : smaller; } Index: src/libcwd/documentation/styles/main.css diff -u src/libcwd/documentation/styles/main.css:1.3 src/libcwd/documentation/styles/main.css:1.4 --- src/libcwd/documentation/styles/main.css:1.3 Thu Feb 14 21:19:32 2002 +++ src/libcwd/documentation/styles/main.css Sun Feb 17 07:00:49 2002 @@ -199,7 +199,7 @@ } .para { - font-style : italic; + ITALICS } .command-line-parameter { @@ -208,7 +208,7 @@ .command-line-variable { font-weight : normal; - font-style : italic; + ITALICS } .shell-command { @@ -217,10 +217,10 @@ } I { - NORMAL_ITALICS_FONT + ITALICS } EM { - NORMAL_ITALICS_FONT + ITALICS } ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-17 15:30:27
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-17 15:30:25 UTC Modified files: libcwd/documentation/doxygen-examples/markers.cc libcwd/documentation/tutorial/channel.cc libcwd/documentation/tutorial/faq.m4 libcwd/documentation/tutorial/hello_world.cc libcwd/documentation/tutorial/log_file.cc libcwd/documentation/tutorial/tut1.m4 libcwd/documentation/tutorial/tut2.m4 libcwd/documentation/tutorial/tut3.m4 libcwd/documentation/tutorial/tut5.in libcwd/documentation/tutorial/tut6.m4 Log message: Fixes for _GNU_SOURCE. Put even more stress on using custom debug.h and sys.h in the tutorial. ---------------------- diff included ---------------------- Index: src/libcwd/documentation/doxygen-examples/markers.cc diff -u src/libcwd/documentation/doxygen-examples/markers.cc:1.3 src/libcwd/documentation/doxygen-examples/markers.cc:1.4 --- src/libcwd/documentation/doxygen-examples/markers.cc:1.3 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/doxygen-examples/markers.cc Sun Feb 17 07:30:14 2002 @@ -1,4 +1,6 @@ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <libcw/sysd.h> #include <libcw/debug.h> Index: src/libcwd/documentation/tutorial/channel.cc diff -u src/libcwd/documentation/tutorial/channel.cc:1.3 src/libcwd/documentation/tutorial/channel.cc:1.4 --- src/libcwd/documentation/tutorial/channel.cc:1.3 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/tutorial/channel.cc Sun Feb 17 07:30:15 2002 @@ -2,16 +2,23 @@ // Please see the "example-project" in the source distribution of libcwd // for a better Real Life example. +//------------------------------------------------------------------------------- +// This block should really be part of custom header files! Please ignore it +// and read documentation/html/preparation.html#preparation_step2 instead. +// "sys.h": +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <libcw/sysd.h> #define DEBUGCHANNELS ::example // Where we'll put our namespace dc +// "debug.h": #include <libcw/debug.h> - namespace example { // namespace dc cannot be put in :: namespace dc { libcw::debug::channel_ct ghost("GHOST"); // Create our own Debug Channel } } +//------------------------------------------------------------------------------- int main(void) { Index: src/libcwd/documentation/tutorial/faq.m4 diff -u src/libcwd/documentation/tutorial/faq.m4:1.5 src/libcwd/documentation/tutorial/faq.m4:1.6 --- src/libcwd/documentation/tutorial/faq.m4:1.5 Thu Feb 14 15:32:12 2002 +++ src/libcwd/documentation/tutorial/faq.m4 Sun Feb 17 07:30:15 2002 @@ -24,9 +24,11 @@ what could possibly be wrong with your code. Once the application works, you don't have to define _GNU_SOURCE because you won't be including the debug code anymore, nor link with -libcwd. Of course, when you are not sure whether or not new code -that you added is a GNU extension or not, you should try to compile it -with CWDEBUG undefined.</P> +libcwd. If you need to write 100% ANSI code and you are not sure +whether or not new code that you added is an extension or not, you +should try to compile it with CWDEBUG undefined <EM>and</EM> using -ansi as +command line option to g++; without -ansi g++-3.0.3 and higher define +_GNU_SOURCE itself by default.</P> <A name="sysd.h"></A> <H3>2. Why do I have to include "libcw/sysd.h" as first header file?</H3> Index: src/libcwd/documentation/tutorial/hello_world.cc diff -u src/libcwd/documentation/tutorial/hello_world.cc:1.3 src/libcwd/documentation/tutorial/hello_world.cc:1.4 --- src/libcwd/documentation/tutorial/hello_world.cc:1.3 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/tutorial/hello_world.cc Sun Feb 17 07:30:15 2002 @@ -1,6 +1,14 @@ +//------------------------------------------------------------------------------- +// This block should really be part of custom header files! Please ignore it +// and read documentation/html/preparation.html#preparation_step2 instead. +// "sys.h": +#ifndef _GNU_SOURCE // g++ 3.0.3 and higher already define this. #define _GNU_SOURCE -#include <libcw/sysd.h> // This must be the first header file +#endif +#include <libcw/sysd.h> // This must be the first header file +// "debug.h" #include <libcw/debug.h> +//------------------------------------------------------------------------------- int main(void) { Index: src/libcwd/documentation/tutorial/log_file.cc diff -u src/libcwd/documentation/tutorial/log_file.cc:1.3 src/libcwd/documentation/tutorial/log_file.cc:1.4 --- src/libcwd/documentation/tutorial/log_file.cc:1.3 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/tutorial/log_file.cc Sun Feb 17 07:30:15 2002 @@ -1,7 +1,15 @@ +//------------------------------------------------------------------------------- +// This block should really be part of custom header files! Please ignore it +// and read documentation/html/preparation.html#preparation_step2 instead. +// "sys.h": +#ifndef _GNU_SOURCE // g++ 3.0.3 and higher already define this. #define _GNU_SOURCE -#include <libcw/sysd.h> -#include <fstream> +#endif +#include <libcw/sysd.h> // This must be the first header file +// "debug.h" #include <libcw/debug.h> +//------------------------------------------------------------------------------- +#include <fstream> int main(void) { Index: src/libcwd/documentation/tutorial/tut1.m4 diff -u src/libcwd/documentation/tutorial/tut1.m4:1.6 src/libcwd/documentation/tutorial/tut1.m4:1.7 --- src/libcwd/documentation/tutorial/tut1.m4:1.6 Thu Feb 14 21:19:32 2002 +++ src/libcwd/documentation/tutorial/tut1.m4 Sun Feb 17 07:30:15 2002 @@ -13,8 +13,10 @@ <P>Compile as: <SPAN class="shell-command">g++ -g -DCWDEBUG hello_world.cc -lcwd -o hello_world</SPAN></P> <PRE> -// These two lines should actually be part of a custom "sys.h" file. See <A HREF="tut2.html">tutorial 2</A>. +// These four lines should actually be part of a custom "sys.h" file. See <A HREF="tut2.html">tutorial 2</A>. +#ifndef _GNU_SOURCE // Already defined by g++ 3.0.3 and higher. #define _GNU_SOURCE // This must be defined before including <libcw/sysd.h> +#endif #include <libcw/sysd.h> // This must be the first header file // This line should actually be part of a custom "debug.h" file. See <A HREF="tut2.html">tutorial 2</A>. #include <libcw/debug.h> @@ -42,7 +44,10 @@ Note that you only really have to define it when you compiled libcwd with threading support. If you do not define this macro and libcwd needs it, then you will get -a compile error in <libcw/sysd.h> telling you so.</P> +a compile error in <libcw/sysd.h> telling you so. +GNU gcc 3.0.3 (and higher) already defines this macro by itself, so there is +no need to include it if you intend to only compile your application with +this version.</P> <DIV class="faq-frame"><H4>FAQ</H4><UL class="faq"> <LI><A HREF="faq.html#GNU_SOURCE">Won't this define make my code non-portable?</A></LI> Index: src/libcwd/documentation/tutorial/tut2.m4 diff -u src/libcwd/documentation/tutorial/tut2.m4:1.4 src/libcwd/documentation/tutorial/tut2.m4:1.5 --- src/libcwd/documentation/tutorial/tut2.m4:1.4 Thu Feb 14 15:32:12 2002 +++ src/libcwd/documentation/tutorial/tut2.m4 Sun Feb 17 07:30:15 2002 @@ -16,11 +16,12 @@ #ifdef HAVE_CONFIG_H // This is just an example of what you could do #include "config.h" // when using autoconf for your project. #endif -#ifdef CWDEBUG // This is needed so that others can compile -#ifndef _GNU_SOURCE -#define _GNU_SOURCE +#ifdef CWDEBUG // This is needed so that others can compile + // your application without having libcwd installed. +#ifndef _GNU_SOURCE // Already defined by g++ 3.0.3 and higher. +#define _GNU_SOURCE // Needed for libpthread extensions. #endif -#include <libcw/sysd.h> // your application without having libcwd installed. +#include <libcw/sysd.h> #endif </PRE> <P>Create a file <CODE>"debug.h"</CODE> that is part of your application and put in it:</P> @@ -78,13 +79,10 @@ #include "sys.h" #include "debug.h" -// Include this to make life easier. -using namespace libcw::debug; - // Actual definition of `ghost' namespace debug_channels { namespace dc { - channel_ct <SPAN class="highlight">ghost</SPAN>("GHOST"); + libcw::debug::channel_ct <SPAN class="highlight">ghost</SPAN>("GHOST"); } } Index: src/libcwd/documentation/tutorial/tut3.m4 diff -u src/libcwd/documentation/tutorial/tut3.m4:1.3 src/libcwd/documentation/tutorial/tut3.m4:1.4 --- src/libcwd/documentation/tutorial/tut3.m4:1.3 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/tutorial/tut3.m4 Sun Feb 17 07:30:15 2002 @@ -13,10 +13,9 @@ <P>Compile as: <CODE>g++ -DCWDEBUG log_file.cc -lcwd -o log_file</CODE></P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> +#include "sys.h" // See tutorial 2. #include <fstream> -#include <libcw/debug.h> +#include "debug.h" // See tutorial 2. int main(void) { Index: src/libcwd/documentation/tutorial/tut5.in diff -u src/libcwd/documentation/tutorial/tut5.in:1.3 src/libcwd/documentation/tutorial/tut5.in:1.4 --- src/libcwd/documentation/tutorial/tut5.in:1.3 Thu Feb 14 15:32:13 2002 +++ src/libcwd/documentation/tutorial/tut5.in Sun Feb 17 07:30:15 2002 @@ -30,8 +30,8 @@ <P class="download">[<A HREF="examples5/test5.1.1.cc">download</A>]</P> <PRE> <!-- START CODE examples5/test5.1.1.cc --> -#include "sys.h" // See tutorial 2 -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2 +#include "debug.h" int main(void) { Index: src/libcwd/documentation/tutorial/tut6.m4 diff -u src/libcwd/documentation/tutorial/tut6.m4:1.3 src/libcwd/documentation/tutorial/tut6.m4:1.4 --- src/libcwd/documentation/tutorial/tut6.m4:1.3 Thu Feb 7 20:03:47 2002 +++ src/libcwd/documentation/tutorial/tut6.m4 Sun Feb 17 07:30:15 2002 @@ -59,9 +59,8 @@ <P>Compile as: <CODE>g++ -DCWDEBUG amo.cc -lcwd -o amo</CODE></P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2. +#include "debug.h" int main(void) { @@ -85,9 +84,8 @@ <P>Now let us actually allocate some memory:</P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2. +#include "debug.h" int main(void) { @@ -117,9 +115,8 @@ In order to find out what is wrong, we <EM>also turn on debug channel</EM><CODE> dc::bfd</CODE>:</P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2. +#include "debug.h" int main(void) { @@ -183,9 +180,8 @@ your program is doing:</P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2. +#include "debug.h" int main(void) { @@ -219,9 +215,8 @@ <P>Consider the following code:</P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2. +#include "debug.h" int main(void) { @@ -259,9 +254,8 @@ <CODE>AllocTag_dynamic_description()</CODE>, which <EM>will</EM> work.</P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2. +#include "debug.h" int main(void) { @@ -305,9 +299,8 @@ <CODE>AllocTag1(p)</CODE>:</P> <PRE> -#define _GNU_SOURCE -#include <libcw/sysd.h> -#include <libcw/debug.h> +#include "sys.h" // See tutorial 2. +#include "debug.h" int main(void) { ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-17 16:37:46
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-17 16:37:43 UTC Modified files: libcwd/acconfig.h libcwd/acinclude.m4 libcwd/debug.cc libcwd/elf32.cc libcwd/documentation/tutorial/faq.m4 libcwd/documentation/tutorial/hello_world.cc libcwd/documentation/tutorial/log_file.cc libcwd/documentation/tutorial/tut1.m4 libcwd/documentation/tutorial/tut2.m4 libcwd/include/sys.ho.in libcwd/testsuite/libcwd.tst/sys.h Log message: More _GNU_SOURCE fixes... Only bother about queuing messages for gcc 3.0 and higher. ---------------------- diff included ---------------------- Index: src/libcwd/acconfig.h diff -u src/libcwd/acconfig.h:1.12 src/libcwd/acconfig.h:1.13 --- src/libcwd/acconfig.h:1.12 Thu Feb 14 21:19:31 2002 +++ src/libcwd/acconfig.h Sun Feb 17 08:37:32 2002 @@ -22,8 +22,10 @@ // Defined when both -lpthread and pthread.h could be found. #undef LIBCWD_HAVE_PTHREAD +#if __GNUC__ < 3 // This is needed when using threading, for example to get `pthread_kill_other_threads_np'. #undef _GNU_SOURCE +#endif // Defined when --enable-libcwd-threading is used. #undef LIBCWD_THREAD_SAFE Index: src/libcwd/acinclude.m4 diff -u src/libcwd/acinclude.m4:1.49 src/libcwd/acinclude.m4:1.50 --- src/libcwd/acinclude.m4:1.49 Thu Feb 14 21:36:09 2002 +++ src/libcwd/acinclude.m4 Sun Feb 17 08:37:32 2002 @@ -886,7 +886,6 @@ dnl Other options if test "$USE_MAINTAINER_MODE" = yes; then EXTRAOPTS="-O" -DEBUGOPTS="-ggdb3" else EXTRAOPTS="-O" fi Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.71 src/libcwd/debug.cc:1.72 --- src/libcwd/debug.cc:1.71 Sat Feb 16 17:42:06 2002 +++ src/libcwd/debug.cc Sun Feb 17 08:37:33 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.71 2002/02/17 01:42:06 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.72 2002/02/17 16:37:33 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -126,7 +126,7 @@ ) #endif // LIBCWD_THREAD_SAFE { -#if defined(DEBUGMALLOC) && defined(LIBCWD_THREAD_SAFE) +#if (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGMALLOC) typedef debug_message_st* msgbuf_t; msgbuf_t msgbuf; // Queue the message when the default (STL) allocator is locked and it could be that we @@ -155,7 +155,7 @@ msgbuf = (msgbuf_t)malloc(curlen + extra_size); free_msgbuf = true; } -#if defined(DEBUGMALLOC) && defined(LIBCWD_THREAD_SAFE) +#if (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGMALLOC) rdbuf()->sgetn(msgbuf->buf, curlen); #else rdbuf()->sgetn(msgbuf, curlen); @@ -183,7 +183,7 @@ } } #endif // !LIBCWD_THREAD_SAFE -#if defined(DEBUGMALLOC) && defined(LIBCWD_THREAD_SAFE) +#if (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97) && defined(LIBCWD_THREAD_SAFE) && defined(DEBUGMALLOC) if (queue_msg) // Inside a call to malloc and possibly owning lock of std::__default_alloc_template<true, 0>? { // We don't write debug output to the final ostream when inside malloc and std::__default_alloc_template<true, 0> is locked. Index: src/libcwd/documentation/tutorial/faq.m4 diff -u src/libcwd/documentation/tutorial/faq.m4:1.6 src/libcwd/documentation/tutorial/faq.m4:1.7 --- src/libcwd/documentation/tutorial/faq.m4:1.6 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/faq.m4 Sun Feb 17 08:37:33 2002 @@ -27,7 +27,7 @@ libcwd. If you need to write 100% ANSI code and you are not sure whether or not new code that you added is an extension or not, you should try to compile it with CWDEBUG undefined <EM>and</EM> using -ansi as -command line option to g++; without -ansi g++-3.0.3 and higher define +command line option to g++; without -ansi g++-3.0 and higher defines _GNU_SOURCE itself by default.</P> <A name="sysd.h"></A> Index: src/libcwd/documentation/tutorial/hello_world.cc diff -u src/libcwd/documentation/tutorial/hello_world.cc:1.4 src/libcwd/documentation/tutorial/hello_world.cc:1.5 --- src/libcwd/documentation/tutorial/hello_world.cc:1.4 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/hello_world.cc Sun Feb 17 08:37:33 2002 @@ -2,7 +2,7 @@ // This block should really be part of custom header files! Please ignore it // and read documentation/html/preparation.html#preparation_step2 instead. // "sys.h": -#ifndef _GNU_SOURCE // g++ 3.0.3 and higher already define this. +#ifndef _GNU_SOURCE // g++ 3.0 and higher already defines this. #define _GNU_SOURCE #endif #include <libcw/sysd.h> // This must be the first header file Index: src/libcwd/documentation/tutorial/log_file.cc diff -u src/libcwd/documentation/tutorial/log_file.cc:1.4 src/libcwd/documentation/tutorial/log_file.cc:1.5 --- src/libcwd/documentation/tutorial/log_file.cc:1.4 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/log_file.cc Sun Feb 17 08:37:33 2002 @@ -2,7 +2,7 @@ // This block should really be part of custom header files! Please ignore it // and read documentation/html/preparation.html#preparation_step2 instead. // "sys.h": -#ifndef _GNU_SOURCE // g++ 3.0.3 and higher already define this. +#ifndef _GNU_SOURCE // g++ 3.0 and higher already defines this. #define _GNU_SOURCE #endif #include <libcw/sysd.h> // This must be the first header file Index: src/libcwd/documentation/tutorial/tut1.m4 diff -u src/libcwd/documentation/tutorial/tut1.m4:1.7 src/libcwd/documentation/tutorial/tut1.m4:1.8 --- src/libcwd/documentation/tutorial/tut1.m4:1.7 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/tut1.m4 Sun Feb 17 08:37:33 2002 @@ -14,7 +14,7 @@ <PRE> // These four lines should actually be part of a custom "sys.h" file. See <A HREF="tut2.html">tutorial 2</A>. -#ifndef _GNU_SOURCE // Already defined by g++ 3.0.3 and higher. +#ifndef _GNU_SOURCE // Already defined by g++ 3.0 and higher. #define _GNU_SOURCE // This must be defined before including <libcw/sysd.h> #endif #include <libcw/sysd.h> // This must be the first header file @@ -45,7 +45,7 @@ threading support. If you do not define this macro and libcwd needs it, then you will get a compile error in <libcw/sysd.h> telling you so. -GNU gcc 3.0.3 (and higher) already defines this macro by itself, so there is +GNU gcc 3.0 (and higher) already defines this macro by itself, so there is no need to include it if you intend to only compile your application with this version.</P> Index: src/libcwd/documentation/tutorial/tut2.m4 diff -u src/libcwd/documentation/tutorial/tut2.m4:1.5 src/libcwd/documentation/tutorial/tut2.m4:1.6 --- src/libcwd/documentation/tutorial/tut2.m4:1.5 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/tut2.m4 Sun Feb 17 08:37:33 2002 @@ -18,7 +18,7 @@ #endif #ifdef CWDEBUG // This is needed so that others can compile // your application without having libcwd installed. -#ifndef _GNU_SOURCE // Already defined by g++ 3.0.3 and higher. +#ifndef _GNU_SOURCE // Already defined by g++ 3.0 and higher. #define _GNU_SOURCE // Needed for libpthread extensions. #endif #include <libcw/sysd.h> Index: src/libcwd/elf32.cc diff -u src/libcwd/elf32.cc:1.37 src/libcwd/elf32.cc:1.38 --- src/libcwd/elf32.cc:1.37 Sat Feb 16 17:42:06 2002 +++ src/libcwd/elf32.cc Sun Feb 17 08:37:33 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.37 2002/02/17 01:42:06 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.38 2002/02/17 16:37:33 libcw Exp $ // // Copyright (C) 2001, by // @@ -1125,6 +1125,10 @@ void object_file_ct::load_dwarf(void) { +#if __GNUC__ == 2 && __GNUC_MINOR__ == 96 + Dout(dc::warning, "gcc/g++ 2.96 has broken DWARF2 debug information. Source file / Line number lookups will fail frequently. " + "Use either g++ 2.95.x, 3.x or -gstabs."); +#endif uint32_t total_length; if (DEBUGDWARF) { @@ -1663,7 +1667,14 @@ } } } +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#ifdef DEBUGDEBUG // Play safe. + // g++ bug work around. + LIBCWD_ASSERT( debug_line_ptr == debug_line_ptr_end || debug_line_ptr == debug_line_ptr_end + 1 ); +#endif +#else LIBCWD_ASSERT( debug_line_ptr == debug_line_ptr_end ); +#endif // End state machine code. // ===========================================================================================================================17" Index: src/libcwd/include/sys.ho.in diff -u src/libcwd/include/sys.ho.in:1.9 src/libcwd/include/sys.ho.in:1.10 --- src/libcwd/include/sys.ho.in:1.9 Sat Feb 16 17:42:07 2002 +++ src/libcwd/include/sys.ho.in Sun Feb 17 08:37:33 2002 @@ -1,7 +1,7 @@ // @configure_input@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.9 2002/02/17 01:42:07 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.10 2002/02/17 16:37:33 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt @@ -15,7 +15,6 @@ #ifndef SYS_H #define SYS_H -#undef _GNU_SOURCE // Could be defined by g++ itself and redefined in ../config.h #include "../config.h" // Index: src/libcwd/testsuite/libcwd.tst/sys.h diff -u src/libcwd/testsuite/libcwd.tst/sys.h:1.5 src/libcwd/testsuite/libcwd.tst/sys.h:1.6 --- src/libcwd/testsuite/libcwd.tst/sys.h:1.5 Sat Feb 16 17:42:07 2002 +++ src/libcwd/testsuite/libcwd.tst/sys.h Sun Feb 17 08:37:33 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/sys.h,v 1.5 2002/02/17 01:42:07 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/sys.h,v 1.6 2002/02/17 16:37:33 libcw Exp $ // // Copyright (C) 2000 - 2001, by // @@ -14,13 +14,13 @@ #ifndef TESTSUITE_SYS_H #define TESTSUITE_SYS_H +#include "../../config.h" + #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <libcw/sysd.h> -#undef _GNU_SOURCE -#include "../../config.h" #ifdef HAVE__G_CONFIG_H #include <_G_config.h> #ifndef _G_CLOG_CONFLICT ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 00:44:17
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 00:44:16 UTC Modified files: libcwd/documentation/styles/main.css libcwd/documentation/tutorial/channel.cc libcwd/documentation/tutorial/faq.m4 libcwd/documentation/tutorial/log_file.cc libcwd/documentation/tutorial/tut1.m4 libcwd/documentation/tutorial/tut2.m4 libcwd/documentation/tutorial/tut3.m4 libcwd/documentation/tutorial/tut4.m4 libcwd/documentation/tutorial/tut5.in libcwd/documentation/tutorial/tut6.m4 Log message: Misc tutorial fixes after rereading it. ---------------------- diff included ---------------------- Index: src/libcwd/documentation/styles/main.css diff -u src/libcwd/documentation/styles/main.css:1.4 src/libcwd/documentation/styles/main.css:1.5 --- src/libcwd/documentation/styles/main.css:1.4 Sun Feb 17 07:00:49 2002 +++ src/libcwd/documentation/styles/main.css Sun Feb 17 16:44:05 2002 @@ -212,7 +212,7 @@ } .shell-command { - font-family : ludica; + font-family : fixed, monospace; font-size : NORMAL_SIZE; } Index: src/libcwd/documentation/tutorial/channel.cc diff -u src/libcwd/documentation/tutorial/channel.cc:1.4 src/libcwd/documentation/tutorial/channel.cc:1.5 --- src/libcwd/documentation/tutorial/channel.cc:1.4 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/channel.cc Sun Feb 17 16:44:06 2002 @@ -13,12 +13,13 @@ #define DEBUGCHANNELS ::example // Where we'll put our namespace dc // "debug.h": #include <libcw/debug.h> +//------------------------------------------------------------------------------- + namespace example { // namespace dc cannot be put in :: namespace dc { libcw::debug::channel_ct ghost("GHOST"); // Create our own Debug Channel } } -//------------------------------------------------------------------------------- int main(void) { @@ -26,7 +27,7 @@ Debug( libcw_do.on() ); // the debug Channel and Object on! for (int i = 0; i < 4; ++i) - Dout( dc::ghost, "i = " << i ); // We can write more than just + Dout(dc::ghost, "i = " << i); // We can write more than just // "Hello World" to the ostream :) return 0; } Index: src/libcwd/documentation/tutorial/faq.m4 diff -u src/libcwd/documentation/tutorial/faq.m4:1.7 src/libcwd/documentation/tutorial/faq.m4:1.8 --- src/libcwd/documentation/tutorial/faq.m4:1.7 Sun Feb 17 08:37:33 2002 +++ src/libcwd/documentation/tutorial/faq.m4 Sun Feb 17 16:44:06 2002 @@ -24,11 +24,10 @@ what could possibly be wrong with your code. Once the application works, you don't have to define _GNU_SOURCE because you won't be including the debug code anymore, nor link with -libcwd. If you need to write 100% ANSI code and you are not sure -whether or not new code that you added is an extension or not, you -should try to compile it with CWDEBUG undefined <EM>and</EM> using -ansi as -command line option to g++; without -ansi g++-3.0 and higher defines -_GNU_SOURCE itself by default.</P> +libcwd. +Note that GNU g++ 3.x already defines this macro currently itself as a hack +to get the libstdc++ headers work properly, hence the test with <CODE>#ifndef</CODE> +is always needed (see <A HREF="http://gcc.gnu.org/ml/gcc/2002-02/msg00996.html">http://gcc.gnu.org/ml/gcc/2002-02/msg00996.html</A>).</P> <A name="sysd.h"></A> <H3>2. Why do I have to include "libcw/sysd.h" as first header file?</H3> @@ -82,7 +81,7 @@ <H3>5. What is defined <EM>exactly</EM> in <SPAN class="H3code">libcw/debug.h</SPAN>?</H3> <P>Everything. -Go and read the <A HREF="../html/reference.html>Reference Manual</A> to get <EM>all</EM> gory details if you dare.</P> +Go and read the <A HREF="../html/reference.html">Reference Manual</A> to get <EM>all</EM> gory details if you dare.</P> <A name="macros"></A> <H3>6. Why are you using macros for <SPAN class="H3code">Debug</SPAN> and <SPAN class="H3code">Dout</SPAN>?</H3> Index: src/libcwd/documentation/tutorial/log_file.cc diff -u src/libcwd/documentation/tutorial/log_file.cc:1.5 src/libcwd/documentation/tutorial/log_file.cc:1.6 --- src/libcwd/documentation/tutorial/log_file.cc:1.5 Sun Feb 17 08:37:33 2002 +++ src/libcwd/documentation/tutorial/log_file.cc Sun Feb 17 16:44:06 2002 @@ -9,6 +9,7 @@ // "debug.h" #include <libcw/debug.h> //------------------------------------------------------------------------------- + #include <fstream> int main(void) @@ -24,7 +25,7 @@ // Set the ostream related with libcw_do to `file': Debug( libcw_do.set_ostream(&file) ); - Dout( dc::notice, "Hippopotamus are heavy" ); + Dout(dc::notice, "Hippopotamus are heavy"); return 0; } Index: src/libcwd/documentation/tutorial/tut1.m4 diff -u src/libcwd/documentation/tutorial/tut1.m4:1.8 src/libcwd/documentation/tutorial/tut1.m4:1.9 --- src/libcwd/documentation/tutorial/tut1.m4:1.8 Sun Feb 17 08:37:33 2002 +++ src/libcwd/documentation/tutorial/tut1.m4 Sun Feb 17 16:44:06 2002 @@ -26,7 +26,7 @@ Debug( dc::notice.on() ); // Turn on the NOTICE Debug Channel. Debug( libcw_do.on() ); // Turn on the default Debug Object. - Dout( dc::notice, "Hello World" ); + Dout(dc::notice, "Hello World"); return 0; } @@ -44,10 +44,7 @@ Note that you only really have to define it when you compiled libcwd with threading support. If you do not define this macro and libcwd needs it, then you will get -a compile error in <libcw/sysd.h> telling you so. -GNU gcc 3.0 (and higher) already defines this macro by itself, so there is -no need to include it if you intend to only compile your application with -this version.</P> +a compile error in <libcw/sysd.h> telling you so.</P> <DIV class="faq-frame"><H4>FAQ</H4><UL class="faq"> <LI><A HREF="faq.html#GNU_SOURCE">Won't this define make my code non-portable?</A></LI> @@ -81,8 +78,8 @@ <A NAME="turn_on_channel"></A> <H3></CODE>Debug( dc::notice.on() );</CODE></H3> -<P>This turns on the <I><U>D</U>ebug <U>C</U>hannel</I> <CODE> <U>dc</U>::notice</CODE>. -Without this line, the code <CODE>Dout( dc::notice, "Hello World" )</CODE> would output +<P>This turns on the <I><U>D</U>ebug <U>C</U>hannel</I> <CODE><U>dc</U>::notice</CODE>. +Without this line, the code <CODE>Dout(dc::notice, "Hello World")</CODE> would output nothing: all <I>Debug Channels</I> are <EM>off</EM> by default, at start up.</P> <DIV class="faq-frame"><H4>FAQ</H4><UL class="faq"> @@ -95,7 +92,7 @@ <H3><CODE>Debug( libcw_do.on() );</CODE></H3> <P>This turns on the <I><U>D</U>ebug <U>O</U>bject</I> <CODE>libcw_<U>do</U></CODE>. -Without this line, the code <CODE>Dout( dc::notice, "Hello World" )</CODE> would output +Without this line, the code <CODE>Dout(dc::notice, "Hello World")</CODE> would output nothing: all <I>Debug Objects</I> are <EM>off</EM> by default, at start up.</P> <P>A <I>Debug Object</I> is related to exactly one <CODE>ostream</CODE>. @@ -114,7 +111,7 @@ <LI><A HREF="faq.html#Object">Why do you call it a Debug <EM>Object</EM>? What <EM>is</EM> a Debug Object?</A></LI> </UL></DIV> -<H3><CODE>Dout( dc::notice, "Hello World" );</CODE></H3> +<H3><CODE>Dout(dc::notice, "Hello World");</CODE></H3> <P>This outputs "Hello World" to the <CODE>ostream</CODE> currently related to <CODE>libcw_do</CODE> provided that the <I>Debug Channel</I> Index: src/libcwd/documentation/tutorial/tut2.m4 diff -u src/libcwd/documentation/tutorial/tut2.m4:1.6 src/libcwd/documentation/tutorial/tut2.m4:1.7 --- src/libcwd/documentation/tutorial/tut2.m4:1.6 Sun Feb 17 08:37:33 2002 +++ src/libcwd/documentation/tutorial/tut2.m4 Sun Feb 17 16:44:06 2002 @@ -9,8 +9,6 @@ In the example below we create a debug channel <CODE>dc::ghost</CODE> that will use the string "<SPAN class="output">GHOST</SPAN>" as label.</P> -<P class="download">[<A HREF="channel.cc">download</A>]</P> - <P>Create a file <CODE>"sys.h"</CODE> that is part of your application and put in it:</P> <PRE> #ifdef HAVE_CONFIG_H // This is just an example of what you could do @@ -75,6 +73,7 @@ #endif // DEBUG_H </PRE> <P>Finally write the program:</P> +<P class="download">[<A HREF="channel.cc">download</A>]</P> <PRE> #include "sys.h" #include "debug.h" @@ -92,8 +91,8 @@ Debug( libcw_do.on() ); // the debug Channel and Object on! for (int i = 0; i < 4; ++i) - Dout( <SPAN class="highlight">dc::ghost</SPAN>, "i = " << i ); // We can write more than just - // "Hello World" to the ostream :) + Dout(<SPAN class="highlight">dc::ghost</SPAN>, "i = " << i); // We can write more than just + // "Hello World" to the ostream :) return 0; } </PRE> Index: src/libcwd/documentation/tutorial/tut3.m4 diff -u src/libcwd/documentation/tutorial/tut3.m4:1.4 src/libcwd/documentation/tutorial/tut3.m4:1.5 --- src/libcwd/documentation/tutorial/tut3.m4:1.4 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/tut3.m4 Sun Feb 17 16:44:06 2002 @@ -30,7 +30,7 @@ // Set the ostream related with libcw_do to `file': <SPAN class="highlight">Debug( libcw_do.set_ostream(&file) );</SPAN> - Dout( dc::notice, "Hippopotamus are heavy" ); + Dout(dc::notice, "Hippopotamus are heavy"); return 0; } Index: src/libcwd/documentation/tutorial/tut4.m4 diff -u src/libcwd/documentation/tutorial/tut4.m4:1.2 src/libcwd/documentation/tutorial/tut4.m4:1.3 --- src/libcwd/documentation/tutorial/tut4.m4:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/documentation/tutorial/tut4.m4 Sun Feb 17 16:44:06 2002 @@ -21,8 +21,9 @@ <P>Because the final application doesn't need libcwd, we can afford to use features of g++ and third party libraries that developers are able to install but that would be impractical as demand for the end-user of the application. The <EM>developer</EM> that uses libcwd will have to use -g++ as compiler and install libraries like libbfd and libiberty, but gets a lot of developing -advantages in return.</P> +g++ as compiler and perhaps use a linux box for the development of the application, but gets a lot +of developing advantages in return. Afterwards it is relatively easy to port the bug-free +code to other platforms/compilers.</P> <P>As a developer you need to know two things:</P> <OL TYPE="1"> Index: src/libcwd/documentation/tutorial/tut5.in diff -u src/libcwd/documentation/tutorial/tut5.in:1.4 src/libcwd/documentation/tutorial/tut5.in:1.5 --- src/libcwd/documentation/tutorial/tut5.in:1.4 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/tut5.in Sun Feb 17 16:44:06 2002 @@ -66,7 +66,7 @@ The debug channels of libcw are put in namespace <CODE>libcw::debug::channels</CODE>. Nevertheless, it is not necessary to type</P> -<PRE>Dout( libcw::debug::channels::dc::notice, "Hello World" );</PRE> +<PRE>Dout(libcw::debug::channels::dc::notice, "Hello World");</PRE> <P>By default, the macro <CODE>Dout</CODE> et al. automatically include a<CODE> using namespace libcw::debug::channels</CODE>. It is possible to change this default namespace by defining <CODE>DEBUGCHANNELS</CODE> @@ -204,7 +204,7 @@ Debug( libcw_do.on() ); ForAllDebugChannels( if (!debugChannel.is_on()) debugChannel.on() ); - Dout( dc::elephant|dc::owl, "The elephant is called Dumbo, the owl is called Einstein." ); + Dout(dc::elephant|dc::owl, "The elephant is called Dumbo, the owl is called Einstein."); return 0; } @@ -234,7 +234,7 @@ ForAllDebugChannels( if (!debugChannel.is_on()) debugChannel.on() ); <SPAN class="highlight">Debug( dc::elephant.off() );</SPAN> - Dout( dc::elephant|dc::owl, "The elephant is called Dumbo, the owl is called Einstein." ); + Dout(dc::elephant|dc::owl, "The elephant is called Dumbo, the owl is called Einstein."); return 0; } @@ -275,8 +275,8 @@ Debug( libcw_do.on() ); Debug( dc::notice.on() ); - Dout( dc::notice|nonewline_cf, "Hello, " ); - Dout( dc::notice, "World" ); + Dout(dc::notice|nonewline_cf, "Hello, "); + Dout(dc::notice, "World"); return 0; } @@ -303,8 +303,8 @@ Debug( libcw_do.on() ); Debug( dc::notice.on() ); - Dout( dc::notice|nonewline_cf, "Hello, " ); - Dout( dc::notice|<SPAN class="highlight">noprefix_cf</SPAN>, "World" ); + Dout(dc::notice|nonewline_cf, "Hello, "); + Dout(dc::notice|<SPAN class="highlight">noprefix_cf</SPAN>, "World"); return 0; } @@ -361,13 +361,13 @@ struct stat buf; // Warning: this is NOT the correct way to do this (see below) - Dout( dc::notice|nonewline_cf, - "stat(\"" << file_name << "\", " ); + Dout(dc::notice|nonewline_cf, + "stat(\"" << file_name << "\", "); int ret = stat(file_name, &buf); - Dout( dc::notice|noprefix_cf|cond_error_cf(ret != 0), - &buf << ") = " << ret ); + Dout(dc::notice|noprefix_cf|cond_error_cf(ret != 0), + &buf << ") = " << ret); return 0; } @@ -442,13 +442,13 @@ struct stat<SPAN class="highlight">*</SPAN> buf<SPAN class="highlight">p</SPAN>; // This is NOT the correct way to do this. - Dout( dc::notice|nonewline_cf, - "stat_with_buf_alloc(\"" << file_name << "\", " ); + Dout(dc::notice|nonewline_cf, + "stat_with_buf_alloc(\"" << file_name << "\", "); int ret = stat<SPAN class="highlight">_with_buf_alloc</SPAN>(file_name, buf<SPAN class="highlight">p</SPAN>); - Dout( dc::notice|noprefix_cf|cond_error_cf(ret != 0), - bufp << ") = " << ret ); + Dout(dc::notice|noprefix_cf|cond_error_cf(ret != 0), + bufp << ") = " << ret); <SPAN class="highlight"> Debug( dc::malloc.off() ); @@ -514,13 +514,13 @@ char const* file_name = argv[1]; struct stat* bufp; - Dout( dc::notice|<SPAN class="highlight">continued_cf</SPAN>, - "stat_with_buf_alloc(\"" << file_name << "\", " ); + Dout(dc::notice|<SPAN class="highlight">continued_cf</SPAN>, + "stat_with_buf_alloc(\"" << file_name << "\", "); int ret = stat_with_buf_alloc(file_name, bufp); - Dout( <SPAN class="highlight">dc::finish</SPAN>|cond_error_cf(ret != 0), - bufp << ") = " << ret ); + Dout(<SPAN class="highlight">dc::finish</SPAN>|cond_error_cf(ret != 0), + bufp << ") = " << ret); Debug( dc::malloc.off() ); delete bufp; @@ -554,14 +554,14 @@ Debug( libcw_do.<SPAN class="highlight">set_margin</SPAN>("<-- margin -->") ); Debug( libcw_do.<SPAN class="highlight">set_marker</SPAN>("<-- marker -->") ); - Dout( dc::cat|dc::mouse, "The cat chases the mouse." ); - Dout( dc::mouse|dc::elephant, "The mouse chases the elephant." ); - Dout( dc::notice|<SPAN class="highlight">nolabel_cf</SPAN>, "Setting indentation to 8 spaces:" ); - Dout( dc::notice|<SPAN class="highlight">blank_label_cf</SPAN>, "<------>" ); + Dout(dc::cat|dc::mouse, "The cat chases the mouse."); + Dout(dc::mouse|dc::elephant, "The mouse chases the elephant."); + Dout(dc::notice|<SPAN class="highlight">nolabel_cf</SPAN>, "Setting indentation to 8 spaces:"); + Dout(dc::notice|<SPAN class="highlight">blank_label_cf</SPAN>, "<------>"); Debug( libcw_do.<SPAN class="highlight">set_indent(8)</SPAN> ); - Dout( dc::cat, "The cat sleeps." ); - Dout( dc::elephant, "The elephant looks around:" ); - Dout( dc::elephant|<SPAN class="highlight">blank_label_cf|blank_marker_cf</SPAN>, "where did the mouse go?" ); + Dout(dc::cat, "The cat sleeps."); + Dout(dc::elephant, "The elephant looks around:"); + Dout(dc::elephant|<SPAN class="highlight">blank_label_cf|blank_marker_cf</SPAN>, "where did the mouse go?"); return 0; } Index: src/libcwd/documentation/tutorial/tut6.m4 diff -u src/libcwd/documentation/tutorial/tut6.m4:1.4 src/libcwd/documentation/tutorial/tut6.m4:1.5 --- src/libcwd/documentation/tutorial/tut6.m4:1.4 Sun Feb 17 07:30:15 2002 +++ src/libcwd/documentation/tutorial/tut6.m4 Sun Feb 17 16:44:06 2002 @@ -157,6 +157,9 @@ <A HREF="tut5.html#interrupted">interrupting</A> the debug output of the first allocation.</LI> <LI>The allocation is done somewhere inside a function <CODE>main</CODE></A> but no <A HREF="../html/group__group__locations.html">Source-file:Line-number Information</A> information is found.</LI> +<LI>Likely the 'Loading debug symbols from..' is done <EM>before</EM> the application reaches <CODE>main()</CODE> +and is hence invisible (because the debug object, <CODE>libcw_do</CODE>, is still turned off). +You can force libcwd to print it nevertheless by setting the environment variable <CODE>LIBCWD_PRINT_LOADING</CODE>.</LI> </UL> <TABLE> ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 00:46:25
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 00:46:24 UTC Modified files: libcwd/acconfig.h Log message: Perfectionism. ---------------------- diff included ---------------------- Index: src/libcwd/acconfig.h diff -u src/libcwd/acconfig.h:1.13 src/libcwd/acconfig.h:1.14 --- src/libcwd/acconfig.h:1.13 Sun Feb 17 08:37:32 2002 +++ src/libcwd/acconfig.h Sun Feb 17 16:46:14 2002 @@ -22,7 +22,7 @@ // Defined when both -lpthread and pthread.h could be found. #undef LIBCWD_HAVE_PTHREAD -#if __GNUC__ < 3 +#ifndef _GNU_SOURCE // Might already be defined: g++ 3.x is currently defining this as a hack to get libstdc++ headers work properly. // This is needed when using threading, for example to get `pthread_kill_other_threads_np'. #undef _GNU_SOURCE #endif ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 01:24:59
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 01:24:58 UTC Modified files: libcwd/bfd.cc libcwd/debug.cc libcwd/debugmalloc.cc libcwd/demangle.cc libcwd/demangle3.cc libcwd/elf32.cc libcwd/strerrno.cc libcwd/threading.cc libcwd/type_info.cc libcwd/documentation/definitions.m4 libcwd/include/cwd_debug.h libcwd/include/exec_prog.h libcwd/include/ios_base_Init.h libcwd/include/private_debug_stack.inl libcwd/include/raw_write.h libcwd/include/raw_write.inl libcwd/include/libcw/bfd.h libcwd/include/libcw/buf2str.h libcwd/include/libcw/char2str.h libcwd/include/libcw/class_alloc.h libcwd/include/libcw/class_channel.h libcwd/include/libcw/class_channel.inl libcwd/include/libcw/class_channel_set.h libcwd/include/libcw/class_channel_set.inl libcwd/include/libcw/class_continued_channel.h libcwd/include/libcw/class_continued_channel.inl libcwd/include/libcw/class_debug.inl libcwd/include/libcw/class_debug_string.h libcwd/include/libcw/class_debug_string.inl libcwd/include/libcw/class_fatal_channel.h libcwd/include/libcw/class_fatal_channel.inl libcwd/include/libcw/class_location.h libcwd/include/libcw/class_location.inl libcwd/include/libcw/class_marker.h libcwd/include/libcw/control_flag.h libcwd/include/libcw/core_dump.h libcwd/include/libcw/cwprint.h libcwd/include/libcw/debug.h libcwd/include/libcw/debug_config.ho.in libcwd/include/libcw/debugmalloc.h libcwd/include/libcw/demangle.h libcwd/include/libcw/enum_memblk_types.h libcwd/include/libcw/lockable_auto_ptr.h libcwd/include/libcw/macro_AllocTag.h libcwd/include/libcw/macro_ForAllDebugChannels.h libcwd/include/libcw/macro_ForAllDebugObjects.h libcwd/include/libcw/max_label_len.h libcwd/include/libcw/pc_mangled_function_name.h libcwd/include/libcw/private_allocator.h libcwd/include/libcw/private_assert.h libcwd/include/libcw/private_debug_stack.h libcwd/include/libcw/private_internal_string.h libcwd/include/libcw/private_internal_stringstream.h libcwd/include/libcw/private_internal_vector.h libcwd/include/libcw/private_set_alloc_checking.h libcwd/include/libcw/private_struct_TSD.h libcwd/include/libcw/strerrno.h libcwd/include/libcw/sysd.ho.in libcwd/include/libcw/type_info.h libcwd/tests/hello_world.cc libcwd/tests/syslog.cc libcwd/testsuite/libcwd.tst/alloctag.cc libcwd/testsuite/libcwd.tst/bfd.cc libcwd/testsuite/libcwd.tst/leak.cc libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc libcwd/testsuite/libcwd.tst/magic.cc libcwd/testsuite/libcwd.tst/marker.cc libcwd/testsuite/libcwd.tst/sys.h libcwd/testsuite/libcwd.tst/test_delete.cc libcwd/testsuite/libcwd.tst/type_info.cc libcwd/utils/buf2str.cc libcwd/utils/char2str.cc libcwd/utils/exec_prog.cc Log message: Bumped all copyright notices to the year 2002. ---------------------- diff included ---------------------- Index: src/libcwd/bfd.cc diff -u src/libcwd/bfd.cc:1.103 src/libcwd/bfd.cc:1.104 --- src/libcwd/bfd.cc:1.103 Thu Feb 14 21:19:31 2002 +++ src/libcwd/bfd.cc Sun Feb 17 17:24:46 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.103 2002/02/15 05:19:31 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.104 2002/02/18 01:24:46 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.72 src/libcwd/debug.cc:1.73 --- src/libcwd/debug.cc:1.72 Sun Feb 17 08:37:33 2002 +++ src/libcwd/debug.cc Sun Feb 17 17:24:46 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.72 2002/02/17 16:37:33 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.73 2002/02/18 01:24:46 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/debugmalloc.cc diff -u src/libcwd/debugmalloc.cc:1.83 src/libcwd/debugmalloc.cc:1.84 --- src/libcwd/debugmalloc.cc:1.83 Sat Feb 16 17:42:06 2002 +++ src/libcwd/debugmalloc.cc Sun Feb 17 17:24:46 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.83 2002/02/17 01:42:06 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.84 2002/02/18 01:24:46 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/demangle.cc diff -u src/libcwd/demangle.cc:1.24 src/libcwd/demangle.cc:1.25 --- src/libcwd/demangle.cc:1.24 Wed Jan 9 08:16:04 2002 +++ src/libcwd/demangle.cc Sun Feb 17 17:24:46 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/demangle.cc,v 1.24 2002/01/09 16:16:04 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/demangle.cc,v 1.25 2002/02/18 01:24:46 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/demangle3.cc diff -u src/libcwd/demangle3.cc:1.14 src/libcwd/demangle3.cc:1.15 --- src/libcwd/demangle3.cc:1.14 Thu Feb 7 20:03:46 2002 +++ src/libcwd/demangle3.cc Sun Feb 17 17:24:46 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/demangle3.cc,v 1.14 2002/02/08 04:03:46 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/demangle3.cc,v 1.15 2002/02/18 01:24:46 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/documentation/definitions.m4 diff -u src/libcwd/documentation/definitions.m4:1.2 src/libcwd/documentation/definitions.m4:1.3 --- src/libcwd/documentation/definitions.m4:1.2 Sat Dec 29 20:17:47 2001 +++ src/libcwd/documentation/definitions.m4 Sun Feb 17 17:24:47 2002 @@ -32,7 +32,7 @@ The C++ Debugging Support Library </DIV> <DIV class="header-copyright"> - By Carlo Wood, ©1999 - 2001. + By Carlo Wood, ©1999 - 2002. </DIV> </TD> </TR> @@ -40,7 +40,7 @@ </TABLE>]])dnl dnl define(__PAGEFOOTER, [[ -<ADDRESS>Copyright © 2001 Carlo Wood. All rights reserved.</ADDRESS>]])dnl +<ADDRESS>Copyright © 2001, 2002 Carlo Wood. All rights reserved.</ADDRESS>]])dnl dnl define(__PAGESTART, [[ <DIV class="body">]])dnl Index: src/libcwd/elf32.cc diff -u src/libcwd/elf32.cc:1.38 src/libcwd/elf32.cc:1.39 --- src/libcwd/elf32.cc:1.38 Sun Feb 17 08:37:33 2002 +++ src/libcwd/elf32.cc Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.38 2002/02/17 16:37:33 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/elf32.cc,v 1.39 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/cwd_debug.h diff -u src/libcwd/include/cwd_debug.h:1.8 src/libcwd/include/cwd_debug.h:1.9 --- src/libcwd/include/cwd_debug.h:1.8 Tue Feb 5 16:46:08 2002 +++ src/libcwd/include/cwd_debug.h Sun Feb 17 17:24:47 2002 @@ -1,7 +1,7 @@ // Generated automatically from sys.ho.in by configure. -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/cwd_debug.h,v 1.8 2002/02/06 00:46:08 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/cwd_debug.h,v 1.9 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/exec_prog.h diff -u src/libcwd/include/exec_prog.h:1.2 src/libcwd/include/exec_prog.h:1.3 --- src/libcwd/include/exec_prog.h:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/include/exec_prog.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/exec_prog.h,v 1.2 2001/12/30 04:17:49 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/exec_prog.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/ios_base_Init.h diff -u src/libcwd/include/ios_base_Init.h:1.2 src/libcwd/include/ios_base_Init.h:1.3 --- src/libcwd/include/ios_base_Init.h:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/include/ios_base_Init.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/ios_base_Init.h,v 1.2 2001/12/30 04:17:49 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/ios_base_Init.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/bfd.h diff -u src/libcwd/include/libcw/bfd.h:1.22 src/libcwd/include/libcw/bfd.h:1.23 --- src/libcwd/include/libcw/bfd.h:1.22 Sat Dec 29 20:17:49 2001 +++ src/libcwd/include/libcw/bfd.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/bfd.h,v 1.22 2001/12/30 04:17:49 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/bfd.h,v 1.23 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/buf2str.h diff -u src/libcwd/include/libcw/buf2str.h:1.6 src/libcwd/include/libcw/buf2str.h:1.7 --- src/libcwd/include/libcw/buf2str.h:1.6 Sat Dec 29 20:17:49 2001 +++ src/libcwd/include/libcw/buf2str.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/buf2str.h,v 1.6 2001/12/30 04:17:49 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/buf2str.h,v 1.7 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/char2str.h diff -u src/libcwd/include/libcw/char2str.h:1.6 src/libcwd/include/libcw/char2str.h:1.7 --- src/libcwd/include/libcw/char2str.h:1.6 Sat Dec 29 20:17:49 2001 +++ src/libcwd/include/libcw/char2str.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/char2str.h,v 1.6 2001/12/30 04:17:49 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/char2str.h,v 1.7 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_alloc.h diff -u src/libcwd/include/libcw/class_alloc.h:1.2 src/libcwd/include/libcw/class_alloc.h:1.3 --- src/libcwd/include/libcw/class_alloc.h:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/include/libcw/class_alloc.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_alloc.h,v 1.2 2001/12/30 04:17:49 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_alloc.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_channel.h diff -u src/libcwd/include/libcw/class_channel.h:1.5 src/libcwd/include/libcw/class_channel.h:1.6 --- src/libcwd/include/libcw/class_channel.h:1.5 Tue Jan 22 20:03:44 2002 +++ src/libcwd/include/libcw/class_channel.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel.h,v 1.5 2002/01/23 04:03:44 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel.h,v 1.6 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_channel.inl diff -u src/libcwd/include/libcw/class_channel.inl:1.3 src/libcwd/include/libcw/class_channel.inl:1.4 --- src/libcwd/include/libcw/class_channel.inl:1.3 Tue Jan 8 15:04:59 2002 +++ src/libcwd/include/libcw/class_channel.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel.inl,v 1.3 2002/01/08 23:04:59 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel.inl,v 1.4 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_channel_set.h diff -u src/libcwd/include/libcw/class_channel_set.h:1.5 src/libcwd/include/libcw/class_channel_set.h:1.6 --- src/libcwd/include/libcw/class_channel_set.h:1.5 Tue Jan 22 20:03:44 2002 +++ src/libcwd/include/libcw/class_channel_set.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel_set.h,v 1.5 2002/01/23 04:03:44 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel_set.h,v 1.6 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_channel_set.inl diff -u src/libcwd/include/libcw/class_channel_set.inl:1.2 src/libcwd/include/libcw/class_channel_set.inl:1.3 --- src/libcwd/include/libcw/class_channel_set.inl:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/class_channel_set.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel_set.inl,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_channel_set.inl,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_continued_channel.h diff -u src/libcwd/include/libcw/class_continued_channel.h:1.2 src/libcwd/include/libcw/class_continued_channel.h:1.3 --- src/libcwd/include/libcw/class_continued_channel.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/class_continued_channel.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_continued_channel.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_continued_channel.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_continued_channel.inl diff -u src/libcwd/include/libcw/class_continued_channel.inl:1.2 src/libcwd/include/libcw/class_continued_channel.inl:1.3 --- src/libcwd/include/libcw/class_continued_channel.inl:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/class_continued_channel.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_continued_channel.inl,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_continued_channel.inl,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_debug.inl diff -u src/libcwd/include/libcw/class_debug.inl:1.8 src/libcwd/include/libcw/class_debug.inl:1.9 --- src/libcwd/include/libcw/class_debug.inl:1.8 Tue Feb 12 19:55:26 2002 +++ src/libcwd/include/libcw/class_debug.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.inl,v 1.8 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.inl,v 1.9 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_debug_string.h diff -u src/libcwd/include/libcw/class_debug_string.h:1.4 src/libcwd/include/libcw/class_debug_string.h:1.5 --- src/libcwd/include/libcw/class_debug_string.h:1.4 Sun Jan 20 08:25:11 2002 +++ src/libcwd/include/libcw/class_debug_string.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug_string.h,v 1.4 2002/01/20 16:25:11 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug_string.h,v 1.5 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_debug_string.inl diff -u src/libcwd/include/libcw/class_debug_string.inl:1.2 src/libcwd/include/libcw/class_debug_string.inl:1.3 --- src/libcwd/include/libcw/class_debug_string.inl:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/class_debug_string.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug_string.inl,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug_string.inl,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_fatal_channel.h diff -u src/libcwd/include/libcw/class_fatal_channel.h:1.2 src/libcwd/include/libcw/class_fatal_channel.h:1.3 --- src/libcwd/include/libcw/class_fatal_channel.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/class_fatal_channel.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_fatal_channel.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_fatal_channel.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_fatal_channel.inl diff -u src/libcwd/include/libcw/class_fatal_channel.inl:1.2 src/libcwd/include/libcw/class_fatal_channel.inl:1.3 --- src/libcwd/include/libcw/class_fatal_channel.inl:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/class_fatal_channel.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_fatal_channel.inl,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_fatal_channel.inl,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_location.h diff -u src/libcwd/include/libcw/class_location.h:1.4 src/libcwd/include/libcw/class_location.h:1.5 --- src/libcwd/include/libcw/class_location.h:1.4 Tue Jan 22 20:03:44 2002 +++ src/libcwd/include/libcw/class_location.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_location.h,v 1.4 2002/01/23 04:03:44 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_location.h,v 1.5 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_location.inl diff -u src/libcwd/include/libcw/class_location.inl:1.3 src/libcwd/include/libcw/class_location.inl:1.4 --- src/libcwd/include/libcw/class_location.inl:1.3 Tue Jan 8 15:04:59 2002 +++ src/libcwd/include/libcw/class_location.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_location.inl,v 1.3 2002/01/08 23:04:59 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_location.inl,v 1.4 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/class_marker.h diff -u src/libcwd/include/libcw/class_marker.h:1.2 src/libcwd/include/libcw/class_marker.h:1.3 --- src/libcwd/include/libcw/class_marker.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/class_marker.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_marker.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_marker.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/control_flag.h diff -u src/libcwd/include/libcw/control_flag.h:1.2 src/libcwd/include/libcw/control_flag.h:1.3 --- src/libcwd/include/libcw/control_flag.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/control_flag.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/control_flag.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/control_flag.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/core_dump.h diff -u src/libcwd/include/libcw/core_dump.h:1.2 src/libcwd/include/libcw/core_dump.h:1.3 --- src/libcwd/include/libcw/core_dump.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/core_dump.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/core_dump.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/core_dump.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/cwprint.h diff -u src/libcwd/include/libcw/cwprint.h:1.6 src/libcwd/include/libcw/cwprint.h:1.7 --- src/libcwd/include/libcw/cwprint.h:1.6 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/cwprint.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/cwprint.h,v 1.6 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/cwprint.h,v 1.7 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/debug.h diff -u src/libcwd/include/libcw/debug.h:1.42 src/libcwd/include/libcw/debug.h:1.43 --- src/libcwd/include/libcw/debug.h:1.42 Mon Feb 11 21:40:32 2002 +++ src/libcwd/include/libcw/debug.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debug.h,v 1.42 2002/02/12 05:40:32 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debug.h,v 1.43 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/debug_config.ho.in diff -u src/libcwd/include/libcw/debug_config.ho.in:1.19 src/libcwd/include/libcw/debug_config.ho.in:1.20 --- src/libcwd/include/libcw/debug_config.ho.in:1.19 Fri Feb 8 19:22:59 2002 +++ src/libcwd/include/libcw/debug_config.ho.in Sun Feb 17 17:24:47 2002 @@ -1,7 +1,7 @@ // @configure_input@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debug_config.ho.in,v 1.19 2002/02/09 03:22:59 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debug_config.ho.in,v 1.20 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/debugmalloc.h diff -u src/libcwd/include/libcw/debugmalloc.h:1.29 src/libcwd/include/libcw/debugmalloc.h:1.30 --- src/libcwd/include/libcw/debugmalloc.h:1.29 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/debugmalloc.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debugmalloc.h,v 1.29 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/debugmalloc.h,v 1.30 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/demangle.h diff -u src/libcwd/include/libcw/demangle.h:1.6 src/libcwd/include/libcw/demangle.h:1.7 --- src/libcwd/include/libcw/demangle.h:1.6 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/demangle.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/demangle.h,v 1.6 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/demangle.h,v 1.7 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/enum_memblk_types.h diff -u src/libcwd/include/libcw/enum_memblk_types.h:1.2 src/libcwd/include/libcw/enum_memblk_types.h:1.3 --- src/libcwd/include/libcw/enum_memblk_types.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/enum_memblk_types.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/enum_memblk_types.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/enum_memblk_types.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/lockable_auto_ptr.h diff -u src/libcwd/include/libcw/lockable_auto_ptr.h:1.9 src/libcwd/include/libcw/lockable_auto_ptr.h:1.10 --- src/libcwd/include/libcw/lockable_auto_ptr.h:1.9 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/lockable_auto_ptr.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/lockable_auto_ptr.h,v 1.9 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/lockable_auto_ptr.h,v 1.10 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/macro_AllocTag.h diff -u src/libcwd/include/libcw/macro_AllocTag.h:1.7 src/libcwd/include/libcw/macro_AllocTag.h:1.8 --- src/libcwd/include/libcw/macro_AllocTag.h:1.7 Sun Feb 10 19:00:24 2002 +++ src/libcwd/include/libcw/macro_AllocTag.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_AllocTag.h,v 1.7 2002/02/11 03:00:24 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_AllocTag.h,v 1.8 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/macro_ForAllDebugChannels.h diff -u src/libcwd/include/libcw/macro_ForAllDebugChannels.h:1.5 src/libcwd/include/libcw/macro_ForAllDebugChannels.h:1.6 --- src/libcwd/include/libcw/macro_ForAllDebugChannels.h:1.5 Sat Feb 2 20:15:11 2002 +++ src/libcwd/include/libcw/macro_ForAllDebugChannels.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_ForAllDebugChannels.h,v 1.5 2002/02/03 04:15:11 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_ForAllDebugChannels.h,v 1.6 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/macro_ForAllDebugObjects.h diff -u src/libcwd/include/libcw/macro_ForAllDebugObjects.h:1.6 src/libcwd/include/libcw/macro_ForAllDebugObjects.h:1.7 --- src/libcwd/include/libcw/macro_ForAllDebugObjects.h:1.6 Mon Feb 11 21:40:32 2002 +++ src/libcwd/include/libcw/macro_ForAllDebugObjects.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_ForAllDebugObjects.h,v 1.6 2002/02/12 05:40:32 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_ForAllDebugObjects.h,v 1.7 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/max_label_len.h diff -u src/libcwd/include/libcw/max_label_len.h:1.2 src/libcwd/include/libcw/max_label_len.h:1.3 --- src/libcwd/include/libcw/max_label_len.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/max_label_len.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/max_label_len.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/max_label_len.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/pc_mangled_function_name.h diff -u src/libcwd/include/libcw/pc_mangled_function_name.h:1.2 src/libcwd/include/libcw/pc_mangled_function_name.h:1.3 --- src/libcwd/include/libcw/pc_mangled_function_name.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/pc_mangled_function_name.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/pc_mangled_function_name.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/pc_mangled_function_name.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_allocator.h diff -u src/libcwd/include/libcw/private_allocator.h:1.4 src/libcwd/include/libcw/private_allocator.h:1.5 --- src/libcwd/include/libcw/private_allocator.h:1.4 Wed Jan 9 17:28:46 2002 +++ src/libcwd/include/libcw/private_allocator.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_allocator.h,v 1.4 2002/01/10 01:28:46 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_allocator.h,v 1.5 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_assert.h diff -u src/libcwd/include/libcw/private_assert.h:1.2 src/libcwd/include/libcw/private_assert.h:1.3 --- src/libcwd/include/libcw/private_assert.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/private_assert.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_assert.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_assert.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_debug_stack.h diff -u src/libcwd/include/libcw/private_debug_stack.h:1.2 src/libcwd/include/libcw/private_debug_stack.h:1.3 --- src/libcwd/include/libcw/private_debug_stack.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/private_debug_stack.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_debug_stack.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_debug_stack.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_internal_string.h diff -u src/libcwd/include/libcw/private_internal_string.h:1.2 src/libcwd/include/libcw/private_internal_string.h:1.3 --- src/libcwd/include/libcw/private_internal_string.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/private_internal_string.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_internal_string.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_internal_string.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_internal_stringstream.h diff -u src/libcwd/include/libcw/private_internal_stringstream.h:1.2 src/libcwd/include/libcw/private_internal_stringstream.h:1.3 --- src/libcwd/include/libcw/private_internal_stringstream.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/private_internal_stringstream.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_internal_stringstream.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_internal_stringstream.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_internal_vector.h diff -u src/libcwd/include/libcw/private_internal_vector.h:1.2 src/libcwd/include/libcw/private_internal_vector.h:1.3 --- src/libcwd/include/libcw/private_internal_vector.h:1.2 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/private_internal_vector.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_internal_vector.h,v 1.2 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_internal_vector.h,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_set_alloc_checking.h diff -u src/libcwd/include/libcw/private_set_alloc_checking.h:1.3 src/libcwd/include/libcw/private_set_alloc_checking.h:1.4 --- src/libcwd/include/libcw/private_set_alloc_checking.h:1.3 Tue Jan 22 20:03:45 2002 +++ src/libcwd/include/libcw/private_set_alloc_checking.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_set_alloc_checking.h,v 1.3 2002/01/23 04:03:45 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_set_alloc_checking.h,v 1.4 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/private_struct_TSD.h diff -u src/libcwd/include/libcw/private_struct_TSD.h:1.8 src/libcwd/include/libcw/private_struct_TSD.h:1.9 --- src/libcwd/include/libcw/private_struct_TSD.h:1.8 Sat Feb 16 17:42:07 2002 +++ src/libcwd/include/libcw/private_struct_TSD.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_struct_TSD.h,v 1.8 2002/02/17 01:42:07 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_struct_TSD.h,v 1.9 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/strerrno.h diff -u src/libcwd/include/libcw/strerrno.h:1.5 src/libcwd/include/libcw/strerrno.h:1.6 --- src/libcwd/include/libcw/strerrno.h:1.5 Sat Dec 29 20:17:50 2001 +++ src/libcwd/include/libcw/strerrno.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/strerrno.h,v 1.5 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/strerrno.h,v 1.6 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/sysd.ho.in diff -u src/libcwd/include/libcw/sysd.ho.in:1.6 src/libcwd/include/libcw/sysd.ho.in:1.7 --- src/libcwd/include/libcw/sysd.ho.in:1.6 Thu Feb 7 20:03:47 2002 +++ src/libcwd/include/libcw/sysd.ho.in Sun Feb 17 17:24:47 2002 @@ -1,7 +1,7 @@ // @configure_input@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/sysd.ho.in,v 1.6 2002/02/08 04:03:47 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/sysd.ho.in,v 1.7 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/libcw/type_info.h diff -u src/libcwd/include/libcw/type_info.h:1.19 src/libcwd/include/libcw/type_info.h:1.20 --- src/libcwd/include/libcw/type_info.h:1.19 Thu Feb 7 20:03:47 2002 +++ src/libcwd/include/libcw/type_info.h Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/type_info.h,v 1.19 2002/02/08 04:03:47 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/type_info.h,v 1.20 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/private_debug_stack.inl diff -u src/libcwd/include/private_debug_stack.inl:1.2 src/libcwd/include/private_debug_stack.inl:1.3 --- src/libcwd/include/private_debug_stack.inl:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/include/private_debug_stack.inl Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/private_debug_stack.inl,v 1.2 2001/12/30 04:17:49 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/private_debug_stack.inl,v 1.3 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/raw_write.h diff -u src/libcwd/include/raw_write.h:1.3 src/libcwd/include/raw_write.h:1.4 --- src/libcwd/include/raw_write.h:1.3 Sat Feb 2 20:15:11 2002 +++ src/libcwd/include/raw_write.h Sun Feb 17 17:24:47 2002 @@ -1,7 +1,7 @@ // Generated automatically from sys.ho.in by configure. -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/raw_write.h,v 1.3 2002/02/03 04:15:11 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/raw_write.h,v 1.4 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/include/raw_write.inl diff -u src/libcwd/include/raw_write.inl:1.1 src/libcwd/include/raw_write.inl:1.2 --- src/libcwd/include/raw_write.inl:1.1 Tue Jan 22 20:03:44 2002 +++ src/libcwd/include/raw_write.inl Sun Feb 17 17:24:47 2002 @@ -1,7 +1,7 @@ // Generated automatically from sys.ho.in by configure. -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/raw_write.inl,v 1.1 2002/01/23 04:03:44 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/raw_write.inl,v 1.2 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/strerrno.cc diff -u src/libcwd/strerrno.cc:1.7 src/libcwd/strerrno.cc:1.8 --- src/libcwd/strerrno.cc:1.7 Sat Dec 29 20:17:47 2001 +++ src/libcwd/strerrno.cc Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/strerrno.cc,v 1.7 2001/12/30 04:17:47 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/strerrno.cc,v 1.8 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/tests/hello_world.cc diff -u src/libcwd/tests/hello_world.cc:1.17 src/libcwd/tests/hello_world.cc:1.18 --- src/libcwd/tests/hello_world.cc:1.17 Sat Dec 29 20:17:50 2001 +++ src/libcwd/tests/hello_world.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/tests/hello_world.cc,v 1.17 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/tests/hello_world.cc,v 1.18 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/tests/syslog.cc diff -u src/libcwd/tests/syslog.cc:1.8 src/libcwd/tests/syslog.cc:1.9 --- src/libcwd/tests/syslog.cc:1.8 Sat Dec 29 20:17:50 2001 +++ src/libcwd/tests/syslog.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/tests/syslog.cc,v 1.8 2001/12/30 04:17:50 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/tests/syslog.cc,v 1.9 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/alloctag.cc diff -u src/libcwd/testsuite/libcwd.tst/alloctag.cc:1.18 src/libcwd/testsuite/libcwd.tst/alloctag.cc:1.19 --- src/libcwd/testsuite/libcwd.tst/alloctag.cc:1.18 Tue Feb 12 19:55:26 2002 +++ src/libcwd/testsuite/libcwd.tst/alloctag.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/alloctag.cc,v 1.18 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/alloctag.cc,v 1.19 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/bfd.cc diff -u src/libcwd/testsuite/libcwd.tst/bfd.cc:1.25 src/libcwd/testsuite/libcwd.tst/bfd.cc:1.26 --- src/libcwd/testsuite/libcwd.tst/bfd.cc:1.25 Tue Feb 12 19:55:26 2002 +++ src/libcwd/testsuite/libcwd.tst/bfd.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/bfd.cc,v 1.25 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/bfd.cc,v 1.26 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/leak.cc diff -u src/libcwd/testsuite/libcwd.tst/leak.cc:1.17 src/libcwd/testsuite/libcwd.tst/leak.cc:1.18 --- src/libcwd/testsuite/libcwd.tst/leak.cc:1.17 Tue Feb 12 19:55:26 2002 +++ src/libcwd/testsuite/libcwd.tst/leak.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/leak.cc,v 1.17 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/leak.cc,v 1.18 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc diff -u src/libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc:1.10 src/libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc:1.11 --- src/libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc:1.10 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc,v 1.10 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/lockable_auto_ptr.cc,v 1.11 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/magic.cc diff -u src/libcwd/testsuite/libcwd.tst/magic.cc:1.11 src/libcwd/testsuite/libcwd.tst/magic.cc:1.12 --- src/libcwd/testsuite/libcwd.tst/magic.cc:1.11 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/magic.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/magic.cc,v 1.11 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/magic.cc,v 1.12 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/marker.cc diff -u src/libcwd/testsuite/libcwd.tst/marker.cc:1.16 src/libcwd/testsuite/libcwd.tst/marker.cc:1.17 --- src/libcwd/testsuite/libcwd.tst/marker.cc:1.16 Tue Feb 12 19:55:26 2002 +++ src/libcwd/testsuite/libcwd.tst/marker.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/marker.cc,v 1.16 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/marker.cc,v 1.17 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/sys.h diff -u src/libcwd/testsuite/libcwd.tst/sys.h:1.6 src/libcwd/testsuite/libcwd.tst/sys.h:1.7 --- src/libcwd/testsuite/libcwd.tst/sys.h:1.6 Sun Feb 17 08:37:33 2002 +++ src/libcwd/testsuite/libcwd.tst/sys.h Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/sys.h,v 1.6 2002/02/17 16:37:33 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/sys.h,v 1.7 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/test_delete.cc diff -u src/libcwd/testsuite/libcwd.tst/test_delete.cc:1.12 src/libcwd/testsuite/libcwd.tst/test_delete.cc:1.13 --- src/libcwd/testsuite/libcwd.tst/test_delete.cc:1.12 Tue Feb 12 19:55:26 2002 +++ src/libcwd/testsuite/libcwd.tst/test_delete.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/test_delete.cc,v 1.12 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/test_delete.cc,v 1.13 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/testsuite/libcwd.tst/type_info.cc diff -u src/libcwd/testsuite/libcwd.tst/type_info.cc:1.12 src/libcwd/testsuite/libcwd.tst/type_info.cc:1.13 --- src/libcwd/testsuite/libcwd.tst/type_info.cc:1.12 Sat Dec 29 20:17:51 2001 +++ src/libcwd/testsuite/libcwd.tst/type_info.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/type_info.cc,v 1.12 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/testsuite/libcwd.tst/type_info.cc,v 1.13 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/threading.cc diff -u src/libcwd/threading.cc:1.11 src/libcwd/threading.cc:1.12 --- src/libcwd/threading.cc:1.11 Tue Feb 12 19:55:26 2002 +++ src/libcwd/threading.cc Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/threading.cc,v 1.11 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/threading.cc,v 1.12 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2001, by +// Copyright (C) 2001 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/type_info.cc diff -u src/libcwd/type_info.cc:1.14 src/libcwd/type_info.cc:1.15 --- src/libcwd/type_info.cc:1.14 Sat Dec 29 20:17:47 2001 +++ src/libcwd/type_info.cc Sun Feb 17 17:24:47 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/type_info.cc,v 1.14 2001/12/30 04:17:47 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/type_info.cc,v 1.15 2002/02/18 01:24:47 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/utils/buf2str.cc diff -u src/libcwd/utils/buf2str.cc:1.6 src/libcwd/utils/buf2str.cc:1.7 --- src/libcwd/utils/buf2str.cc:1.6 Sat Dec 29 20:17:51 2001 +++ src/libcwd/utils/buf2str.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/utils/buf2str.cc,v 1.6 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/utils/buf2str.cc,v 1.7 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/utils/char2str.cc diff -u src/libcwd/utils/char2str.cc:1.8 src/libcwd/utils/char2str.cc:1.9 --- src/libcwd/utils/char2str.cc:1.8 Sat Dec 29 20:17:51 2001 +++ src/libcwd/utils/char2str.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/utils/char2str.cc,v 1.8 2001/12/30 04:17:51 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/utils/char2str.cc,v 1.9 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt Index: src/libcwd/utils/exec_prog.cc diff -u src/libcwd/utils/exec_prog.cc:1.23 src/libcwd/utils/exec_prog.cc:1.24 --- src/libcwd/utils/exec_prog.cc:1.23 Sun Jan 20 08:25:11 2002 +++ src/libcwd/utils/exec_prog.cc Sun Feb 17 17:24:48 2002 @@ -1,6 +1,6 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/utils/exec_prog.cc,v 1.23 2002/01/20 16:25:11 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/utils/exec_prog.cc,v 1.24 2002/02/18 01:24:48 libcw Exp $ // -// Copyright (C) 2000 - 2001, by +// Copyright (C) 2000 - 2002, by // // Carlo Wood, Run on IRC <ca...@al...> // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 04:36:20
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 04:36:17 UTC Modified files: libcwd/documentation/tutorial/Makefile libcwd/documentation/tutorial/index.m4 libcwd/documentation/tutorial/tut7.in Added files: libcwd/documentation/tutorial/tut8.m4 Log message: Added tutorial on threading. ---------------------- diff included ---------------------- Index: src/libcwd/documentation/tutorial/Makefile diff -u src/libcwd/documentation/tutorial/Makefile:1.2 src/libcwd/documentation/tutorial/Makefile:1.3 --- src/libcwd/documentation/tutorial/Makefile:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/documentation/tutorial/Makefile Sun Feb 17 20:36:07 2002 @@ -9,7 +9,7 @@ all: examples html examples: $(SOURCES5) $(SOURCES7) -html: index.html faq.html intro.html tut1.html tut2.html tut3.html tut4.html tut5.html tut6.html tut7.html +html: index.html faq.html intro.html tut1.html tut2.html tut3.html tut4.html tut5.html tut6.html tut7.html tut8.html %.html: %.m4 ../definitions.m4 m4 -D__TUTORIAL=1 -I.. $< > $@ Index: src/libcwd/documentation/tutorial/index.m4 diff -u src/libcwd/documentation/tutorial/index.m4:1.2 src/libcwd/documentation/tutorial/index.m4:1.3 --- src/libcwd/documentation/tutorial/index.m4:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/documentation/tutorial/index.m4 Sun Feb 17 20:36:07 2002 @@ -9,7 +9,7 @@ </TD> <TD valign=center><DIV class="toc-header1"> <A class="toc1" href="../html/index.html" target="_top"> - Back to main index + back to main index </A></DIV> </TD> </TR> @@ -62,25 +62,26 @@ __TOC_START __PAGE(1, [[Introduction]], intro.html) __PAGE(2, [[Tutorial 1 : Hello World]], tut1.html) -__PAGE(3, [[Tutorial 2 : Creating your own Debug Channels]], tut2.html) -__PAGE(4, [[Tutorial 3 : Setting the <CODE>ostream</CODE>]], tut3.html) -__PAGE(5, [[Tutorial 4 : Management of <CODE>CWDEBUG</CODE>]], tut4.html) -__PAGE(6, [[Tutorial 5 : Advanced examples]], tut5.html) +__PAGE(3, [[Tutorial 2 : Creating Your Own Debug Channels]], tut2.html) +__PAGE(4, [[Tutorial 3 : Setting The <CODE>ostream</CODE>]], tut3.html) +__PAGE(5, [[Tutorial 4 : Management Of <CODE>CWDEBUG</CODE>]], tut4.html) +__PAGE(6, [[Tutorial 5 : Advanced Examples]], tut5.html) __PAGE_START -__PARAGRAPH(2f, 5.1, [[Running over all Debug Channels]], [[tut5.html#Running]]) -__PARAGRAPH(2, 5.2, [[Debug Channels and name spaces]], [[tut5.html#Debug]]) -__PARAGRAPH(2, 5.3, [[Combining channels]], [[tut5.html#Combining]]) -__PARAGRAPH(2, 5.4, [[Formatting debug output]], [[tut5.html#Formatting]]) -__PARAGRAPH(3, 5.4.1, [[Control flags]], [[tut5.html#Control]]) -__PARAGRAPH(3, 5.4.2, [[Methods of the debug object]], [[tut5.html#Methods]]) +__PARAGRAPH(2f, 5.1, [[Running Over All Debug Channels]], [[tut5.html#Running]]) +__PARAGRAPH(2, 5.2, [[Debug Channels And Name Spaces]], [[tut5.html#Debug]]) +__PARAGRAPH(2, 5.3, [[Combining Channels]], [[tut5.html#Combining]]) +__PARAGRAPH(2, 5.4, [[Formatting Debug Output]], [[tut5.html#Formatting]]) +__PARAGRAPH(3, 5.4.1, [[Control Flags]], [[tut5.html#Control]]) +__PARAGRAPH(3, 5.4.2, [[Methods Of The Debug Object]], [[tut5.html#Methods]]) __PAGE_END -__PAGE(7, [[Tutorial 6 : The debugging of dynamic memory allocations]], tut6.html) -__PAGE(8, [[Tutorial 7 : Advanced examples]], tut7.html) +__PAGE(7, [[Tutorial 6 : The Debugging Of Dynamic Memory Allocations]], tut6.html) +__PAGE(8, [[Tutorial 7 : Advanced Examples]], tut7.html) __PAGE_START -__PARAGRAPH(2f, 7.1, [[Removing allocations from the Allocated memory Overview]], [[tut7.html#Removing]]) -__PARAGRAPH(2, 7.2, [[Retrieving information about memory allocations]], [[tut7.html#Retrieving]]) -__PARAGRAPH(2, 7.3, [[Memory leak detection]], [[tut7.html#Memory]]) +__PARAGRAPH(2f, 7.1, [[Removing Allocations From The Allocated Memory Overview]], [[tut7.html#Removing]]) +__PARAGRAPH(2, 7.2, [[Retrieving Information About Memory Allocations]], [[tut7.html#Retrieving]]) +__PARAGRAPH(2, 7.3, [[Memory Leak Detection]], [[tut7.html#Memory]]) __PAGE_END +__PAGE(9, [[Tutorial 8 : Debugging Threaded Applications]], tut8.html) __TOC_END __PAGEEND __PAGEFOOTER Index: src/libcwd/documentation/tutorial/tut7.in diff -u src/libcwd/documentation/tutorial/tut7.in:1.2 src/libcwd/documentation/tutorial/tut7.in:1.3 --- src/libcwd/documentation/tutorial/tut7.in:1.2 Sat Dec 29 20:17:49 2001 +++ src/libcwd/documentation/tutorial/tut7.in Sun Feb 17 20:36:07 2002 @@ -495,14 +495,12 @@ <!-- START OUTPUT examples7/test7.3.5-bin --> </PRE> -<P>Congratulations, you are now a libcwd expert. If you still have any -questions that you can't find here, feel free to mail me.</P> - __PAGEEND -<P class="line"><IMG width=870 height=25 src="../images/lines/owl.png"></P> +<P class="line"><IMG width=870 height=19 src="../images/lines/hippo.png"></P> <DIV class="buttons"> <A HREF="tut6.html"><IMG width=64 height=32 src="../images/buttons/lr_prev.png" border="0"></A> <A HREF="index.html"><IMG width=64 height=32 src="../images/buttons/lr_index.png" border="0"></A> +<A HREF="tut8.html"><IMG width=64 height=32 src="../images/buttons/lr_next.png" border="0"></A> </DIV> __PAGEFOOTER __HTMLFOOTER Index: src/libcwd/documentation/tutorial/tut8.m4 diff -u /dev/null src/libcwd/documentation/tutorial/tut8.m4:1.1 --- /dev/null Sun Feb 17 20:36:17 2002 +++ src/libcwd/documentation/tutorial/tut8.m4 Sun Feb 17 20:36:07 2002 @@ -0,0 +1,121 @@ +include(definitions.m4)dnl +__HTMLHEADER +__PAGEHEADER +__PAGESTART + +<H2>Tutorial 8: Debugging Threaded Applications</H2> + +<P>Libcwd should be completely thread-safe, with the following restrictions:</P> +<UL> +<LI>All debug objects and debug channels <EM>must</EM> be global (as they should +be in non-threaded applications for that matter).</LI> +<LI>You are not allowed to create threads before all static and global objects +are initialized; in practise this means that you are not allowed to create threads +until <CODE>main()</CODE> is reached.</LI> +<LI>You cannot use <CODE>dlopen()</CODE> to load libcwd when threads have +already been created. Likewise you shouldn't <CODE>dlopen()</CODE> +other libraries that use libcwd when there are already running threads, +especially when those libraries define new debug objects and/or channels.</LI> +<LI>You need to provide one and only one locking mechanism per ostream device +that is also used to write debug output. It is preferable not to +use the same ostream with two or more different debug objects.</LI> +</UL> + +<P>Essentially the debug objects and channels react towards each thread as if +that thread is the only thread. The only (visible) shared variable is +the final <CODE>ostream</CODE> that a given debug object writes to. +This means that if one thread changes the <CODE>ostream</CODE> then all other +threads also suddenly start to write to that <CODE>ostream</CODE>. +Basically, it is simply not supported: don't change the output stream +on the fly.</P> + +<P>All other characteristics like the on/off state and the margin and +marker strings as well as the indentation are Thread Specific: Every +thread may change those without locking or worrying about the effect on +other threads.</P> + +<P>Every time a new thread is created, it will start with all debug objects +and channels turned off, just as at the start of <CODE>main()</CODE>.</P> + +<P>In all likelihood, you'd want to set the margin string such that it reflects which +thread is printing the output. For example:</P> + +<PRE> +void* thread_function(void* arguments) +{ + // Set Thread Specific on/off flags of the debug channels. + ForAllDebugChannels( if (!debugChannel.is_on()) debugChannel.on(); ); + // And for the debug object. + Debug( libcw_do.on() ); + // Set a margin. +#ifdef CWDEBUG + char margin[16]; + sprintf(margin, "%-10lu ", pthread_self()); +#endif + Debug( libcw_do.margin().assign(margin, 11) ); + + Dout(dc::notice, "Entering thread " << pthread_self()); + // ... do stuff + Dout(dc::notice, "Leaving thread " << pthread_self()); + return NULL; +} + +int main(void) +{ + // Don't output a single character at a time (yuk) + // (Read <A HREF ="http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#8">http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#8</A> for an explanation.) + std::ios::sync_with_stdio(false); + // Do header files and library match? + Debug( check_configuration() ); + // Send debug output to std::cout. +#ifdef CWDEBUG + pthread_mutex_t cout_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + Debug( libcw_do.set_ostream(&std::cout, &cout_mutex) ); + // Turn debug object on. + Debug( libcw_do.on() ); + // Set a margin. +#ifdef CWDEBUG + char margin[16]; + sprintf(margin, "%-10lu ", pthread_self()); +#endif + Debug( libcw_do.margin().assign(margin, 11) ); + // Turn all debug channels on. + ForAllDebugChannels( if (!debugChannel.is_on()) debugChannel.on(); ); + // List all channels. + Debug( list_channels_on(libcw_do) ); + + // Create and join a few threads... + int const number_of_threads = 4; + pthread_t thread_id[number_of_threads]; + for (int i = 0; i < number_of_threads; ++i) + { + Dout(dc::notice|continued_cf, "main: creating thread " << i << ", "); + pthread_create(&thread_id[i], NULL, thread_function, NULL); + Dout(dc::finish, "id " << thread_id[i] << '.'); + } + + for (int i = 0; i < number_of_threads; ++i) + { + void* status; + pthread_join(thread_id[i], &status); + Dout(dc::notice, "main loop: thread " << i << ", id " << thread_id[i] << + ", returned with status " << ((bool)status ? "OK" : "ERROR") << '.'); + } + + Dout(dc::notice, "Exiting from main()"); + return 0; +} +</PRE> + +<P>Congratulations, you are now a libcwd expert. If you still have any +questions that you can't find answers to here, feel free to mail me.</P> + +__PAGEEND +<P class="line"><IMG width=870 height=25 src="../images/lines/owl.png"></P> +<DIV class="buttons"> +<A HREF="tut7.html"><IMG width=64 height=32 src="../images/buttons/lr_prev.png" border="0"></A> +<A HREF="index.html"><IMG width=64 height=32 src="../images/buttons/lr_index.png" border="0"></A> +</DIV> +__PAGEFOOTER +__HTMLFOOTER ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 05:07:32
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 05:07:32 UTC Modified files: libcwd/include/libcw/Makefile.am libcwd/tests/Makefile.am Log message: Fixed 'make install' and 'make uninstall'. ---------------------- diff included ---------------------- Index: src/libcwd/include/libcw/Makefile.am diff -u src/libcwd/include/libcw/Makefile.am:1.25 src/libcwd/include/libcw/Makefile.am:1.26 --- src/libcwd/include/libcw/Makefile.am:1.25 Wed Feb 13 06:45:50 2002 +++ src/libcwd/include/libcw/Makefile.am Sun Feb 17 21:07:22 2002 @@ -63,3 +63,7 @@ $(mkinstalldirs) $(DESTDIR)$(libcwddir) $(INSTALL_DATA) $(EXTRA_HEADERS) $(DESTDIR)$(libcwddir) +uninstall-local: + cd $(DESTDIR)$(libcwddir); rm -f $(EXTRA_HEADERS) + rmdir $(DESTDIR)$(libcwddir) + Index: src/libcwd/tests/Makefile.am diff -u src/libcwd/tests/Makefile.am:1.20 src/libcwd/tests/Makefile.am:1.21 --- src/libcwd/tests/Makefile.am:1.20 Thu Jan 31 21:12:16 2002 +++ src/libcwd/tests/Makefile.am Sun Feb 17 21:07:22 2002 @@ -31,7 +31,7 @@ stabs_SOURCES = stabs.cc lines_SOURCES = lines.cc -include_HEADERS = sys.h debug.h sys.h syslog_debug.h threads_debug.h initbug_GlobalObject.h +noinst_HEADERS = sys.h debug.h sys.h syslog_debug.h threads_debug.h initbug_GlobalObject.h LDADD = ../libcwd.la full_top_builddir := $(shell (cd $(top_builddir); pwd)) ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 05:39:26
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 05:39:25 UTC Modified files: libcwd/NEWS libcwd/include/libcw/class_debug.h libcwd/include/libcw/set_ostream.inl libcwd/tests/threads4.cc Log message: Gruwelijke Bug. ---------------------- diff included ---------------------- Index: src/libcwd/NEWS diff -u src/libcwd/NEWS:1.71 src/libcwd/NEWS:1.72 --- src/libcwd/NEWS:1.71 Sat Feb 16 17:42:06 2002 +++ src/libcwd/NEWS Sun Feb 17 21:39:14 2002 @@ -1,6 +1,16 @@ libcwd-0.99.17 + A tutorial on debugging threaded applications was added. + Bug fixes: + + The specialization of template + _private_::lock_interface_tct<pthread_mutex_t*> + was accidently left out of its header file, resulting in + the compile error: + /usr/include/libcw/private_lock_interface.h:38: no matching + function for call to `pthread_mutex_t::trylock()' + when trying to pass a pthread_mutex_t to debug_ct::set_ostream. Libcwd failed to find an executable in the current directory when one of the command line parameters contained a '/'. Index: src/libcwd/include/libcw/class_debug.h diff -u src/libcwd/include/libcw/class_debug.h:1.12 src/libcwd/include/libcw/class_debug.h:1.13 --- src/libcwd/include/libcw/class_debug.h:1.12 Sat Feb 16 17:42:07 2002 +++ src/libcwd/include/libcw/class_debug.h Sun Feb 17 21:39:14 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.12 2002/02/17 01:42:07 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.13 2002/02/18 05:39:14 libcw Exp $ // // Copyright (C) 2000 - 2002, by // @@ -220,7 +220,7 @@ // void set_ostream(std::ostream* os); -#ifdef LIBCWD_THREAD_SAFE +#if defined(LIBCWD_THREAD_SAFE) || defined(LIBCW_DOXYGEN) template<class T> void set_ostream(std::ostream* os, T* mutex); #ifdef LIBCW_DOXYGEN @@ -242,7 +242,7 @@ void force_on(OnOffState& state); void restore(OnOffState const& state); -#ifdef LIBCWD_THREAD_SAFE +#if defined(LIBCWD_THREAD_SAFE) || defined(LIBCW_DOXYGEN) /** * \brief Keep Thread Specific Data after thread exit. * @@ -278,6 +278,12 @@ bool keep_tsd(bool keep); #endif // LIBCWD_THREAD_SAFE }; + +#ifndef LIBCW_DOXYGEN +// Specialization. +template<> + void debug_ct::set_ostream(std::ostream* os, pthread_mutex_t* mutex); +#endif } // namespace debug } // namespace libcw Index: src/libcwd/include/libcw/set_ostream.inl diff -u src/libcwd/include/libcw/set_ostream.inl:1.1 src/libcwd/include/libcw/set_ostream.inl:1.2 --- src/libcwd/include/libcw/set_ostream.inl:1.1 Tue Feb 12 19:55:26 2002 +++ src/libcwd/include/libcw/set_ostream.inl Sun Feb 17 21:39:14 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/set_ostream.inl,v 1.1 2002/02/13 03:55:26 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/set_ostream.inl,v 1.2 2002/02/18 05:39:14 libcw Exp $ // // Copyright (C) 2002, by // @@ -21,7 +21,7 @@ #include <libcw/private_threading.h> #endif -#ifdef LIBCWD_THREAD_SAFE +#if defined(LIBCWD_THREAD_SAFE) || defined(LIBCWD_DOXYGEN) namespace libcw { namespace debug { @@ -70,6 +70,7 @@ } // namespace debug } // namespace libcw + #endif // LIBCWD_THREAD_SAFE #endif // LIBCW_SET_OSTREAM_INL Index: src/libcwd/tests/threads4.cc diff -u src/libcwd/tests/threads4.cc:1.10 src/libcwd/tests/threads4.cc:1.11 --- src/libcwd/tests/threads4.cc:1.10 Mon Feb 11 21:40:32 2002 +++ src/libcwd/tests/threads4.cc Sun Feb 17 21:39:14 2002 @@ -2,6 +2,7 @@ #include "threads_debug.h" #include <iostream> #include <sstream> +#include <cstdio> // For sprintf #ifdef CWDEBUG namespace debug_channels { ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 05:56:13
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 05:56:12 UTC Modified files: libcwd/documentation/tutorial/tut8.m4 Log message: Use < in tut8.m4. ---------------------- diff included ---------------------- Index: src/libcwd/documentation/tutorial/tut8.m4 diff -u src/libcwd/documentation/tutorial/tut8.m4:1.1 src/libcwd/documentation/tutorial/tut8.m4:1.2 --- src/libcwd/documentation/tutorial/tut8.m4:1.1 Sun Feb 17 20:36:07 2002 +++ src/libcwd/documentation/tutorial/tut8.m4 Sun Feb 17 21:56:02 2002 @@ -41,6 +41,12 @@ thread is printing the output. For example:</P> <PRE> +#include "sys.h" // See <A HREF="../html/preparation.html">documentation/html/preparation.html</A> +#include "debug.h" +#include <iostream> +#include <cstdio> +#include <pthread.h> + void* thread_function(void* arguments) { // Set Thread Specific on/off flags of the debug channels. @@ -54,10 +60,10 @@ #endif Debug( libcw_do.margin().assign(margin, 11) ); - Dout(dc::notice, "Entering thread " << pthread_self()); + Dout(dc::notice, "Entering thread " << pthread_self()); // ... do stuff - Dout(dc::notice, "Leaving thread " << pthread_self()); - return NULL; + Dout(dc::notice, "Leaving thread " << pthread_self()); + return (void*)true; } int main(void) @@ -88,24 +94,57 @@ // Create and join a few threads... int const number_of_threads = 4; pthread_t thread_id[number_of_threads]; - for (int i = 0; i < number_of_threads; ++i) + for (int i = 0; i < number_of_threads; ++i) { - Dout(dc::notice|continued_cf, "main: creating thread " << i << ", "); + Dout(dc::notice|continued_cf, "main: creating thread " << i << ", "); pthread_create(&thread_id[i], NULL, thread_function, NULL); - Dout(dc::finish, "id " << thread_id[i] << '.'); + Dout(dc::finish, "id " << thread_id[i] << '.'); } - for (int i = 0; i < number_of_threads; ++i) + for (int i = 0; i < number_of_threads; ++i) { void* status; pthread_join(thread_id[i], &status); - Dout(dc::notice, "main loop: thread " << i << ", id " << thread_id[i] << - ", returned with status " << ((bool)status ? "OK" : "ERROR") << '.'); + Dout(dc::notice, "main loop: thread " << i << ", id " << thread_id[i] << + ", returned with status " << ((bool)status ? "OK" : "ERROR") << '.'); } Dout(dc::notice, "Exiting from main()"); return 0; } +</PRE> + +<P>Which outputs something like:</P> + +<PRE class="output"> +BFD : Enabled +DEBUG : Enabled +MALLOC : Enabled +NOTICE : Enabled +SYSTEM : Enabled +WARNING : Enabled +1024 NOTICE : main: creating thread 0, <unfinished> +1024 MALLOC : malloc(8160) = <unfinished> +1024 BFD : address 0x401fbbd8 corresponds to pthread.c:533 +1024 MALLOC : <continued> 0x838689> +1024 NOTICE : <continued> id 1026. +1026 NOTICE : Entering thread 1026 +1026 NOTICE : Leaving thread 1026 +1024 NOTICE : main: creating thread 1, id 2051. +2051 NOTICE : Entering thread 2051 +2051 NOTICE : Leaving thread 2051 +1024 NOTICE : main: creating thread 2, id 3076. +3076 NOTICE : Entering thread 3076 +3076 NOTICE : Leaving thread 3076 +1024 NOTICE : main: creating thread 3, id 4101. +1024 NOTICE : main loop: thread 0, id 1026, returned with status OK. +1024 NOTICE : main loop: thread 1, id 2051, returned with status OK. +1024 NOTICE : main loop: thread 2, id 3076, returned with status OK. +4101 NOTICE : Entering thread 4101 +4101 NOTICE : Leaving thread 4101 +1024 NOTICE : main loop: thread 3, id 4101, returned with status OK. +1024 NOTICE : Exiting from main() +1024 MALLOC : free(0x8386890) pthread.c:533 <unknown type>; (sz = 8160) </PRE> <P>Congratulations, you are now a libcwd expert. If you still have any ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 06:08:16
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 06:08:16 UTC Modified files: libcwd/NEWS libcwd/debug.cc libcwd/documentation/tutorial/tut8.m4 Log message: list_channels_on didn't print the margin. ---------------------- diff included ---------------------- Index: src/libcwd/NEWS diff -u src/libcwd/NEWS:1.72 src/libcwd/NEWS:1.73 --- src/libcwd/NEWS:1.72 Sun Feb 17 21:39:14 2002 +++ src/libcwd/NEWS Sun Feb 17 22:08:05 2002 @@ -27,6 +27,8 @@ that is defined under preferences -> appearance -> fonts. This should be set to -adobe-helvetica-*-. + list_channels_on didn't print the margin. + Fixed a dead lock in object_file_ct::find_nearest_line(). The dead lock occured when debug output written from load_dwarf/load_stabs, which must be done with userspace Index: src/libcwd/debug.cc diff -u src/libcwd/debug.cc:1.73 src/libcwd/debug.cc:1.74 --- src/libcwd/debug.cc:1.73 Sun Feb 17 17:24:46 2002 +++ src/libcwd/debug.cc Sun Feb 17 22:08:05 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.73 2002/02/18 01:24:46 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.74 2002/02/18 06:08:05 libcw Exp $ // // Copyright (C) 2000 - 2002, by // @@ -1250,6 +1250,7 @@ i != _private_::debug_channels.read_locked().end(); ++i) { LibcwDoutScopeBegin(DEBUGCHANNELS, debug_object, dc::always|noprefix_cf); + LibcwDoutStream.write(LIBCWD_DO_TSD_MEMBER(debug_object, margin).c_str(), LIBCWD_DO_TSD_MEMBER(debug_object, margin).size()); LibcwDoutStream.write((*i)->get_label(), WST_max_len); if ((*i)->is_on()) LibcwDoutStream.write(": Enabled", 9); Index: src/libcwd/documentation/tutorial/tut8.m4 diff -u src/libcwd/documentation/tutorial/tut8.m4:1.2 src/libcwd/documentation/tutorial/tut8.m4:1.3 --- src/libcwd/documentation/tutorial/tut8.m4:1.2 Sun Feb 17 21:56:02 2002 +++ src/libcwd/documentation/tutorial/tut8.m4 Sun Feb 17 22:08:06 2002 @@ -117,12 +117,12 @@ <P>Which outputs something like:</P> <PRE class="output"> -BFD : Enabled -DEBUG : Enabled -MALLOC : Enabled -NOTICE : Enabled -SYSTEM : Enabled -WARNING : Enabled +1024 BFD : Enabled +1024 DEBUG : Enabled +1024 MALLOC : Enabled +1024 NOTICE : Enabled +1024 SYSTEM : Enabled +1024 WARNING : Enabled 1024 NOTICE : main: creating thread 0, <unfinished> 1024 MALLOC : malloc(8160) = <unfinished> 1024 BFD : address 0x401fbbd8 corresponds to pthread.c:533 ----------------------- End of diff ----------------------- |
From: Carlo W. <li...@us...> - 2002-02-18 06:15:05
|
CVSROOT : /cvsroot/libcw Module : src Commit time: 2002-01-18 06:15:04 UTC Modified files: libcwd/include/libcw/class_debug.h Log message: Bug fix. ---------------------- diff included ---------------------- Index: src/libcwd/include/libcw/class_debug.h diff -u src/libcwd/include/libcw/class_debug.h:1.13 src/libcwd/include/libcw/class_debug.h:1.14 --- src/libcwd/include/libcw/class_debug.h:1.13 Sun Feb 17 21:39:14 2002 +++ src/libcwd/include/libcw/class_debug.h Sun Feb 17 22:14:54 2002 @@ -1,4 +1,4 @@ -// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.13 2002/02/18 05:39:14 libcw Exp $ +// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/class_debug.h,v 1.14 2002/02/18 06:14:54 libcw Exp $ // // Copyright (C) 2000 - 2002, by // @@ -279,7 +279,7 @@ #endif // LIBCWD_THREAD_SAFE }; -#ifndef LIBCW_DOXYGEN +#if defined(LIBCWD_THREAD_SAFE) && !defined(LIBCW_DOXYGEN) // Specialization. template<> void debug_ct::set_ostream(std::ostream* os, pthread_mutex_t* mutex); ----------------------- End of diff ----------------------- |