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>
// 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);