[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    RE: RFC: Strategy for integrating the Nana debugging library
From:       David Faure <David.Faure () cramersystems ! com>
Date:       1999-12-20 9:44:17
[Download RAW message or body]

> On Son, 19 Dez 1999, David Faure wrote:
> 
> > > nana can also do simple debug output. kdebug is just a subset of nana
IIUC. 
> > Once again, it's not a subset since nana doesn't have debug areas.
> 
> Why do we need debug areas when nana remembers file and line number of
where
> the debug statement is? This is simpler and still more informative imho. 
In order to turn it off !!
Sure, the file and line instead of area name would better, but that's not
the point.
What's missing (especially for libraries) is a way to turn the debug output
off.

> For kdebug you have to "allocate" a area number and use (read: remember
and
> type) that wherever I just want to have a short debug output. 
Not for apps. I suggested apps would default to a debug area of 0.
And for libs it makes sense to have a debug area, so that it can be turned
off.

> In addition when I actually want to find
> the place where a debug message has come from, I have to grep
> the whole sourcetree or guess where it might be. I don't have time to play
> games and try to guess where a debug message might be located in the
source.
> It should just tell me. 
Granted.

> > The rest of the time, debug output
> > from most libraries would be turned off as well, and only turned
> > on when debugging a particular library.
> 
> That's not how it is now.
!!! I suggested the improvement and said I would do it !
Don't you trust me I'll do it ?
I haven't done it yet because I feel that it's not yet decided whether
we keep it or not, I wouldn't want to waste my time on this for nothing.

> > This would be a lot easier than keeping adding and removing 
> > debug output from the apps all the time, which we do currently.
> 
> the debug output is right now removed because it slows things down,
> especially when kdebug is used. 
... and compiling everything with debug info eats a lot of memory,
makes the machine swap, and in the end slows it down as well.

> nana seems to be nicer because it only slows down when the code is
compiled
> with debug information and it actually makes sense to search for bugs. 
I have a completely different opinion on this, because I don't want
to recompile all of KDE with debug info just to find a bug that
a printf would show me !
But it seems we have completely different ways to debug...

> Anyway, there's no need to discuss. In either way nana and kdebug can be
> used in parallel, so it's just a matter of taste which one to prefer. 
Not really. Isn't it better if only one way is used in the libraries ?

With nana, it's really a "everything or nothing" situation
(depending on -g). You can't turn off every lib except the one you're
debugging,
or turn on the lib your program is using a lot and you want to know what's
happening in that lib, and in your program.

--
David Faure
faure@kde.org - KDE developer
david@mandrakesoft.com - Mandrake
david.faure@cramersystems.com - Cramer Systems

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic