1 #ifndef __KERNEL_DEBUG_H_
2 #define __KERNEL_DEBUG_H_
4 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
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>
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
, ...)
33 va_start(args
, format
);
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,
40 krnBug(format
, args
, kernelBase
);
45 #define bug(...) _bug(KernelBase, __VA_ARGS__)
46 #define nbug(...) _bug(NULL, __VA_ARGS__)