The Socrates Gameboy Advance Development Engine
The SGADE is a development library for the Nintendo Gameboy
Advance. It's free for all uses and is distributed without guarantees.
For more information visit
the SGADE page.
Files | |
| file | SoDebug.c |
| file | SoDebug.h |
| file | SoDebugPrintf.c |
Defines | |
| #define | SO_DEBUG |
| Undefine this (comment it) if you are going to do a release build;. | |
| #define | SO_ASSERT(a_Assertion, a_Message) |
| Define that controls what system the debugprint should use. Assertion macro. | |
| #define | SO_DEBUG_PRINT(a_String) |
| Prints debug messages;. | |
| #define | SO_DEBUG_PRINT_INT_VALUE(a_Var) |
| prints integer value | |
| #define | SO_DEBUG_PRINT_CHAR_VALUE(a_Var) |
| prints character value | |
| #define | SO_DEBUG_PRINT_STRING_VALUE(a_Var) |
| prints string value | |
| #define | SO_COMPILE_TIME_ASSERT(a_Assertion, a_Message) |
| generates a breakpoint (BATGBA only) Compile-time assertion. | |
| #define | SO_DEPRECATED_FUNCTION(a_FunctionName, a_Message) |
| Deprecated function declaration macro. | |
Functions | |
| char * | dstrcpy (u8 *strdst, const u8 *strsrc) |
| debug helper: copy string | |
| char * | dstrcpynum (u8 *strdst, s32 value, int base) |
| debug helper: copy number to string | |
| u16 | dstrlen (const u8 *str) |
| debug helper: string length | |
| u16 | dstrnlen (const u8 *str, u16 count) |
| debug helper: string length | |
| char * | ditoa (s32 num, char *buf, int len, int base) |
| debug helper: convert integer to string | |
| int | dsprintf (char *buf, const char *fmt,...) |
| sprintf function to support debugging | |
| int | dvsprintf (char *buf, const char *fmt, va_list args) |
| vsprintf function to support debugging | |
| void | SoDebugPrintIntValue (const char *a_Name, s32 a_Value, int base) |
| debug helper: print 'watch' for a number | |
| void | SoDebugAssert (bool a_Assertion, char *a_Message, char *a_Expression, char *a_File, u32 a_Line) |
| Called by the SO_ASSERT macro in debug builds. | |
| void | SoDebugPrintf (const char *a_Format,...) |
| Print formatted output;. | |
| void | SoDebugPrint (const char *a_Message) |
| This prints a debug message depending on the running environment;. | |
| void | SoDebugPrintCharValue (const char *a_Name, char a_cValue) |
| debug helper: print 'watch' for a character | |
| void | SoDebugPrintStringValue (const char *a_Name, const char *a_szValue) |
| debug helper: print 'watch' for a string | |
| void | SoDebugDumpWordBuffer (const char *a_szDescription, u16 *a_pBuffer, u16 a_iCount) |
| debug helper: print a 'watch' for a binary block | |
Variables | |
| char | s_DebugBuffer [256] |
| Temporary buffer for debug print output. | |
Singleton
This module contains all stuff related to debugging, like debug-output, assertions, etc.
|
|
Define that controls what system the debugprint should use. Assertion macro.
In release builds (when SO_DEBUG is not defined) these assertions are removed by the preprocessor. |
|
|
generates a breakpoint (BATGBA only) Compile-time assertion.
|
|
|
Undefine this (comment it) if you are going to do a release build;.
When this is not defined then assertions are optimized away, as well as some other stuff that is done. It's all magic :) hehe... However, you can always be sure that if something works in debug mode, it WILL work in release mode too. |
|
|
Prints debug messages;.
In release builds (when SO_DEBUG is not defined) these debug prints are removed by the preprocessor. |
|
|
Deprecated function declaration macro.
|
|
||||||||||||||||||||
|
debug helper: convert integer to string
|
|
||||||||||||||||
|
sprintf function to support debugging
|
|
||||||||||||
|
debug helper: copy string
|
|
||||||||||||||||
|
debug helper: copy number to string
|
|
|
debug helper: string length
|
|
||||||||||||
|
debug helper: string length
|
|
||||||||||||||||
|
vsprintf function to support debugging
|
|
||||||||||||||||||||||||
|
Called by the SO_ASSERT macro in debug builds.
For internal use only.
|
|
||||||||||||||||
|
debug helper: print a 'watch' for a binary block
|
|
|
This prints a debug message depending on the running environment;.
|
|
||||||||||||
|
debug helper: print 'watch' for a character
|
|
||||||||||||
|
Print formatted output;.
|
|
||||||||||||||||
|
debug helper: print 'watch' for a number
|
|
||||||||||||
|
debug helper: print 'watch' for a string
|
|
|
Temporary buffer for debug print output.
For internal use only.
|