From: Brad Beckmann Date: Wed, 18 Nov 2009 21:55:58 +0000 (-0800) Subject: ruby: Added error check for openning the ruby config file X-Git-Tag: stable_2012_02_02~1575^2~53 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dce53610c374eba2a8dae236a13b3197cd42edc6;p=gem5.git ruby: Added error check for openning the ruby config file --- 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 sys_conf; while (!config.eof()) { char buffer[65536];