summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-10 10:18:28 -0700
committerNathan Binkert <nate@binkert.org>2008-10-10 10:18:28 -0700
commitafb279b1bb8f7c01a74c4fe783ce14365916e920 (patch)
treebac1446af4bc5241c2d94e98e86346dff505b43b /src/python
parentb25e56b32a3af5d11680b465f6443c73156ddf86 (diff)
downloadgem5-afb279b1bb8f7c01a74c4fe783ce14365916e920.tar.xz
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.
Diffstat (limited to 'src/python')
-rw-r--r--src/python/swig/core.i5
1 files changed, 5 insertions, 0 deletions
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