10127ef0fSEd Maste //===-- LinuxSignals.cpp ----------------------------------------*- C++ -*-===//
20127ef0fSEd Maste //
30127ef0fSEd Maste // The LLVM Compiler Infrastructure
40127ef0fSEd Maste //
50127ef0fSEd Maste // This file is distributed under the University of Illinois Open Source
60127ef0fSEd Maste // License. See LICENSE.TXT for details.
70127ef0fSEd Maste //
80127ef0fSEd Maste //===----------------------------------------------------------------------===//
90127ef0fSEd Maste
100127ef0fSEd Maste #include "LinuxSignals.h"
110127ef0fSEd Maste
12b91a7dfcSDimitry Andric using namespace lldb_private;
130127ef0fSEd Maste
LinuxSignals()14435933ddSDimitry Andric LinuxSignals::LinuxSignals() : UnixSignals() { Reset(); }
150127ef0fSEd Maste
Reset()16435933ddSDimitry Andric void LinuxSignals::Reset() {
170127ef0fSEd Maste m_signals.clear();
189f2f44ceSEd Maste // SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION ALIAS
19435933ddSDimitry Andric // ===== =========== ======== ===== ======
20435933ddSDimitry Andric // ====================================== ======
219f2f44ceSEd Maste AddSignal(1, "SIGHUP", false, true, true, "hangup");
229f2f44ceSEd Maste AddSignal(2, "SIGINT", true, true, true, "interrupt");
239f2f44ceSEd Maste AddSignal(3, "SIGQUIT", false, true, true, "quit");
249f2f44ceSEd Maste AddSignal(4, "SIGILL", false, true, true, "illegal instruction");
25435933ddSDimitry Andric AddSignal(5, "SIGTRAP", true, true, true,
26435933ddSDimitry Andric "trace trap (not reset when caught)");
279f2f44ceSEd Maste AddSignal(6, "SIGABRT", false, true, true, "abort()/IOT trap", "SIGIOT");
289f2f44ceSEd Maste AddSignal(7, "SIGBUS", false, true, true, "bus error");
299f2f44ceSEd Maste AddSignal(8, "SIGFPE", false, true, true, "floating point exception");
309f2f44ceSEd Maste AddSignal(9, "SIGKILL", false, true, true, "kill");
319f2f44ceSEd Maste AddSignal(10, "SIGUSR1", false, true, true, "user defined signal 1");
329f2f44ceSEd Maste AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
339f2f44ceSEd Maste AddSignal(12, "SIGUSR2", false, true, true, "user defined signal 2");
34435933ddSDimitry Andric AddSignal(13, "SIGPIPE", false, true, true,
35435933ddSDimitry Andric "write to pipe with reading end closed");
369f2f44ceSEd Maste AddSignal(14, "SIGALRM", false, false, false, "alarm");
379f2f44ceSEd Maste AddSignal(15, "SIGTERM", false, true, true, "termination requested");
389f2f44ceSEd Maste AddSignal(16, "SIGSTKFLT", false, true, true, "stack fault");
39435933ddSDimitry Andric AddSignal(17, "SIGCHLD", false, false, true, "child status has changed",
40435933ddSDimitry Andric "SIGCLD");
419f2f44ceSEd Maste AddSignal(18, "SIGCONT", false, true, true, "process continue");
429f2f44ceSEd Maste AddSignal(19, "SIGSTOP", true, true, true, "process stop");
439f2f44ceSEd Maste AddSignal(20, "SIGTSTP", false, true, true, "tty stop");
449f2f44ceSEd Maste AddSignal(21, "SIGTTIN", false, true, true, "background tty read");
459f2f44ceSEd Maste AddSignal(22, "SIGTTOU", false, true, true, "background tty write");
469f2f44ceSEd Maste AddSignal(23, "SIGURG", false, true, true, "urgent data on socket");
479f2f44ceSEd Maste AddSignal(24, "SIGXCPU", false, true, true, "CPU resource exceeded");
489f2f44ceSEd Maste AddSignal(25, "SIGXFSZ", false, true, true, "file size limit exceeded");
499f2f44ceSEd Maste AddSignal(26, "SIGVTALRM", false, true, true, "virtual time alarm");
509f2f44ceSEd Maste AddSignal(27, "SIGPROF", false, false, false, "profiling time alarm");
519f2f44ceSEd Maste AddSignal(28, "SIGWINCH", false, true, true, "window size changes");
52435933ddSDimitry Andric AddSignal(29, "SIGIO", false, true, true, "input/output ready/Pollable event",
53435933ddSDimitry Andric "SIGPOLL");
549f2f44ceSEd Maste AddSignal(30, "SIGPWR", false, true, true, "power failure");
559f2f44ceSEd Maste AddSignal(31, "SIGSYS", false, true, true, "invalid system call");
56435933ddSDimitry Andric AddSignal(32, "SIG32", false, false, false,
57435933ddSDimitry Andric "threading library internal signal 1");
58435933ddSDimitry Andric AddSignal(33, "SIG33", false, false, false,
59435933ddSDimitry Andric "threading library internal signal 2");
609f2f44ceSEd Maste AddSignal(34, "SIGRTMIN", false, false, false, "real time signal 0");
619f2f44ceSEd Maste AddSignal(35, "SIGRTMIN+1", false, false, false, "real time signal 1");
629f2f44ceSEd Maste AddSignal(36, "SIGRTMIN+2", false, false, false, "real time signal 2");
639f2f44ceSEd Maste AddSignal(37, "SIGRTMIN+3", false, false, false, "real time signal 3");
649f2f44ceSEd Maste AddSignal(38, "SIGRTMIN+4", false, false, false, "real time signal 4");
659f2f44ceSEd Maste AddSignal(39, "SIGRTMIN+5", false, false, false, "real time signal 5");
669f2f44ceSEd Maste AddSignal(40, "SIGRTMIN+6", false, false, false, "real time signal 6");
679f2f44ceSEd Maste AddSignal(41, "SIGRTMIN+7", false, false, false, "real time signal 7");
689f2f44ceSEd Maste AddSignal(42, "SIGRTMIN+8", false, false, false, "real time signal 8");
699f2f44ceSEd Maste AddSignal(43, "SIGRTMIN+9", false, false, false, "real time signal 9");
709f2f44ceSEd Maste AddSignal(44, "SIGRTMIN+10", false, false, false, "real time signal 10");
719f2f44ceSEd Maste AddSignal(45, "SIGRTMIN+11", false, false, false, "real time signal 11");
729f2f44ceSEd Maste AddSignal(46, "SIGRTMIN+12", false, false, false, "real time signal 12");
739f2f44ceSEd Maste AddSignal(47, "SIGRTMIN+13", false, false, false, "real time signal 13");
749f2f44ceSEd Maste AddSignal(48, "SIGRTMIN+14", false, false, false, "real time signal 14");
759f2f44ceSEd Maste AddSignal(49, "SIGRTMIN+15", false, false, false, "real time signal 15");
76435933ddSDimitry Andric AddSignal(50, "SIGRTMAX-14", false, false, false,
77435933ddSDimitry Andric "real time signal 16"); // switching to SIGRTMAX-xxx to match "kill
78435933ddSDimitry Andric // -l" output
799f2f44ceSEd Maste AddSignal(51, "SIGRTMAX-13", false, false, false, "real time signal 17");
809f2f44ceSEd Maste AddSignal(52, "SIGRTMAX-12", false, false, false, "real time signal 18");
819f2f44ceSEd Maste AddSignal(53, "SIGRTMAX-11", false, false, false, "real time signal 19");
829f2f44ceSEd Maste AddSignal(54, "SIGRTMAX-10", false, false, false, "real time signal 20");
839f2f44ceSEd Maste AddSignal(55, "SIGRTMAX-9", false, false, false, "real time signal 21");
849f2f44ceSEd Maste AddSignal(56, "SIGRTMAX-8", false, false, false, "real time signal 22");
859f2f44ceSEd Maste AddSignal(57, "SIGRTMAX-7", false, false, false, "real time signal 23");
869f2f44ceSEd Maste AddSignal(58, "SIGRTMAX-6", false, false, false, "real time signal 24");
879f2f44ceSEd Maste AddSignal(59, "SIGRTMAX-5", false, false, false, "real time signal 25");
889f2f44ceSEd Maste AddSignal(60, "SIGRTMAX-4", false, false, false, "real time signal 26");
899f2f44ceSEd Maste AddSignal(61, "SIGRTMAX-3", false, false, false, "real time signal 27");
909f2f44ceSEd Maste AddSignal(62, "SIGRTMAX-2", false, false, false, "real time signal 28");
919f2f44ceSEd Maste AddSignal(63, "SIGRTMAX-1", false, false, false, "real time signal 29");
929f2f44ceSEd Maste AddSignal(64, "SIGRTMAX", false, false, false, "real time signal 30");
930127ef0fSEd Maste }
94