From: Hans-Dieter K. <hd...@t-...> - 2006-07-23 00:08:55
|
Dave Dodge wrote: > On Thu, Jul 20, 2006 at 08:51:51AM -0700, Mike Melanson wrote: > >>Bill Fink wrote: >> >>>I'm also an entrenched printf debugger. Of course the one evil case >>>is when adding the debug printfs actually makes the darn thing work. >> >>For the record, this can be a useful debugging result as well. it often >>indicates a timing problem or race condition. > > > In such cases, buffer overflow (specifically, damaging the stack) > would probably be my first guess. > Different behaviour with and without debug printf is doubtless a timing or race issue if there is no mistake in the printf code itself. I learned this an uncounted number of times. BTW: My favourite debugger is printf too, besides a floor full of papers with printed source code. Maybe it sounds ancient but it is simple and it works and it results in a deep understanding of what's going on and ... Cheers, Hans-Dieter |