2 * This file contains useful redefinition of bug() macro which uses
3 * kernel.resource's own debugging facilities. Include it if you
4 * need bug() in your code.
7 #include <aros/asmcall.h>
8 #include <aros/libcall.h>
15 int krnPutC(int chr
, struct KernelBase
*KernelBase
);
16 int krnBug(const char *format
, va_list args
, APTR kernelBase
);
17 void krnDisplayAlert(const char *text
, struct KernelBase
*KernelBase
);
18 void krnPanic(struct KernelBase
*KernelBase
, const char *fmt
, ...);
20 static inline void _bug(APTR kernelBase
, const char *format
, ...)
24 va_start(args
, format
);
27 * We use internal entry here. This is done because this function can be used
28 * during early boot, while KernelBase is NULL. However it's still passed,
31 krnBug(format
, args
, kernelBase
);
36 #define bug(...) _bug(KernelBase, __VA_ARGS__)
37 #define nbug(...) _bug(NULL, __VA_ARGS__)