X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6d521fad4dc4a469b023850e9449a5ec8d29b356..261e680f278e36ba4efbc0755fb08d00ff3cad83:/src/mc/ModelChecker.cpp diff --git a/src/mc/ModelChecker.cpp b/src/mc/ModelChecker.cpp index 9a22666117..d09a9adfab 100644 --- a/src/mc/ModelChecker.cpp +++ b/src/mc/ModelChecker.cpp @@ -125,7 +125,7 @@ void ModelChecker::resume() remote_process_->clear_cache(); } -static void MC_report_crash(int status) +static void MC_report_crash(Exploration* explorer, int status) { XBT_INFO("**************************"); XBT_INFO("** CRASH IN THE PROGRAM **"); @@ -136,12 +136,12 @@ static void MC_report_crash(int status) XBT_INFO("From exit: %i", WEXITSTATUS(status)); if (not xbt_log_no_loc) XBT_INFO("%s core dump was generated by the system.", WCOREDUMP(status) ? "A" : "No"); - if (mc_model_checker->get_exploration()) { + if (explorer) { XBT_INFO("Counter-example execution trace:"); - for (auto const& s : mc_model_checker->get_exploration()->get_textual_trace()) + for (auto const& s : explorer->get_textual_trace()) XBT_INFO(" %s", s.c_str()); - XBT_INFO("Path = %s", mc_model_checker->get_exploration()->get_record_trace().to_string().c_str()); - Api::get().get_remote_app().log_state(); + XBT_INFO("Path = %s", explorer->get_record_trace().to_string().c_str()); + explorer->get_remote_app().log_state(); if (xbt_log_no_loc) { XBT_INFO("Stack trace not displayed because you passed --log=no_loc"); } else { @@ -233,7 +233,7 @@ bool ModelChecker::handle_message(const char* buffer, ssize_t size) for (auto const& s : get_exploration()->get_textual_trace()) XBT_INFO(" %s", s.c_str()); XBT_INFO("Path = %s", get_exploration()->get_record_trace().to_string().c_str()); - Api::get().get_remote_app().log_state(); + exploration_->get_remote_app().log_state(); this->exit(SIMGRID_MC_EXIT_SAFETY); @@ -273,7 +273,7 @@ void ModelChecker::handle_waitpid() if (status>>8 == (SIGTRAP | (PTRACE_EVENT_EXIT<<8))) { xbt_assert(ptrace(PTRACE_GETEVENTMSG, remote_process_->pid(), 0, &status) != -1, "Could not get exit status"); if (WIFSIGNALED(status)) { - MC_report_crash(status); + MC_report_crash(exploration_, status); this->get_remote_process().terminate(); this->exit(SIMGRID_MC_EXIT_PROGRAM_CRASH); } @@ -293,7 +293,7 @@ void ModelChecker::handle_waitpid() } else if (WIFSIGNALED(status)) { - MC_report_crash(status); + MC_report_crash(exploration_, status); this->get_remote_process().terminate(); this->exit(SIMGRID_MC_EXIT_PROGRAM_CRASH); } else if (WIFEXITED(status)) {