systemc: Fortify how exceptions are caught and passed around.

This change tightens up exception catching and makes gem5's systemc
code react to exceptions more in line with the Accellera
implementation. This prevents exceptions from being caught by the
pybind11 integration which makes it very difficult to see where an
exception came from, and makes the output differ by including a
(mostly useless) backtrace.

Change-Id: I7130d53a98fadd137073d1718f780f32f57c658c
Reviewed-on: https://gem5-review.googlesource.com/c/12601
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2018-09-07 01:37:57 -07:00
parent 51e3c33ed4
commit 3f3773757e
8 changed files with 101 additions and 9 deletions

View File

@@ -105,6 +105,10 @@ class sc_report_handler
static void set_handler(sc_report_handler_proc);
static void default_handler(const sc_report &, const sc_actions &);
static sc_actions get_new_action_id();
// Nonstandard
// Returns the current handler so it can be restored if it needs to be
// changed temporarily.
static sc_report_handler_proc get_handler();
static sc_report *get_cached_report();
static void clear_cached_report();