Re: Callback and event logging
- From: Russell Shaw <rjshaw iprimus com au>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Callback and event logging
- Date: Sun, 19 Oct 2003 19:33:26 +1000
Matthias Mann wrote:
On Friday September 12 2003 04:46 CEST, Russell Shaw wrote:
I put this at the beginning of every function in the program:
#ifdef ENABLE_DEBUG
printf ("__FUNCTION__ = %s
", __FUNCTION__);
#endif
A good idea. But could have very much debug output. The project
i'm working for has nearly 100 functions and a lot of signal
handlers. And some functions are called over 1000 times per
second......
so i only include such printf lines if i have a buggy function
to get some infos about the values of used pointers received
signals and others. And delete them after the trouble is fixed.
I put this debug output into hundreds of functions. It turned out
the program had one extra thread called 20/s, so i put
#ifdef ENABLE_DEBUG_THREAD into those thread functions
so i could enable/disable it at compile-time.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]