From afb279b1bb8f7c01a74c4fe783ce14365916e920 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 10 Oct 2008 10:18:28 -0700 Subject: output: Make panic/fatal/warn more flexible so we can add some new ones. The major thrust of this change is to limit the amount of code duplication surrounding the code for these functions. This code also adds two new message types called info and hack. Info is meant to be less harsh than warn so people don't get confused and start thinking that the simulator is broken. Hack is a way for people to add runtime messages indicating that the simulator just executed a code "hack" that should probably be fixed. The benefit of knowing about these code hacks is that it will let people know what sorts of inaccuracies or potential bugs might be entering their experiments. Finally, I've added some flags to turn on and off these message types so command line options can change them. --- src/python/swig/core.i | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/python') diff --git a/src/python/swig/core.i b/src/python/swig/core.i index b0773ca68..566998639 100644 --- a/src/python/swig/core.i +++ b/src/python/swig/core.i @@ -34,6 +34,7 @@ %{ #include "python/swig/pyobject.hh" +#include "base/misc.hh" #include "base/socket.hh" #include "sim/core.hh" #include "sim/host.hh" @@ -76,6 +77,10 @@ void unserializeAll(const std::string &cpt_dir); void initAll(); void regAllStats(); +bool want_warn, warn_verbose; +bool want_info, info_verbose; +bool want_hack, hack_verbose; + %wrapper %{ // fix up module name to reflect the fact that it's inside the m5 package #undef SWIG_name -- cgit v1.2.3