systemc: Modify reportifyException to keep sc_reports in scope.
authorGabe Black <gabeblack@google.com>
Thu, 27 Sep 2018 08:16:42 +0000 (01:16 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 00:38:23 +0000 (00:38 +0000)
commit5bdeb1a432430dcb265cef77fa9365eceddce7d7
tree83cd6f4e0601dd52e2d226e1b8fe61e8696c2f0f
parent07cad60bb0865d95cfe4c5ce2ea08d7c8d33f34f
systemc: Modify reportifyException to keep sc_reports in scope.

reportifyException was sometimes indirectly creating temporary
sc_report objects which would go out of scope when they were
returned. The later code which tried to print them would then read
garbage.

Change-Id: I0a744eb029c62bf2ffee83db0a0e6dcbe3e60f7d
Reviewed-on: https://gem5-review.googlesource.com/c/13190
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
src/systemc/core/sc_main.cc
src/systemc/core/scheduler.cc
src/systemc/core/scheduler.hh