Program execution breakpoints
[Debugging Mechanisms]

Program execution breakpoints. More...HEL Library provides an easy to use mechanism to set program execution breakpoints, which are automatically turned off when you switch to releasemode. Please note that these breakpoints currently only work with NO$GBA emulator!

Using such a breakpoint is easy, you just need HEL_DEBUG_BRK

Example:

The following example shows how to stop the program execution using HEL_DEBUG_BRK:

static void ATTR_NOINLINE ATTR_USED DummyFunction()
{
}

int main(void)
{
    ham_Init();

    // Stop program execution!
    HEL_DEBUG_BRK;
    
    DummyFunction();

    for(;;) 
    {
        // Infinite loop
    }

    return 0;
}

The program execution is stopped after ham_Init and before DummyFunction gets called. NO$GBA halts at this point and displays the sourcecode in its debugger-window:

debug_brk0.png

Note:
If you use HEL Library breakpoint implementation with another emulator than No$gba, it will just leave the corresponsing opcode away, assuming you specified what emulator you use (see Debug Message Functions) and therfore will not halt at the specified position.
Requirements: No$gba shareware or full version. "Source Code Breakpoints" must be turned on in the No$gba Xcept setup.
Generated on Mon Apr 9 16:39:01 2007 for HEL Library by  doxygen 1.5.1