diff options
author | Gabe Black <gabeblack@google.com> | 2018-08-28 23:14:40 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-03 00:13:59 +0000 |
commit | b6ad37a88e95a2efbb118324ef48206ee0b6dbc6 (patch) | |
tree | 5d773ba22d76644ab557dd9d4809fd784a3559cd /src/systemc/ext/core | |
parent | cfe48360f933329f10baa0baa1c750493180d891 (diff) | |
download | gem5-b6ad37a88e95a2efbb118324ef48206ee0b6dbc6.tar.xz |
systemc: Improve handling of empty process handles.
Most had checks, but didn't print any message. throw_it needed a check
as well.
Change-Id: I916c837112f9b27852583f01b3e16a6f53d5e7ca
Reviewed-on: https://gem5-review.googlesource.com/c/12440
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/core')
-rw-r--r-- | src/systemc/ext/core/sc_process_handle.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/systemc/ext/core/sc_process_handle.hh b/src/systemc/ext/core/sc_process_handle.hh index 04df4728f..b9bb9a0c4 100644 --- a/src/systemc/ext/core/sc_process_handle.hh +++ b/src/systemc/ext/core/sc_process_handle.hh @@ -33,7 +33,8 @@ #include <exception> #include <vector> -#include "systemc/ext/core/sc_object.hh" +#include "../utils/sc_report_handler.hh" +#include "sc_object.hh" namespace sc_gem5 { @@ -212,6 +213,11 @@ class sc_process_handle sc_descendent_inclusion_info include_descendants= SC_NO_DESCENDANTS) { + if (!_gem5_process) { + SC_REPORT_WARNING("(W570) attempt to use an empty " + "process handle ignored", "throw_it()"); + return; + } ::sc_gem5::ExceptionWrapper<T> exc(user_defined_exception); ::sc_gem5::throw_it_wrapper(_gem5_process, exc, include_descendants == SC_INCLUDE_DESCENDANTS); |