gem5
v20.1.0.0
|
These methods and macros provide access to gem5's logging system. More...
Macros | |
#define | panic(...) exit_message(::Logger::getPanic(), __VA_ARGS__) |
This implements a cprintf based panic() function. More... | |
#define | fatal(...) exit_message(::Logger::getFatal(), __VA_ARGS__) |
This implements a cprintf based fatal() function. More... | |
#define | panic_if(cond, ...) |
Conditional panic macro that checks the supplied condition and only panics if the condition is true and allows the programmer to specify diagnostic printout. More... | |
#define | fatal_if(cond, ...) |
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condition is true and allows the programmer to specify diagnostic printout. More... | |
#define | chatty_assert(cond, ...) |
The chatty assert macro will function like a normal assert, but will allow the specification of additional, helpful material to aid debugging why the assertion actually failed. More... | |
#define | hack_once(...) base_message_once(::Logger::getHack(), __VA_ARGS__) |
#define | warn_if_once(cond, ...) |
These methods and macros provide access to gem5's logging system.
#define chatty_assert | ( | cond, | |
... | |||
) |
The chatty assert macro will function like a normal assert, but will allow the specification of additional, helpful material to aid debugging why the assertion actually failed.
NDEBUG.
Like the normal assertion, the chatty_assert will not be active in fast builds.
cond | Condition that is checked; if false -> assert |
... | Printf-based format string with arguments, extends printout. |
Definition at line 292 of file logging.hh.
#define fatal | ( | ... | ) | exit_message(::Logger::getFatal(), __VA_ARGS__) |
This implements a cprintf based fatal() function.
fatal() should be called when the simulation cannot continue due to some condition that is the user's fault (bad configuration, invalid arguments, etc.) and not a simulator bug. fatal() might call exit, unlike panic().
Definition at line 183 of file logging.hh.
#define fatal_if | ( | cond, | |
... | |||
) |
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condition is true and allows the programmer to specify diagnostic printout.
Useful to replace if + fatal, or if + print + assert, etc.
cond | Condition that is checked; if true -> fatal |
... | Printf-based format string with arguments, extends printout. |
Definition at line 219 of file logging.hh.
#define hack_once | ( | ... | ) | base_message_once(::Logger::getHack(), __VA_ARGS__) |
Definition at line 245 of file logging.hh.
#define panic | ( | ... | ) | exit_message(::Logger::getPanic(), __VA_ARGS__) |
#define panic_if | ( | cond, | |
... | |||
) |
Conditional panic macro that checks the supplied condition and only panics if the condition is true and allows the programmer to specify diagnostic printout.
Useful to replace if + panic, or if + print + assert, etc.
cond | Condition that is checked; if true -> panic |
... | Printf-based format string with arguments, extends printout. |
Definition at line 197 of file logging.hh.
#define warn_if_once | ( | cond, | |
... | |||
) |
Definition at line 269 of file logging.hh.