-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/2164/
-----------------------------------------------------------

(Updated Feb. 27, 2014, 1:51 p.m.)


Review request for Default.


Summary (updated)
-----------------

misc: Add panic_if / fatal_if replacement for if(foo) ... assert(!foo)


Repository: gem5


Description (updated)
-------

Changeset 10097:fc78856486a9
---------------------------
misc: Add panic_if / fatal_if replacement for if(foo) ... assert(!foo)

This snippet can be used to replace asserts and have them behave like if +
panic constructs. The interface is as follows:

panic_if(foo != bar, "These should be equal: foo %i bar %i", foo, bar);

panic_unless would be a more straightforward replacement for assert, but is
more clumsy than panic_if(!foo,...).


Diffs (updated)
-----

  src/base/misc.hh 9c55c0214404 

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

Reply via email to