Rockbox mail archiveSubject: Re: anyway to write debug output to a file?
Re: anyway to write debug output to a file?
From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Fri, 05 Mar 2004 17:54:29 +0100
John Covici wrote:
> If I need to debug things and I don't want to take my Archos (fm)
> apart, but is there anyway I can write the debugging output to a disk
> file -- I have been looking at the code and if I am correct it now
> writes to standard error --so is it correct if I put some init code
> to open a file and change standard error to a handle would that work?
No. All debug output is disabled by the preprocessor at compile time.
The debug output is only for the simulator of for GDB over a serial port.
Use the standard file API:
fh = open("filename.log", O_WRONLY | O_APPEND);
fprintf(fh, "Bla debug value: %d\n", 23);
Received on 2004-03-05