debug.h File Reference

Header file for debug.c. More...

Go to the source code of this file.

Define for debugging prints

#define NDEBUG
#define ___trace_on()
#define ___trace_off()
#define ___reg_view()
#define ___halt()
#define ___stop()
#define ASSERT(EXPR)
 assert macro
#define assert(expr)   do {} while (0)
 assert macro

Dprintk functions

if NDEBUG not defined assert prints function name and line number followed by the string ARGS and values printed by printk

#define dprintk(ARGS)
#define dprintk1(ARGS, A1)
#define dprintk2(ARGS, A1, A2)
#define dprintk3(ARGS, A1, A2, A3)
#define dprintk4(ARGS, A1, A2, A3, A4)
void panic (const char *format,...)
 Kernel panic function.


Detailed Description

Header file for debug.c.

Debugging macros

debugging info NDEBUG - no debugging DEBUG - automatically set up when NDEBUG not defined


Define Documentation

 
#define ___halt (  ) 

Value:

__asm__ __volatile__ (                  \
        "       .insn                   \n"     \
        "       .word   0x28            \n"     \
        )
Instructs the simulator to stop execution and exit.

 
#define ___reg_view (  ) 

Value:

__asm__ __volatile__ (                  \
        "       .insn                   \n"     \
        "       .word   0x37            \n"     \
        )
Instructs the simulator to dump the contents of the general registers on the console.

 
#define ___stop (  ) 

Value:

__asm__ __volatile__ (                  \
        "       .insn                   \n"     \
        "       .word   0x29            \n"     \
        )
Instructs the simulator to stop execution and enter interactive mode.

 
#define ___trace_off (  ) 

Value:

__asm__ __volatile__ (                  \
        "       .insn                   \n"     \
        "       .word   0x3d            \n"     \
        )
Turns off the trace mode of the simulator.

 
#define ___trace_on (  ) 

Value:

__asm__ __volatile__ (                  \
        "       .insn                   \n"     \
        "       .word   0x39            \n"     \
        )
Turns on the trace mode of the simulator.

#define assert ( expr   )     do {} while (0)

assert macro

Parameters:
expr - expression to evaluate if NDEBUG not defined assert evaluates the expression, else assert omitted when expression equal to zero, assert calls panic with function name, file name and line info

#define ASSERT ( EXPR   ) 

assert macro

Parameters:
EXPR - expression to evaluate if NDEBUG not defined assert evaluates the expression, else assert omitted when expression equal to zero, assert calls panic with function name, file name and line info

#define NDEBUG

}@


Function Documentation

void panic ( const char *  format,
  ... 
)

Kernel panic function.

Parameters:
format - formatted string same as printk
... - arguments
Print formated null-terminated string, print current running thread ID, print CPU registers and halt machine.


Generated on Wed Nov 15 17:25:43 2006 for Kalisto by  doxygen 1.4.7