Rockbox

Tasklist

FS#10366 - Optional debug output for sound.c

Attached to Project: Rockbox
Opened by Jeffrey Goode (Blue_Dude) - Monday, 22 June 2009, 00:38 GMT
Last edited by Thomas Martitz (kugel.) - Monday, 22 June 2009, 18:51 GMT
Task Type Patches
Category Simulator
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Replaces debug output with optional log output. Output is enabled by uncommenting a define statement. Disabled by default.
This task depends upon

Closed by  Thomas Martitz (kugel.)
Monday, 22 June 2009, 18:51 GMT
Reason for closing:  Rejected
Additional comments about closing:  Committed the last patch targetting a cleanup in r21467.

We agreed on not needing (=rejecting) the initial patch though.
Comment by Dave Chapman (linuxstb) - Monday, 22 June 2009, 09:04 GMT
I tried to talk to you about this in IRC last night, but we missed each other. I asked why these patches don't simply replace DEBUGF with logf and you replied a couple of hours later saying " There's no problem with that, except it would be nice to turn off logf when not building for a simulator".

By default, logf _is_ turned off when building for a real target. You need to explicitly enable it (in the Advanced options in configure, or by #defining ROCKBOX_HAS_LOGF in autoconf.h).

It doesn't seem optimal that these patches (including the two that have been committed already) add yet another debugging macro (LOGFQUEUE).
Comment by Jeffrey Goode (Blue_Dude) - Monday, 22 June 2009, 12:42 GMT
This is true. But it's also true that it's easy to miss the enable define when building for a real target. The macro I put in is automatically disabled even if logf is mistakenly left active. OK, that's pretty weak, but when I saw the macro construction in another file it seemed like a good idea.

I'll modify the patches and post them here.
Comment by Jeffrey Goode (Blue_Dude) - Monday, 22 June 2009, 13:10 GMT
This should fix all of them.
Comment by Jeffrey Goode (Blue_Dude) - Monday, 22 June 2009, 17:08 GMT
Upon further discussion, sound.c doesn't need patching, but the other two need cleanup. Here's the cleanup.

Loading...