summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorBjoern A. Zeeb <baz21@cam.ac.uk>2017-02-09 19:03:58 -0500
committerBjoern A. Zeeb <baz21@cam.ac.uk>2017-02-09 19:03:58 -0500
commit0852f0cfc61a543d1aa1add3bc51063be3c2a39d (patch)
tree3909621b6d95f7fdbb03cb74b800b6832687505b /src/sim
parentb673f2aaa4f5d9173a04777bad958c61c3480486 (diff)
downloadgem5-0852f0cfc61a543d1aa1add3bc51063be3c2a39d.tar.xz
sim: fix build breakage in process.cc after brandon@11801
Seeing build breakage after brandon@11801: [ CXX] X86/sim/process.cc -> .o build/X86/sim/process.cc:137:64: error: field '_pid' is uninitialized when used here [-Werror,-Wuninitialized] static_cast<PageTableBase *>(new ArchPageTable(name(), _pid, system)) : ^ build/X86/sim/process.cc:138:64: error: field '_pid' is uninitialized when used here [-Werror,-Wuninitialized] static_cast<PageTableBase *>(new FuncPageTable(name(), _pid))), ^ 2 errors generated. Testing Done: Compiles now on FreeBSD 10 with clang. Reviewed at http://reviews.gem5.org/r/3804/ Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/process.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc
index ff6297bbb..961da1ecd 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -134,8 +134,9 @@ Process::Process(ProcessParams * params)
useArchPT(params->useArchPT),
kvmInSE(params->kvmInSE),
pTable(useArchPT ?
- static_cast<PageTableBase *>(new ArchPageTable(name(), _pid, system)) :
- static_cast<PageTableBase *>(new FuncPageTable(name(), _pid))),
+ static_cast<PageTableBase *>(new ArchPageTable(name(), params->pid,
+ system)) :
+ static_cast<PageTableBase *>(new FuncPageTable(name(), params->pid))),
initVirtMem(system->getSystemPort(), this,
SETranslatingPortProxy::Always),
fd_array(make_shared<array<FDEntry, NUM_FDS>>()),