lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #6519] Some small debug enhancements


From: Jonathan Larmour
Subject: [lwip-devel] [patch #6519] Some small debug enhancements
Date: Mon, 26 May 2008 00:30:08 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060513 Fedora/1.0.8-1.1.fc3.1.legacy Firefox/1.0.8

Follow-up Comment #1, patch #6519 (project lwip):

Unfortunately I disagree with the stats_display() parts of the patch, as this
will cause the stats_display() function (with dependency on printf - a very
large function) to be included on any debugging build when stats are being
collected. On small targets the stats are collected solely for display by a
debugger as printf etc. will not fit. We should not usually be requiring
people to change code on small targets, only configuring via lwipopts.h. I
have ports which would no longer fit if printf were included.

For people with lots of memory, running out of memory is something to be
avoided. But for people on small targets, it's expected. So the change of the
debug message to LWIP_DEBUGF(1,....) when running out is not universally
useful, and will just result in lots of unwanted output on those targets. I
don't see any reason why it shouldn't keep the MEMP_DEBUG. After all, at
present it's the only LWIP_DEBUGF affected by MEMP_DEBUG anyway! Maybe it
would be ok to change the default of MEMP_DEBUG to LWIP_DBG_ON in
include/lwip/opt.h, but that would make it the only exception.

I think the etharp.c is ok in principle, but in practice it is not portable
as the struct eth_addr array fields are chars, but %02x will be expecting
something of type 'unsigned int'. I expect this to cause warnings on many
compilers. You would need to cast each argument to (unsigned).


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6519>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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