update the nightly configuration for x68_64 target to the newest toolchain. (NicJA)
[AROS.git] / rom / kernel / kernel_debug.h
blobb273705ab608d1ce7a99f5446c1c958ef5356f8b
1 #ifndef __KERNEL_DEBUG_H_
2 #define __KERNEL_DEBUG_H_
3 /*
4 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
5 $Id$
7 Desc:
8 */
11 * This file contains useful redefinition of bug() macro which uses
12 * kernel.resource's own debugging facilities. Include it if you
13 * need bug() in your code.
16 #include <aros/asmcall.h>
17 #include <aros/libcall.h>
18 #include <stdarg.h>
20 #ifdef bug
21 #undef bug
22 #endif
24 int krnPutC(int chr, struct KernelBase *KernelBase);
25 int krnBug(const char *format, va_list args, APTR kernelBase);
26 void krnDisplayAlert(const char *text, struct KernelBase *KernelBase);
27 void krnPanic(struct KernelBase *KernelBase, const char *fmt, ...);
29 static inline void _bug(APTR kernelBase, const char *format, ...)
31 va_list args;
33 va_start(args, format);
35 /*
36 * We use internal entry here. This is done because this function can be used
37 * during early boot, while KernelBase is NULL. However it's still passed,
38 * just in case.
40 krnBug(format, args, kernelBase);
42 va_end(args);
45 #define bug(...) _bug(KernelBase, __VA_ARGS__)
46 #define nbug(...) _bug(NULL, __VA_ARGS__)
47 #endif