diff options
author | Stephan Diestelhorst <stephan.diestelhorst@arm.com> | 2014-03-07 15:56:23 -0500 |
---|---|---|
committer | Stephan Diestelhorst <stephan.diestelhorst@arm.com> | 2014-03-07 15:56:23 -0500 |
commit | 45677ffa97e44816881b9ec636d11798eb100fcb (patch) | |
tree | 1efa017279b6c5acc5b1abd87d03d2d0ab66830c /src/base/hostinfo.hh | |
parent | b9a9d99b226768dc972f0c40488f332066396e69 (diff) | |
download | gem5-45677ffa97e44816881b9ec636d11798eb100fcb.tar.xz |
misc: Add panic_if / fatal_if / chatty_assert
This snippet can be used to replace if + {panics, fatals, asserts} constructs.
The idea is to have both the condition checking and a verbose printout in a single statement. The interface is as follows:
panic_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar);
fatal_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar);
chatty_assert(foo == bar, "These should be equal: foo %i bar %i", foo, bar);
Diffstat (limited to 'src/base/hostinfo.hh')
0 files changed, 0 insertions, 0 deletions