Change-Id: Icaa571216f0eed4527a6aaddcf0c6814ad282c56
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30794
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
_mode(mode), _recreateable(recreateable),
_fstream(static_cast<stream_type_t *>(_stream))
{
- _fstream->open(dir.resolve(_name).c_str(), _mode);
+ std::string resolved_path = dir.resolve(_name);
- assert(_fstream->is_open());
+ _fstream->open(resolved_path.c_str(), _mode);
+
+ panic_if(!_fstream->is_open(), "Failed to open \"%s\"\n", resolved_path);
}
template<class StreamType>