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>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
#include "systemc/ext/core/sc_time.hh"
|
||||
#include "../core/sc_time.hh"
|
||||
|
||||
namespace sc_core
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user