Talk:Debugging

From wiki.gp2x.org

Consider what the following two lines did:

mount /mnt/sd -o remount,sync ./app.gpe 1>stdout.txt 2>stderr.txt

Each time there is a 'line' of log update, the information will be written to SD card immediately. The problem here is SD card was made by NAND flash which got limited lifetime. A few bytes of updates (say, a line "now run at line 1200 in foo.gpe") will resultant in 1 single write action to SD card. I have no idea how many times of such writing actions can be achieved for a SD card. But it definitely not a good thing if there are many lines to log each time and lengthy process during development.

You're right - we can safely not remount the sd. i added the line to ensure i still have a log if my app crashes. then i realized we have linux and a crash most probably won't bring down the entire machine (but might leave us without a shell atm). Changed it. -no_skill 08:55, 12 January 2006 (PST)

Some Cleanup

More detailed information would be nice here, as would a general debugging tutorial.

If anyone can work out what

In that case, the LD_TRACE_LOADED_OBJECTS option will probably apply to gp2xmenu, if your program calls exec() at the end of main().

means, then feel free to add it back in :) Justthisguy 05:18, 12 December 2006 (PST)

Personal tools