From 9aaaf33e6e1daad259bce8433ad0264de2eb0b21 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 1 Jan 2022 16:46:15 +0100 Subject: [PATCH] Manage more interrupt signals in CRL::System::_trapSig(). Display value. --- crlcore/src/ccore/Utilities.cpp | 21 ++++++++++++++++--- hurricane/src/hurricane/hurricane/Backtrace.h | 6 +----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/crlcore/src/ccore/Utilities.cpp b/crlcore/src/ccore/Utilities.cpp index c9c5d74c..f4626fa3 100644 --- a/crlcore/src/ccore/Utilities.cpp +++ b/crlcore/src/ccore/Utilities.cpp @@ -378,7 +378,7 @@ namespace CRL { void System::_trapSig ( int sig ) { - cerr << "\n\n[CRL ERROR] System::_trapSig():\n" << endl; + cerr << "\n\n[CRL ERROR] System::_trapSig(): sig=" << sig << "\n" << endl; cerr << "Program stack:\n" << Backtrace(true).textWhere() << endl; switch ( sig ) { @@ -398,10 +398,25 @@ namespace CRL { // Ouch!! This may result from a program bug. cerr << " An program internal bug have occur "; - if (sig == SIGFPE ) cerr << "(SIGFPE)."; + if (sig == SIGABRT) cerr << "(SIGABRT)."; + if (sig == SIGALRM) cerr << "(SIGALARM)."; if (sig == SIGBUS ) cerr << "(SIGBUS)."; - if (sig == SIGSEGV) cerr << "(SIGSEGV)."; + if (sig == SIGCHLD) cerr << "(SIGCHLD)."; + if (sig == SIGCONT) cerr << "(SIGCONT)."; + if (sig == SIGFPE ) cerr << "(SIGFPE)."; + if (sig == SIGHUP ) cerr << "(SIGHUP)."; + if (sig == SIGILL ) cerr << "(SIGILL)."; + if (sig == SIGINT ) cerr << "(SIGINT)."; + if (sig == SIGIO ) cerr << "(SIGIO)."; + if (sig == SIGKILL) cerr << "(SIGKILL)."; if (sig == SIGPIPE) cerr << "(SIGPIPE)."; + if (sig == SIGQUIT) cerr << "(SIGQUIT)."; + if (sig == SIGSEGV) cerr << "(SIGSEGV)."; + if (sig == SIGSTOP) cerr << "(SIGSTOP)."; + if (sig == SIGTSTP) cerr << "(SIGTSTP)."; + if (sig == SIGSYS ) cerr << "(SIGSYS)."; + if (sig == SIGTERM) cerr << "(SIGTERM)."; + if (sig == SIGTRAP) cerr << "(SIGTRAP)."; cerr << "\n Please e-mail to .\n" << "\n program terminated "; diff --git a/hurricane/src/hurricane/hurricane/Backtrace.h b/hurricane/src/hurricane/hurricane/Backtrace.h index 852879dd..80452bf4 100644 --- a/hurricane/src/hurricane/hurricane/Backtrace.h +++ b/hurricane/src/hurricane/hurricane/Backtrace.h @@ -29,9 +29,7 @@ // +-----------------------------------------------------------------+ -#ifndef HURRICANE_BACKTRACE_H -#define HURRICANE_BACKTRACE_H - +#pragma once #include #include "hurricane/Commons.h" #include "hurricane/TextTranslator.h" @@ -65,5 +63,3 @@ namespace Hurricane { } // Hurricane namespace. - -#endif // HURRICANE_BACKTRACE_H