summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-11-01 10:59:06 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-11-01 10:59:06 -0800
commitdc8370852f59f881a37161ea335573616dbd17b3 (patch)
treebb1ee250777ced8b456c0b87cd232200773e8856
parent64198ba6ff423b54c0344e13ba0ae67e3269ae12 (diff)
downloadgem5-dc8370852f59f881a37161ea335573616dbd17b3.tar.xz
Make error messages more informative on a non-full-system fault.
base/misc.cc: Add curTick to panic and warn messages. Reformat fatal message a bit for consistency. --HG-- extra : convert_revision : 171da2fe6ca5e25982058ee1af67473292659103
-rw-r--r--base/misc.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/base/misc.cc b/base/misc.cc
index e798dd656..8190caddd 100644
--- a/base/misc.cc
+++ b/base/misc.cc
@@ -42,7 +42,8 @@ void
__panic(const string &format, cp::ArgList &args, const char *func,
const char *file, int line)
{
- string fmt = "panic: " + format + " [%s:%s, line %d]\n";
+ string fmt = "panic: " + format + " @ cycle %d\n[%s:%s, line %d]\n";
+ args.append(curTick);
args.append(func);
args.append(file);
args.append(line);
@@ -62,13 +63,13 @@ void
__fatal(const string &format, cp::ArgList &args, const char *func,
const char *file, int line)
{
- string fmt = "fatal: " + format + " [%s:%s, line %d]\n"
- "\n%d\nMemory Usage: %ld KBytes\n";
+ string fmt = "fatal: " + format + " @ cycle %d\n[%s:%s, line %d]\n"
+ "Memory Usage: %ld KBytes\n";
+ args.append(curTick);
args.append(func);
args.append(file);
args.append(line);
- args.append(curTick);
args.append(memUsage());
args.dump(cerr, fmt);
@@ -83,7 +84,8 @@ __warn(const string &format, cp::ArgList &args, const char *func,
{
string fmt = "warn: " + format;
#ifdef VERBOSE_WARN
- fmt += " [%s:%s, line %d]\n";
+ fmt += " @ cycle %d\n[%s:%s, line %d]\n";
+ args.append(curTick);
args.append(func);
args.append(file);
args.append(line);