Files
fail/core/SAL/bochs/stfu.ah
hsc 97534f7a19 treat AspectConfig like other configuration headers
This is temporary; we need a proper configuration tool for this.
 - AspectConfig.hpp moves to config/AspectConfig.hpp.in
 - generate configuration in build tree

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@958 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-03-08 22:54:05 +00:00

55 lines
1.1 KiB
Plaintext

#ifndef __NONVERBOSE_AH__
#define __NONVERBOSE_AH__
#include "config/AspectConfig.hpp"
#ifdef CONFIG_STFU
#include "bochs.h"
// Doesn't work because AspectC++ doesn't deal properly with variadic parameter
// lists:
/*
aspect nonverbose {
// 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 nonverbose {
// 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
#endif