summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2019-08-08 15:23:01 -0400
committerBrandon Potter <Brandon.Potter@amd.com>2019-08-09 01:42:14 +0000
commitdc5255f1d2bb0674d14c4b6722b0519da48ba002 (patch)
treed34c44248275857792117f05e32f8e5b205c1342
parent29082ef5cec7640977907ea540659e895f8ca164 (diff)
downloadgem5-dc5255f1d2bb0674d14c4b6722b0519da48ba002.tar.xz
sim-se: minor refactor for ProcessParams::create
Remove the nullptr initialization and change the message for object file failure. Change-Id: I14b80b47b65893c55810e7f715c1b8fc643c5125 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19949 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Tested-by: kokoro <noreply+kokoro@google.com>
-rw-r--r--src/sim/process.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc
index 735933d01..224152a32 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -529,8 +529,6 @@ Process::absolutePath(const std::string &filename, bool host_filesystem)
Process *
ProcessParams::create()
{
- Process *process = nullptr;
-
// If not specified, set the executable parameter equal to the
// simulated system's zeroth command line parameter
if (executable == "") {
@@ -538,9 +536,9 @@ ProcessParams::create()
}
ObjectFile *obj_file = createObjectFile(executable);
- fatal_if(!obj_file, "Can't load object file %s", executable);
+ fatal_if(!obj_file, "Cannot load object file %s.", executable);
- process = ObjectFile::tryLoaders(this, obj_file);
+ Process *process = ObjectFile::tryLoaders(this, obj_file);
fatal_if(!process, "Unknown error creating process object.");
return process;