summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 13:55:58 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 13:55:58 -0800
commitdce53610c374eba2a8dae236a13b3197cd42edc6 (patch)
tree6ef330759ef6d172516eef1e63d143ced13648aa /src
parent3cf24f9716eebab8c24fa645d02c636584033514 (diff)
downloadgem5-dce53610c374eba2a8dae236a13b3197cd42edc6.tar.xz
ruby: Added error check for openning the ruby config file
Diffstat (limited to 'src')
-rw-r--r--src/mem/rubymem.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mem/rubymem.cc b/src/mem/rubymem.cc
index 70077e7da..aecc0af32 100644
--- a/src/mem/rubymem.cc
+++ b/src/mem/rubymem.cc
@@ -58,8 +58,15 @@ RubyMemory::RubyMemory(const Params *p)
ruby_clock = p->clock;
ruby_phase = p->phase;
+ DPRINTF(Ruby, "creating Ruby Memory from file %s\n",
+ p->config_file.c_str());
+
ifstream config(p->config_file.c_str());
+ if (config.good() == false) {
+ fatal("Did not successfully open %s.\n", p->config_file.c_str());
+ }
+
vector<RubyObjConf> sys_conf;
while (!config.eof()) {
char buffer[65536];