#ifndef __BOCHS_NON_VERBOSE_AH__ #define __BOCHS_NON_VERBOSE_AH__ #include "config/FailConfig.hpp" #ifdef CONFIG_BOCHS_NON_VERBOSE #include "bochs.h" /* // Doesn't work because AspectC++ doesn't deal properly with variadic parameter // lists: aspect BochsNonVerbose { // Needed to suppress Bochs output *before* a state restore finished // FIXME: ac++ segfaults if we use call() instead of execution(). advice execution("% logfunctions::debug(...)") || execution("% logfunctions::info(...)") || execution("% logfunctions::pass(...)") || execution("% logfunctions::error(...)") : around () { } }; */ aspect BochsNonVerbose { // needed to suppress Bochs output *before* a state restore finished advice call("int logfunctions::get_default_action(int)") : around () { int action; switch (*(tjp->arg<0>())) { case LOGLEV_DEBUG: case LOGLEV_PASS: case LOGLEV_INFO: action = ACT_IGNORE; break; case LOGLEV_ERROR: action = ACT_REPORT; break; case LOGLEV_PANIC: default: action = ACT_FATAL; } *(tjp->result()) = action; } // No credits header advice call("void bx_print_header()") : around () { } }; #endif // CONFIG_BOCHS_NON_VERBOSE #endif // __BOCHS_NON_VERBOSE_AH__