summaryrefslogtreecommitdiff
path: root/src/systemc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc/core')
-rw-r--r--src/systemc/core/sc_main.cc5
-rw-r--r--src/systemc/core/scheduler.cc4
2 files changed, 5 insertions, 4 deletions
diff --git a/src/systemc/core/sc_main.cc b/src/systemc/core/sc_main.cc
index 12e129ad3..95e955002 100644
--- a/src/systemc/core/sc_main.cc
+++ b/src/systemc/core/sc_main.cc
@@ -41,6 +41,7 @@
#include "systemc/core/scheduler.hh"
#include "systemc/ext/core/sc_main.hh"
#include "systemc/ext/utils/sc_report_handler.hh"
+#include "systemc/utils/report.hh"
// A weak symbol to detect if sc_main has been defined, and if so where it is.
[[gnu::weak]] int sc_main(int argc, char *argv[]);
@@ -79,12 +80,12 @@ class ScMainFiber : public Fiber
} catch (const sc_report &r) {
// There was an exception nobody caught.
resultStr = "uncaught sc_report";
- sc_report_handler::get_handler()(
+ sc_gem5::reportHandlerProc(
r, sc_report_handler::get_catch_actions());
} catch (...) {
// There was some other type of exception we need to wrap.
resultStr = "uncaught exception";
- sc_report_handler::get_handler()(
+ sc_gem5::reportHandlerProc(
::sc_gem5::reportifyException(),
sc_report_handler::get_catch_actions());
}
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index e0a270d4f..969e40155 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -36,6 +36,7 @@
#include "systemc/ext/core/sc_main.hh"
#include "systemc/ext/utils/sc_report.hh"
#include "systemc/ext/utils/sc_report_handler.hh"
+#include "systemc/utils/report.hh"
#include "systemc/utils/tracefile.hh"
namespace sc_gem5
@@ -469,8 +470,7 @@ throwingReportHandler(const ::sc_core::sc_report &r,
const ::sc_core::sc_report
reportifyException()
{
- ::sc_core::sc_report_handler_proc old_handler =
- ::sc_core::sc_report_handler::get_handler();
+ ::sc_core::sc_report_handler_proc old_handler = reportHandlerProc;
::sc_core::sc_report_handler::set_handler(&throwingReportHandler);
try {