summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-02-06 16:30:13 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2014-02-06 16:30:13 -0600
commiteb73a14fe29ff4940a206a9961e30c2376412951 (patch)
treebb2c32fb24a0226667540df2d2c17cde34453b7b /src/base
parentbb0e9119e700b7816e8509a9010441362dc66ccd (diff)
downloadgem5-eb73a14fe29ff4940a206a9961e30c2376412951.tar.xz
base: calls abort() from fatal
Currently fatal() ends the simulation in a normal fashion. This results in the call stack getting lost when using a debugger and it is not always possible to debug the simulation just from the information provided by the printed error message. Even though the error is likely due to a user's fault, the information available should not be thrown away. Hence, this patch to call abort() from fatal().
Diffstat (limited to 'src/base')
-rw-r--r--src/base/misc.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/base/misc.hh b/src/base/misc.hh
index 25dcbaa62..e09f2d0c2 100644
--- a/src/base/misc.hh
+++ b/src/base/misc.hh
@@ -77,11 +77,10 @@ M5_PRAGMA_NORETURN(__exit_message)
// This implements a cprintf based fatal() function. fatal() should
// be called when the simulation cannot continue due to some condition
// that is the user's fault (bad configuration, invalid arguments,
-// etc.) and not a simulator bug. fatal() calls exit(1), i.e., a
-// "normal" exit with an error code, as opposed to abort() like
+// etc.) and not a simulator bug. fatal() calls abort() like
// panic() does.
//
-#define fatal(...) exit_message("fatal", 1, __VA_ARGS__)
+#define fatal(...) exit_message("fatal", -1, __VA_ARGS__)
void
__base_message(std::ostream &stream, const char *prefix, bool verbose,