That sounds like a reasonable idea. There's been a few times I've
thought something like that would be handy.

Gabe

Ali Saidi wrote:
> For a little while we were doing something like:
> assert(condition && "String that describes it")
> However the string in the condition end up being problematic with some  
> compilers. The best bet is probably to add versions two argument  
> versions of panic, fatal, warn that take a second argument and do an  
> if internally.
>
> Ali
>
> On Apr 18, 2009, at 8:16 PM, Korey Sewell wrote:
>
>   
>> This definitely isnt a pressing issue, but  is there any facility in
>> M5 so that I can give assert a message to go along with breaking
>> execution. I remember at Intel we had something
>> like this available in the simulator.
>>
>> Panic, Fatal, etc. dont quite do the trick since you still typically
>> need to enclose it in a if statement to mimic how an assert would act.
>>
>> Typically, when I ask these questions, it's something that M5 already
>> has and I just dont know about :) ...yet.
>>
>> So if there is already a way to go:
>> M5ASSERT(b < c, "This should always be true because if not etc. etc.")
>>
>> If so,
>> let me know!
>>
>>
>> -- 
>> ----------
>> Korey L Sewell
>> Graduate Student - PhD Candidate
>> Computer Science & Engineering
>> University of Michigan
>> _______________________________________________
>> m5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/m5-dev
>>
>>     
>
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>   

_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to