2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
9 * This file contains useful redefinition of bug() macro which uses
10 * kernel.resource's own debugging facilities. Include it if you
11 * need bug() in your code.
14 #ifndef __KERNEL_DEBUG_H_
15 #define __KERNEL_DEBUG_H_
17 #include <aros/asmcall.h>
18 #include <aros/libcall.h>
25 int krnPutC(int chr
, struct KernelBase
*KernelBase
);
26 int krnBug(const char *format
, va_list args
, APTR kernelBase
);
27 void krnDisplayAlert(const char *text
, struct KernelBase
*KernelBase
);
28 void krnPanic(struct KernelBase
*KernelBase
, const char *fmt
, ...);
30 static inline void _bug(APTR kernelBase
, const char *format
, ...)
34 va_start(args
, format
);
37 * We use internal entry here. This is done because this function can be used
38 * during early boot, while KernelBase is NULL. However it's still passed,
41 krnBug(format
, args
, kernelBase
);
46 #define bug(...) _bug(KernelBase, __VA_ARGS__)
47 #define nbug(...) _bug(NULL, __VA_ARGS__)