1 /* 2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 3 ** Distributed under the terms of the NewOS License. 4 */ 5 #ifndef _KERNEL_DEBUG_H 6 #define _KERNEL_DEBUG_H 7 8 9 #include <OS.h> 10 11 struct kernel_args; 12 13 14 #if DEBUG 15 # define ASSERT(x) \ 16 if (x) {} else { panic("ASSERT FAILED (%s:%d): %s\n", __FILE__, __LINE__, #x); } 17 #else 18 # define ASSERT(x) 19 #endif 20 21 extern int dbg_register_file[B_MAX_CPU_COUNT][14]; 22 /* XXXmpetit -- must be made generic */ 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 extern int dbg_init(struct kernel_args *ka); 29 extern int dbg_init2(struct kernel_args *ka); 30 extern char dbg_putch(char c); 31 extern void dbg_puts(const char *s); 32 33 extern void _user_debug_output(const char *userString); 34 35 #ifdef __cplusplus 36 } 37 #endif 38 39 #endif /* _KERNEL_DEBUG_H */ 40