mirror of
https://github.com/Minres/RISCV-VP.git
synced 2026-03-21 03:41:32 +00:00
changes error reporting and exit value to properly communicate issues
This commit is contained in:
@@ -154,10 +154,11 @@ int sc_main(int argc, char* argv[]) {
|
|||||||
case SIGTERM:
|
case SIGTERM:
|
||||||
case SIGUSR1:
|
case SIGUSR1:
|
||||||
case SIGUSR2:
|
case SIGUSR2:
|
||||||
SCCINFO() << "Simulation stopped with signal " << res << ".";
|
sc_core::sc_stop();
|
||||||
|
SCCINFO() << "Simulation stopped with signal " << sigabbrev_np(res) << ".";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SCCERR() << "Simulation aborted with signal " << res << "!";
|
SCCERR() << "Simulation aborted with signal " << sigabbrev_np(res) << "!";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
@@ -171,5 +172,5 @@ int sc_main(int argc, char* argv[]) {
|
|||||||
sc_core::sc_report_handler::get_handler()(rep, sc_core::SC_DISPLAY | sc_core::SC_STOP);
|
sc_core::sc_report_handler::get_handler()(rep, sc_core::SC_DISPLAY | sc_core::SC_STOP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return sc_core::sc_report_handler::get_count(SC_ERROR) + sc_core::sc_report_handler::get_count(SC_WARNING);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user