This wiki is being migrated to http://www.github.com/z88dk/z88dk/wiki

User Tools

Site Tools


debugging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

debugging [2012/10/02 14:57] (current)
Line 1: Line 1:
 +====== Debugging Tips ======
 +
 +===== C language =====
 +
 +  * <to be completed>
 +
 +  * [External article related to programming in general[http://www.cprogramming.com/debugging/debugging_strategy.html]]
 +
 +
 +===== Hunting assembly code or compiler bugs =====
 +
 +The [[library:debug|debug library]] features some runtime inspection tool, to inspect the stack content at a certain time, display a block of data directly on the device or a full disassembly of a code portion.
 +
 +On the external side, when cross-compiling, consider that the zcc framework shows any single step of the compilation process.   The temporary files are automatically deleted, but by simply copying/pasting the same commands they can be created permanently and edited by standard text editors.
 +The most interesting file is the one obtained by the last optimization step (the one with the '.opt' extension): it is the optimized assembly language program just before being assembled and linked in.
 +Just locate the first call to 'z80asm', the last parameter is the file name we're looking for; in example:
 +
 +z80asm -eopt -ns -Mo -Ic:/z88dk/lib **C:\Users\us01580\AppData\Local\Temp\saeg_2.opt**
 +
  
debugging.txt ยท Last modified: 2012/10/02 14:57 (external edit)