Debug Message Output

Debug Message Output macros. More...

Defines

#define HEL_DEBUG_MSG(txt, args...)
 Output a string into Debug-Message-Output window.

Functions

void hel_DebugSetMessageType (u32 MessageType)
 Select debug message type.

Detailed Description

Debug Message Output macros.

HEL Library provides an easy to use mechanism to output formatted debug messages, which are automatically turned off when you switch to release mode.

The Debug-Message-System supports no$gba and VisualBoy Advance Debug-Messages. The maximum supported debug message string length is 120 characters. If you pass a text that is longer than that, HEL Library will display an assertion screen and abort program execution (in debug mode). However, if you have a construct like below, where pszLongText points to a text that is longer than 120 characters, HEL does not display an assertion screen and it is very likely that memory gets overwritten at some random address and this leads to hard to find bugs:

HEL_DEBUG_MSG("%s", pszLongText);

As earlier mentioned, HEL Library supports no$gba and VisualBoy Advance Debug-Messages. To activate on of those, simply use hel_DebugSetMessageType.

See also:
Library Overview
Attention:
VisualBoy Advance Debug-Messages do not work on real hardware!

NO$GBA Debug-Messages require either the shareware or full version of NO$GBA.


Define Documentation

#define HEL_DEBUG_MSG ( txt,
args...   ) 

Output a string into Debug-Message-Output window.

The HEL_DEBUG_MSG macro can be used to output debug messages.

Parameters:
[in] txt Format-control string.
[in] args Optional arguments

Example:
HEL_DEBUG_MSG("Hello World\n");
HEL_DEBUG_MSG("I am %d years old.\n", 28);

The preceding code will output:

Hello World
I am 28 years old.

Note:
Calls to HEL_DEBUG_MSG get removed by the C preprocessor in release mode.


Function Documentation

void hel_DebugSetMessageType ( u32  MessageType  ) 

Select debug message type.

The hel_DebugSetMessageType selects the debug message output for either VisualBoy Advance or no$gba emulator. To turn off debug messages completely, you must rebuild the project in release mode. See Library Overview for more details on this.

Parameters:
[in] MessageType Message type to activate. This can be one of the following:
  • DEBUG_MESSAGETYPE_VBA
  • DEBUG_MESSAGETYPE_NOCASH
See also:
Debug Message Output


Generated on Sat Aug 12 13:54:08 2006 for HEL 2 Library by  doxygen 1.4.7