Go to the documentation of this file.
44 #include <sys/types.h>
51 #if defined(__FreeBSD__)
52 #include <sys/param.h>
71 #if defined(__FreeBSD__) && (__FreeBSD_version < 1100097)
79 return sigaltstack(&
stack, NULL) == 0;
84 int flags = SA_RESTART)
88 memset(&
sa, 0,
sizeof(
sa));
89 sigemptyset(&
sa.sa_mask);
90 sa.sa_handler = handler;
93 if (sigaction(signal, &
sa, NULL) == -1)
94 panic(
"Failed to setup handler for signal %i\n", signal);
103 pthread_kill(pthread_self(), signo);
107 STATIC_ERR(
"Failed to execute default signal handler!\n");
147 ccprintf(std::cerr,
"Program aborted at tick %llu\n",
161 STATIC_ERR(
"gem5 has encountered a segmentation fault!\n\n");
186 signal(SIGFPE, SIG_IGN);
205 SA_RESETHAND | SA_NODEFER | SA_ONSTACK);
207 warn(
"Failed to setup stack for SIGSEGV handler, "
208 "using default signal handler.\n");
volatile bool async_event
Some asynchronous event has happened.
volatile bool async_io
Async I/O request (SIGIO).
EventQueue * getEventQueue(uint32_t index)
Function for returning eventq queue for the provided index.
void abortHandler(int sigtype)
Abort signal handler.
volatile bool async_statdump
Async request to dump stats.
void dumpStatsHandler(int sigtype)
Stats signal handler.
volatile bool async_exit
Async request to exit simulator.
void exitNowHandler(int sigtype)
Exit signal handler.
static void installSignalHandler(int signal, void(*handler)(int sigtype), int flags=SA_RESTART)
virtual void wakeup(Tick when=(Tick) -1)
Function to signal that the event loop should be woken up because an event has been scheduled by an a...
static void segvHandler(int sigtype)
Segmentation fault signal handler.
static bool setupAltStack()
volatile bool async_statreset
Async request to reset stats.
#define STATIC_ERR(m)
Statically allocate a string and write it to STDERR.
EventQueue * curEventQueue()
static void ioHandler(int sigtype)
static void raiseFatalSignal(int signo)
static uint8_t fatalSigStack[2 *SIGSTKSZ]
void ccprintf(cp::Print &print)
Queue of events sorted in time order.
void dumprstStatsHandler(int sigtype)
void print_backtrace()
Print a gem5 post-mortem report.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Jun 22 2021 15:28:30 for gem5 by doxygen 1.8.17