[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: Mirko Sucker <mirko.sucker () unibw-hamburg ! de>
Date: 1999-12-21 17:52:41
[Download RAW message or body]
"Dirk A. Mueller" wrote:
> 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.
> 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.
Well, it is up to you to decide what implementation you use. If there
are some people (there are quite a number of them) that like areas, this
5kBytes of code should remain.
> the debug output is right now removed because it slows things down,
> especially when kdebug is used.
>
> 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.
from kdebug.h:
#ifdef kdebug
#undef kdebug
#endif
#ifdef NDEBUG
#define kdebug kdebug_null
#endif
...
from kdebug.cpp:
void kdebug_null( ushort /*nLevel*/, ushort /*nArea*/,
const char* /*pFormat*/, ... )
{
return;
}
When compiling with NDEBUG, every compiler should not even create the
call to kdebug_null.
Greetings,
--Mirko.
--
Denn der Mensch liebt und ehrt den Menschen, solange er ihn
nicht zu beurteilen vermag, und die Sehnsucht ist ein Erzeugnis
mangelhafter Erkenntnis. (Thomas Mann)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic