aboutsummaryrefslogtreecommitdiff
path: root/lldb/tools/debugserver/source/SysSignal.cpp
diff options
context:
space:
mode:
authorKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
committerKate Stone <katherine.stone@apple.com>2016-09-06 20:57:50 +0000
commitb9c1b51e45b845debb76d8658edabca70ca56079 (patch)
treedfcb5a13ef2b014202340f47036da383eaee74aa /lldb/tools/debugserver/source/SysSignal.cpp
parentd5aa73376966339caad04013510626ec2e42c760 (diff)
downloadllvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip
llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz
llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.bz2
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
Diffstat (limited to 'lldb/tools/debugserver/source/SysSignal.cpp')
-rw-r--r--lldb/tools/debugserver/source/SysSignal.cpp121
1 files changed, 75 insertions, 46 deletions
diff --git a/lldb/tools/debugserver/source/SysSignal.cpp b/lldb/tools/debugserver/source/SysSignal.cpp
index 69f34ed..c2995f3 100644
--- a/lldb/tools/debugserver/source/SysSignal.cpp
+++ b/lldb/tools/debugserver/source/SysSignal.cpp
@@ -15,52 +15,81 @@
#include <signal.h>
#include <stddef.h>
-const char *
-SysSignal::Name(int signal)
-{
- switch (signal)
- {
- case SIGHUP: return "SIGHUP"; // 1 hangup
- case SIGINT: return "SIGINT"; // 2 interrupt
- case SIGQUIT: return "SIGQUIT"; // 3 quit
- case SIGILL: return "SIGILL"; // 4 illegal instruction (not reset when caught)
- case SIGTRAP: return "SIGTRAP"; // 5 trace trap (not reset when caught)
- case SIGABRT: return "SIGABRT"; // 6 abort()
-#if defined(_POSIX_C_SOURCE)
- case SIGPOLL: return "SIGPOLL"; // 7 pollable event ([XSR] generated, not supported)
-#else // !_POSIX_C_SOURCE
- case SIGEMT: return "SIGEMT"; // 7 EMT instruction
-#endif // !_POSIX_C_SOURCE
- case SIGFPE: return "SIGFPE"; // 8 floating point exception
- case SIGKILL: return "SIGKILL"; // 9 kill (cannot be caught or ignored)
- case SIGBUS: return "SIGBUS"; // 10 bus error
- case SIGSEGV: return "SIGSEGV"; // 11 segmentation violation
- case SIGSYS: return "SIGSYS"; // 12 bad argument to system call
- case SIGPIPE: return "SIGPIPE"; // 13 write on a pipe with no one to read it
- case SIGALRM: return "SIGALRM"; // 14 alarm clock
- case SIGTERM: return "SIGTERM"; // 15 software termination signal from kill
- case SIGURG: return "SIGURG"; // 16 urgent condition on IO channel
- case SIGSTOP: return "SIGSTOP"; // 17 sendable stop signal not from tty
- case SIGTSTP: return "SIGTSTP"; // 18 stop signal from tty
- case SIGCONT: return "SIGCONT"; // 19 continue a stopped process
- case SIGCHLD: return "SIGCHLD"; // 20 to parent on child stop or exit
- case SIGTTIN: return "SIGTTIN"; // 21 to readers pgrp upon background tty read
- case SIGTTOU: return "SIGTTOU"; // 22 like TTIN for output if (tp->t_local&LTOSTOP)
-#if !defined(_POSIX_C_SOURCE)
- case SIGIO: return "SIGIO"; // 23 input/output possible signal
+const char *SysSignal::Name(int signal) {
+ switch (signal) {
+ case SIGHUP:
+ return "SIGHUP"; // 1 hangup
+ case SIGINT:
+ return "SIGINT"; // 2 interrupt
+ case SIGQUIT:
+ return "SIGQUIT"; // 3 quit
+ case SIGILL:
+ return "SIGILL"; // 4 illegal instruction (not reset when caught)
+ case SIGTRAP:
+ return "SIGTRAP"; // 5 trace trap (not reset when caught)
+ case SIGABRT:
+ return "SIGABRT"; // 6 abort()
+#if defined(_POSIX_C_SOURCE)
+ case SIGPOLL:
+ return "SIGPOLL"; // 7 pollable event ([XSR] generated, not supported)
+#else // !_POSIX_C_SOURCE
+ case SIGEMT:
+ return "SIGEMT"; // 7 EMT instruction
+#endif // !_POSIX_C_SOURCE
+ case SIGFPE:
+ return "SIGFPE"; // 8 floating point exception
+ case SIGKILL:
+ return "SIGKILL"; // 9 kill (cannot be caught or ignored)
+ case SIGBUS:
+ return "SIGBUS"; // 10 bus error
+ case SIGSEGV:
+ return "SIGSEGV"; // 11 segmentation violation
+ case SIGSYS:
+ return "SIGSYS"; // 12 bad argument to system call
+ case SIGPIPE:
+ return "SIGPIPE"; // 13 write on a pipe with no one to read it
+ case SIGALRM:
+ return "SIGALRM"; // 14 alarm clock
+ case SIGTERM:
+ return "SIGTERM"; // 15 software termination signal from kill
+ case SIGURG:
+ return "SIGURG"; // 16 urgent condition on IO channel
+ case SIGSTOP:
+ return "SIGSTOP"; // 17 sendable stop signal not from tty
+ case SIGTSTP:
+ return "SIGTSTP"; // 18 stop signal from tty
+ case SIGCONT:
+ return "SIGCONT"; // 19 continue a stopped process
+ case SIGCHLD:
+ return "SIGCHLD"; // 20 to parent on child stop or exit
+ case SIGTTIN:
+ return "SIGTTIN"; // 21 to readers pgrp upon background tty read
+ case SIGTTOU:
+ return "SIGTTOU"; // 22 like TTIN for output if (tp->t_local&LTOSTOP)
+#if !defined(_POSIX_C_SOURCE)
+ case SIGIO:
+ return "SIGIO"; // 23 input/output possible signal
#endif
- case SIGXCPU: return "SIGXCPU"; // 24 exceeded CPU time limit
- case SIGXFSZ: return "SIGXFSZ"; // 25 exceeded file size limit
- case SIGVTALRM: return "SIGVTALRM"; // 26 virtual time alarm
- case SIGPROF: return "SIGPROF"; // 27 profiling time alarm
-#if !defined(_POSIX_C_SOURCE)
- case SIGWINCH: return "SIGWINCH"; // 28 window size changes
- case SIGINFO: return "SIGINFO"; // 29 information request
+ case SIGXCPU:
+ return "SIGXCPU"; // 24 exceeded CPU time limit
+ case SIGXFSZ:
+ return "SIGXFSZ"; // 25 exceeded file size limit
+ case SIGVTALRM:
+ return "SIGVTALRM"; // 26 virtual time alarm
+ case SIGPROF:
+ return "SIGPROF"; // 27 profiling time alarm
+#if !defined(_POSIX_C_SOURCE)
+ case SIGWINCH:
+ return "SIGWINCH"; // 28 window size changes
+ case SIGINFO:
+ return "SIGINFO"; // 29 information request
#endif
- case SIGUSR1: return "SIGUSR1"; // 30 user defined signal 1
- case SIGUSR2: return "SIGUSR2"; // 31 user defined signal 2
- default:
- break;
- }
- return NULL;
+ case SIGUSR1:
+ return "SIGUSR1"; // 30 user defined signal 1
+ case SIGUSR2:
+ return "SIGUSR2"; // 31 user defined signal 2
+ default:
+ break;
+ }
+ return NULL;
}