Main Page | Modules | File List | File Members

debug.c

00001 /* ndk - [ debug.c ]
00002  *
00003  * Code I use occasionally to debug the
00004  * ndk kernel.  Makes life a little
00005  * easier ;)
00006  *
00007  * (c)2002 dcipher / neuraldk
00008  *           www.neuraldk.org
00009  */
00010 
00011 #include "debug.h"
00012 
00013 void debugEnter(char *func, char *pattern, ...) {
00014 #ifdef DEBUG_ENTER_LEAVE
00015   char **arg = (char **) &pattern;
00016 
00017   arg++;
00018 
00019   consoleOut("+ %s: [", func);
00020   consoleOut(pattern, arg);
00021   consoleOut("]\n");
00022 #endif
00023   return;
00024 }
00025 
00026 void debugLeave(char *func, char *pattern, ...) {
00027 #ifdef DEBUG_ENTER_LEAVE
00028   char **arg = (char **) &pattern;
00029 
00030   arg++;
00031 
00032   consoleOut("- %s: [", func);
00033 
00034   if(pattern)
00035     consoleOut(pattern, arg);
00036   else
00037     consoleOut("void");
00038 
00039   consoleOut("]\n");
00040 #endif
00041   return;
00042 }

Generated on Sun Nov 21 18:26:11 2004 for ndk by doxygen 1.3.2