28 #ifndef __LIB_DEBUG_H__
29 #define __LIB_DEBUG_H__
34 #ifndef ARM_ARCH_ARMV7
40 typedef char *va_list;
42 #define ALIGNBND (sizeof (signed int) - 1)
43 #define bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
44 #define va_arg(ap, T) \
45 (*(T *)(((ap) += (bnd (T, ALIGNBND))) - (bnd (T,ALIGNBND))))
46 #define va_end(ap) (void) 0
47 #define va_start(ap, A) \
48 (void) ((ap) = (((char *) &(A)) + (bnd (A,ALIGNBND))))
52 #define CARRIAGE_RETURN 0xD
53 #define PRINTABLE_START 0x20
54 #define PRINTABLE_END 0x7E
58 __attribute((noreturn)) void
DIE_NOW(
void * context,
char* msg);
69 u32 sw_printf(const
char *fmt, ...);
90 u32
sw_vsprintf(
char *buf, const
char *fmt, va_list args);
107 void DIE_NOW(
void* context,
char* msg);
u32 sw_printk(const char *fmt,...)
Writes directly to device, with no permission check.
Definition: sw_debug.c:71
int printable_char(char c)
Checks for printable character.
Definition: sw_debug.c:337
u32 sw_vsprintf(char *buf, const char *fmt, va_list args)
Definition: sw_debug.c:101
void DIE_NOW(void *context, char *msg)
Prints the error message and goes on infinte loop.
Definition: sw_debug.c:356