[lldb] Format unix signal table (NFC)

Restore unix signal table to its original glory and mark it as not to be
clang-formatted.
This commit is contained in:
Jonas Devlieghere 2020-10-06 23:33:04 -07:00
parent 7fa503ef4a
commit 0fcacefd16
1 changed files with 40 additions and 46 deletions

View File

@ -65,55 +65,49 @@ UnixSignals::UnixSignals(const UnixSignals &rhs) : m_signals(rhs.m_signals) {}
UnixSignals::~UnixSignals() = default;
void UnixSignals::Reset() {
// This builds one standard set of Unix Signals. If yours aren't quite in
// This builds one standard set of Unix Signals. If yours aren't quite in
// this order, you can either subclass this class, and use Add & Remove to
// change them
// or you can subclass and build them afresh in your constructor;
// change them or you can subclass and build them afresh in your constructor.
//
// Note: the signals below are the Darwin signals. Do not change these!
// Note: the signals below are the Darwin signals. Do not change these!
m_signals.clear();
// SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
// ====== ============ ======== ====== ======
// ===================================================
AddSignal(1, "SIGHUP", false, true, true, "hangup");
AddSignal(2, "SIGINT", true, true, true, "interrupt");
AddSignal(3, "SIGQUIT", false, true, true, "quit");
AddSignal(4, "SIGILL", false, true, true, "illegal instruction");
AddSignal(5, "SIGTRAP", true, true, true,
"trace trap (not reset when caught)");
AddSignal(6, "SIGABRT", false, true, true, "abort()");
AddSignal(7, "SIGEMT", false, true, true, "pollable event");
AddSignal(8, "SIGFPE", false, true, true, "floating point exception");
AddSignal(9, "SIGKILL", false, true, true, "kill");
AddSignal(10, "SIGBUS", false, true, true, "bus error");
AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
AddSignal(12, "SIGSYS", false, true, true, "bad argument to system call");
AddSignal(13, "SIGPIPE", false, false, false,
"write on a pipe with no one to read it");
AddSignal(14, "SIGALRM", false, false, false, "alarm clock");
AddSignal(15, "SIGTERM", false, true, true,
"software termination signal from kill");
AddSignal(16, "SIGURG", false, false, false,
"urgent condition on IO channel");
AddSignal(17, "SIGSTOP", true, true, true,
"sendable stop signal not from tty");
AddSignal(18, "SIGTSTP", false, true, true, "stop signal from tty");
AddSignal(19, "SIGCONT", false, true, true, "continue a stopped process");
AddSignal(20, "SIGCHLD", false, false, false,
"to parent on child stop or exit");
AddSignal(21, "SIGTTIN", false, true, true,
"to readers process group upon background tty read");
AddSignal(22, "SIGTTOU", false, true, true,
"to readers process group upon background tty write");
AddSignal(23, "SIGIO", false, false, false, "input/output possible signal");
AddSignal(24, "SIGXCPU", false, true, true, "exceeded CPU time limit");
AddSignal(25, "SIGXFSZ", false, true, true, "exceeded file size limit");
AddSignal(26, "SIGVTALRM", false, false, false, "virtual time alarm");
AddSignal(27, "SIGPROF", false, false, false, "profiling time alarm");
AddSignal(28, "SIGWINCH", false, false, false, "window size changes");
AddSignal(29, "SIGINFO", false, true, true, "information request");
AddSignal(30, "SIGUSR1", false, true, true, "user defined signal 1");
AddSignal(31, "SIGUSR2", false, true, true, "user defined signal 2");
// clang-format off
// SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
// ====== ============ ======== ====== ====== ===================================================
AddSignal(1, "SIGHUP", false, true, true, "hangup");
AddSignal(2, "SIGINT", true, true, true, "interrupt");
AddSignal(3, "SIGQUIT", false, true, true, "quit");
AddSignal(4, "SIGILL", false, true, true, "illegal instruction");
AddSignal(5, "SIGTRAP", true, true, true, "trace trap (not reset when caught)");
AddSignal(6, "SIGABRT", false, true, true, "abort()");
AddSignal(7, "SIGEMT", false, true, true, "pollable event");
AddSignal(8, "SIGFPE", false, true, true, "floating point exception");
AddSignal(9, "SIGKILL", false, true, true, "kill");
AddSignal(10, "SIGBUS", false, true, true, "bus error");
AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
AddSignal(12, "SIGSYS", false, true, true, "bad argument to system call");
AddSignal(13, "SIGPIPE", false, false, false, "write on a pipe with no one to read it");
AddSignal(14, "SIGALRM", false, false, false, "alarm clock");
AddSignal(15, "SIGTERM", false, true, true, "software termination signal from kill");
AddSignal(16, "SIGURG", false, false, false, "urgent condition on IO channel");
AddSignal(17, "SIGSTOP", true, true, true, "sendable stop signal not from tty");
AddSignal(18, "SIGTSTP", false, true, true, "stop signal from tty");
AddSignal(19, "SIGCONT", false, true, true, "continue a stopped process");
AddSignal(20, "SIGCHLD", false, false, false, "to parent on child stop or exit");
AddSignal(21, "SIGTTIN", false, true, true, "to readers process group upon background tty read");
AddSignal(22, "SIGTTOU", false, true, true, "to readers process group upon background tty write");
AddSignal(23, "SIGIO", false, false, false, "input/output possible signal");
AddSignal(24, "SIGXCPU", false, true, true, "exceeded CPU time limit");
AddSignal(25, "SIGXFSZ", false, true, true, "exceeded file size limit");
AddSignal(26, "SIGVTALRM", false, false, false, "virtual time alarm");
AddSignal(27, "SIGPROF", false, false, false, "profiling time alarm");
AddSignal(28, "SIGWINCH", false, false, false, "window size changes");
AddSignal(29, "SIGINFO", false, true, true, "information request");
AddSignal(30, "SIGUSR1", false, true, true, "user defined signal 1");
AddSignal(31, "SIGUSR2", false, true, true, "user defined signal 2");
// clang-format on
}
void UnixSignals::AddSignal(int signo, const char *name, bool default_suppress,