lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] debugging issues


From: Kieran Mansley
Subject: Re: [lwip-users] debugging issues
Date: Mon, 7 Jul 2003 09:24:56 +0100 (BST)

On Thu, 3 Jul 2003, Robert wrote:

> On Thu, 3 Jul 2003, Zschocke, Florian wrote:
> > It's me again, this time picking at the lwIP debugging system. :) While it
> > is already pretty advanced with its different levels and options, I think it
> > still has some deficiencies that I'd like to attack.
>
> If I get a vote in this, I vote *not* to add more features to the debug
> system, it's already too complicated.  I would vote for removing features
> actually.  Here is one possible scheme:  (disclaimer, the code below is
> intended to show my suggestion conceptually but has not actually
> been tested.)

I've had a quick look at your scheme and to be honest I think it's more
complex than the one already in place.  Important properties of a debug
scheme (in my opinion) are:

1) Trivial to ensure that all messages are compiled out when you want to.

2) Really easy to know that a debug message will or will not "fire". ie.
It's no use if when a message isn't printed it's because of the complexity
of the clause (or some bug elsewhere) rather than that bit of code not
getting executed.  This is why I don't like run time modifiable stuff -
there's just too much that could go wrong, and when I'm debugging I don't
want to have to debug the debug routines too!

3) Ability to set both general and fine grained messages - this is
definitely a strength of your scheme.

4) Very low impact - not so important for messages which are printed out
as the printf dwarfs everything else, but for messags which are not
printed the probe effect should be minimal to ensure it doesn't interfere
(through added delay) with the bug that is being tracked.

However, as I'm not a day to day user of lwIP maybe my thoughts shouldn't
carry much weight!

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]