OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 "VTALRM", | 92 "VTALRM", |
93 "PROF", | 93 "PROF", |
94 "WINCH", | 94 "WINCH", |
95 "IO", | 95 "IO", |
96 "PWR", | 96 "PWR", |
97 "SYS", | 97 "SYS", |
98 #endif | 98 #endif |
99 }; | 99 }; |
100 #if defined(OS_LINUX) | 100 #if defined(OS_LINUX) |
101 // NSIG is 64 to account for real-time signals. | 101 // NSIG is 64 to account for real-time signals. |
102 COMPILE_ASSERT(arraysize(kSignalNames) == 32, kSignalNames_length); | 102 static_assert(arraysize(kSignalNames) == 32, "kSignalNames length"); |
103 #else | 103 #else |
104 COMPILE_ASSERT(arraysize(kSignalNames) == NSIG, kSignalNames_length); | 104 static_assert(arraysize(kSignalNames) == NSIG, "kSignalNames length"); |
105 #endif | 105 #endif |
106 | 106 |
107 const char kSigPrefix[] = "SIG"; | 107 const char kSigPrefix[] = "SIG"; |
108 | 108 |
109 } // namespace | 109 } // namespace |
110 | 110 |
111 namespace crashpad { | 111 namespace crashpad { |
112 | 112 |
113 std::string SignalToString(int signal, | 113 std::string SignalToString(int signal, |
114 SymbolicConstantToStringOptions options) { | 114 SymbolicConstantToStringOptions options) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 if (options & kAllowNumber) { | 159 if (options & kAllowNumber) { |
160 return StringToNumber(string, signal); | 160 return StringToNumber(string, signal); |
161 } | 161 } |
162 | 162 |
163 return false; | 163 return false; |
164 } | 164 } |
165 | 165 |
166 } // namespace crashpad | 166 } // namespace crashpad |
OLD | NEW |