Main Page | Modules | Related Pages

Program execution breakpoints

HEL 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 are currently only supported by NO$GBA emulator and must be explicit turned on!

Using such a breakpoint is easy, all you need is HEL_DEBUG_BRK

Example:

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

int main()
{
  ham_Init();
  
  // stop program execution!
  HEL_DEBUG_BRK;
  
  while(GameIsRunning)
  {
    // some fancy stuff ...
  }
  
  return 0;
}

The program execution is stopped after ham_Init and before the while-loop. NO$GBA halts at this point and displays the assembler sourcecode in its debugger-window where you then can step through:

debug_brk0.png

Note:
If you use HEL's 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 Output) and therfore will not halt at the position where the breakpoint is set.
Requirements:

NO$GBA shareware or professional version. "Source Code BReakpoints" must be turned on in no$gba Xcept setup.


Generated on Mon Oct 3 15:44:52 2005 by DoxyGen 1.4.4