-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/2164/
-----------------------------------------------------------
(Updated March 6, 2014, 3:25 p.m.)
Review request for Default.
Summary (updated)
-----------------
misc: Add panic_if / fatal_if / chatty_assert
Repository: gem5
Description (updated)
-------
Changeset 10104:4d3c10cadce3
---------------------------
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);
Diffs (updated)
-----
src/base/misc.hh 24cfe67c0749
Diff: http://reviews.gem5.org/r/2164/diff/
Testing
-------
All regressions pass (as it does not affect existing code).
Thanks,
Andreas Hansson
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev