> On Feb. 24, 2014, 1:13 a.m., Steve Reinhardt wrote:
> > Is the idea here to have something like assert() that does not get compiled 
> > out in gem5.fast?  Or is it to have a flavor of assert that allows you to 
> > have more expressive error message?  Both seem like reasonable goals, just 
> > wondering which this is intended to address.

Mostly it is to make sure that the user gets a more expressive error message.


- Andreas


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


On Feb. 21, 2014, 1:24 p.m., Andreas Hansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/2164/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2014, 1:24 p.m.)
> 
> 
> Review request for Default.
> 
> 
> Repository: gem5
> 
> 
> Description
> -------
> 
> Changeset 10077:ebe43d95c134
> ---------------------------
> misc: Add panic_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
> -----
> 
>   src/base/misc.hh 2360411a16be 
> 
> 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