diff options
author | Gabe Black <gabeblack@google.com> | 2018-08-28 20:58:37 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-03 00:12:37 +0000 |
commit | ae373556b71e4d4c5c2022110e7a4b00c55666a9 (patch) | |
tree | 172c5cc85da4e0e426378763670055c2a80f8276 | |
parent | e731642149c50955efb63b3f255a5112185976dd (diff) | |
download | gem5-ae373556b71e4d4c5c2022110e7a4b00c55666a9.tar.xz |
systemc: Make sure children of processes are recorded as such.
The process was treated as the parent of the object, but the object
wasn't being installed as a child of the process.
Change-Id: I6710f34734835cbeceb3d33e5e37b6f5897c5e30
Reviewed-on: https://gem5-review.googlesource.com/c/12438
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
-rw-r--r-- | src/systemc/core/object.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemc/core/object.cc b/src/systemc/core/object.cc index 1fb1d4591..b97fd900a 100644 --- a/src/systemc/core/object.cc +++ b/src/systemc/core/object.cc @@ -91,10 +91,12 @@ Object::Object(sc_core::sc_object *_sc_obj, const char *obj_name) : // We're "within" a parent module, ie we're being created while its // constructor or end_of_elaboration callback is running. parent = p->obj()->_sc_obj; - addObject(&parent->_gem5_object->children, _sc_obj); } else if (scheduler.current()) { // Our parent is the currently running process. parent = scheduler.current(); + } + if (parent) { + addObject(&parent->_gem5_object->children, _sc_obj); } else { // We're a top level object. addObject(&topLevelObjects, _sc_obj); |