MorphOS Developer
Posts: 1520 from 2003/2/24
From: Finland
Quote:
tolkien wrote:
My toys are easy to debug for pro coders but they are growing and Its tedious to use printf everywhere. Can we have gdb or similar tools to debug our babys?
How do you do it?
Using serial debug. That is, adding NewRawDoFmt("DEBUG PRINT", (APTR)1, NULL, ...) to interesting locations. In PowerSDL development I can build debug builds with debug prints enabled and analyze program flow.
Sometimes it could be useful to add break points (although it is not always safe on Amiga) and I workaround it using those debug prints to see what is going on.
If there is a hit I take chunk offset and dump (objdump --disassemble-all --reloc executable >executable.s) my program to find out where in the code that hit took place. It is sometimes tedious since I only get function name but not exact location (line number) to my code. If functions is longer I have to analyze it further from disassembly.
1 + 1 = 3 with very large values of 1