Skip to content

Commit 0fcacef

Browse files
committed
[lldb] Format unix signal table (NFC)
Restore unix signal table to its original glory and mark it as not to be clang-formatted.
1 parent 7fa503e commit 0fcacef

File tree

1 file changed

+40
-46
lines changed

1 file changed

+40
-46
lines changed

lldb/source/Target/UnixSignals.cpp

Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -65,55 +65,49 @@ UnixSignals::UnixSignals(const UnixSignals &rhs) : m_signals(rhs.m_signals) {}
6565
UnixSignals::~UnixSignals() = default;
6666

6767
void UnixSignals::Reset() {
68-
// This builds one standard set of Unix Signals. If yours aren't quite in
68+
// This builds one standard set of Unix Signals. If yours aren't quite in
6969
// this order, you can either subclass this class, and use Add & Remove to
70-
// change them
71-
// or you can subclass and build them afresh in your constructor;
70+
// change them or you can subclass and build them afresh in your constructor.
7271
//
73-
// Note: the signals below are the Darwin signals. Do not change these!
72+
// Note: the signals below are the Darwin signals. Do not change these!
73+
7474
m_signals.clear();
75-
// SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
76-
// ====== ============ ======== ====== ======
77-
// ===================================================
78-
AddSignal(1, "SIGHUP", false, true, true, "hangup");
79-
AddSignal(2, "SIGINT", true, true, true, "interrupt");
80-
AddSignal(3, "SIGQUIT", false, true, true, "quit");
81-
AddSignal(4, "SIGILL", false, true, true, "illegal instruction");
82-
AddSignal(5, "SIGTRAP", true, true, true,
83-
"trace trap (not reset when caught)");
84-
AddSignal(6, "SIGABRT", false, true, true, "abort()");
85-
AddSignal(7, "SIGEMT", false, true, true, "pollable event");
86-
AddSignal(8, "SIGFPE", false, true, true, "floating point exception");
87-
AddSignal(9, "SIGKILL", false, true, true, "kill");
88-
AddSignal(10, "SIGBUS", false, true, true, "bus error");
89-
AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
90-
AddSignal(12, "SIGSYS", false, true, true, "bad argument to system call");
91-
AddSignal(13, "SIGPIPE", false, false, false,
92-
"write on a pipe with no one to read it");
93-
AddSignal(14, "SIGALRM", false, false, false, "alarm clock");
94-
AddSignal(15, "SIGTERM", false, true, true,
95-
"software termination signal from kill");
96-
AddSignal(16, "SIGURG", false, false, false,
97-
"urgent condition on IO channel");
98-
AddSignal(17, "SIGSTOP", true, true, true,
99-
"sendable stop signal not from tty");
100-
AddSignal(18, "SIGTSTP", false, true, true, "stop signal from tty");
101-
AddSignal(19, "SIGCONT", false, true, true, "continue a stopped process");
102-
AddSignal(20, "SIGCHLD", false, false, false,
103-
"to parent on child stop or exit");
104-
AddSignal(21, "SIGTTIN", false, true, true,
105-
"to readers process group upon background tty read");
106-
AddSignal(22, "SIGTTOU", false, true, true,
107-
"to readers process group upon background tty write");
108-
AddSignal(23, "SIGIO", false, false, false, "input/output possible signal");
109-
AddSignal(24, "SIGXCPU", false, true, true, "exceeded CPU time limit");
110-
AddSignal(25, "SIGXFSZ", false, true, true, "exceeded file size limit");
111-
AddSignal(26, "SIGVTALRM", false, false, false, "virtual time alarm");
112-
AddSignal(27, "SIGPROF", false, false, false, "profiling time alarm");
113-
AddSignal(28, "SIGWINCH", false, false, false, "window size changes");
114-
AddSignal(29, "SIGINFO", false, true, true, "information request");
115-
AddSignal(30, "SIGUSR1", false, true, true, "user defined signal 1");
116-
AddSignal(31, "SIGUSR2", false, true, true, "user defined signal 2");
75+
76+
// clang-format off
77+
// SIGNO NAME SUPPRESS STOP NOTIFY DESCRIPTION
78+
// ====== ============ ======== ====== ====== ===================================================
79+
AddSignal(1, "SIGHUP", false, true, true, "hangup");
80+
AddSignal(2, "SIGINT", true, true, true, "interrupt");
81+
AddSignal(3, "SIGQUIT", false, true, true, "quit");
82+
AddSignal(4, "SIGILL", false, true, true, "illegal instruction");
83+
AddSignal(5, "SIGTRAP", true, true, true, "trace trap (not reset when caught)");
84+
AddSignal(6, "SIGABRT", false, true, true, "abort()");
85+
AddSignal(7, "SIGEMT", false, true, true, "pollable event");
86+
AddSignal(8, "SIGFPE", false, true, true, "floating point exception");
87+
AddSignal(9, "SIGKILL", false, true, true, "kill");
88+
AddSignal(10, "SIGBUS", false, true, true, "bus error");
89+
AddSignal(11, "SIGSEGV", false, true, true, "segmentation violation");
90+
AddSignal(12, "SIGSYS", false, true, true, "bad argument to system call");
91+
AddSignal(13, "SIGPIPE", false, false, false, "write on a pipe with no one to read it");
92+
AddSignal(14, "SIGALRM", false, false, false, "alarm clock");
93+
AddSignal(15, "SIGTERM", false, true, true, "software termination signal from kill");
94+
AddSignal(16, "SIGURG", false, false, false, "urgent condition on IO channel");
95+
AddSignal(17, "SIGSTOP", true, true, true, "sendable stop signal not from tty");
96+
AddSignal(18, "SIGTSTP", false, true, true, "stop signal from tty");
97+
AddSignal(19, "SIGCONT", false, true, true, "continue a stopped process");
98+
AddSignal(20, "SIGCHLD", false, false, false, "to parent on child stop or exit");
99+
AddSignal(21, "SIGTTIN", false, true, true, "to readers process group upon background tty read");
100+
AddSignal(22, "SIGTTOU", false, true, true, "to readers process group upon background tty write");
101+
AddSignal(23, "SIGIO", false, false, false, "input/output possible signal");
102+
AddSignal(24, "SIGXCPU", false, true, true, "exceeded CPU time limit");
103+
AddSignal(25, "SIGXFSZ", false, true, true, "exceeded file size limit");
104+
AddSignal(26, "SIGVTALRM", false, false, false, "virtual time alarm");
105+
AddSignal(27, "SIGPROF", false, false, false, "profiling time alarm");
106+
AddSignal(28, "SIGWINCH", false, false, false, "window size changes");
107+
AddSignal(29, "SIGINFO", false, true, true, "information request");
108+
AddSignal(30, "SIGUSR1", false, true, true, "user defined signal 1");
109+
AddSignal(31, "SIGUSR2", false, true, true, "user defined signal 2");
110+
// clang-format on
117111
}
118112

119113
void UnixSignals::AddSignal(int signo, const char *name, bool default_suppress,

0 commit comments

Comments
 (0)