From 5bdeb1a432430dcb265cef77fa9365eceddce7d7 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 27 Sep 2018 01:16:42 -0700 Subject: 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 Maintainer: Gabe Black --- src/systemc/core/scheduler.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/systemc/core/scheduler.hh') diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh index de9d627c1..83585dd2d 100644 --- a/src/systemc/core/scheduler.hh +++ b/src/systemc/core/scheduler.hh @@ -365,7 +365,7 @@ class Scheduler uint64_t changeStamp() { return _changeStamp; } - void throwToScMain(const ::sc_core::sc_report *r=nullptr); + void throwToScMain(); Status status() { return _status; } void status(Status s) { _status = s; } @@ -511,7 +511,7 @@ Scheduler::TimeSlot::process() scheduler.completeTimeSlot(this); } -const ::sc_core::sc_report *reportifyException(); +const ::sc_core::sc_report reportifyException(); } // namespace sc_gem5 -- cgit v1.2.3