xref: /haiku/src/system/boot/platform/openfirmware/debug.cpp (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2003-2010, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <stdarg.h>
8 
9 #include <boot/platform.h>
10 #include <boot/stdio.h>
11 #include <platform/openfirmware/openfirmware.h>
12 
13 
14 extern "C" void
15 panic(const char* format, ...)
16 {
17 	// TODO: this works only after console_init() was called.
18 	va_list list;
19 
20 	puts("*** PANIC ***");
21 
22 	va_start(list, format);
23 	vprintf(format, list);
24 	va_end(list);
25 
26 	of_exit();
27 }
28 
29 
30 extern "C" void
31 dprintf(const char* format, ...)
32 {
33 	va_list list;
34 
35 	va_start(list, format);
36 	vprintf(format, list);
37 	va_end(list);
38 }
39 
40 
41 char*
42 platform_debug_get_log_buffer(size_t* _size)
43 {
44 	return NULL;
45 }
46