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