systemc: Make orphans top level objects instead of panic-ing.
authorGabe Black <gabeblack@google.com>
Fri, 20 Jul 2018 00:12:31 +0000 (17:12 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 11 Sep 2018 21:41:31 +0000 (21:41 +0000)
commitbc46b4ac03849706c32a8d6a3383d56373983eab
tree88ba13efe186915e6719fbd1456c595c1ee33149
parentb7ab029883d8311756eefb54c706f83636bf7327
systemc: Make orphans top level objects instead of panic-ing.

When a simulation ends, the sc_objects it contains are destroyed one
by one, not necessarily in hierarchy order. That means that a parent
object can legitimately be destroyed before its children. Instead of
panic-ing when that inevitably happens, this change makes gem5 turn
those children into top level objects.

Change-Id: Icad9c99310fbc3ddcadbbb4f8a990b4fbfe35bdf
Reviewed-on: https://gem5-review.googlesource.com/12035
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
src/systemc/core/object.cc
src/systemc/core/object.hh