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