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 24 matching lines...) Expand all Loading... |
35 "EMULATION", | 35 "EMULATION", |
36 "SOFTWARE", | 36 "SOFTWARE", |
37 "BREAKPOINT", | 37 "BREAKPOINT", |
38 "SYSCALL", | 38 "SYSCALL", |
39 "MACH_SYSCALL", | 39 "MACH_SYSCALL", |
40 "RPC_ALERT", | 40 "RPC_ALERT", |
41 "CRASH", | 41 "CRASH", |
42 "RESOURCE", | 42 "RESOURCE", |
43 "GUARD", | 43 "GUARD", |
44 }; | 44 }; |
45 COMPILE_ASSERT(arraysize(kExceptionNames) == EXC_TYPES_COUNT, | 45 static_assert(arraysize(kExceptionNames) == EXC_TYPES_COUNT, |
46 kExceptionNames_length); | 46 "kExceptionNames length"); |
47 | 47 |
48 const char kExcPrefix[] = "EXC_"; | 48 const char kExcPrefix[] = "EXC_"; |
49 const char kExcMaskPrefix[] = "EXC_MASK_"; | 49 const char kExcMaskPrefix[] = "EXC_MASK_"; |
50 | 50 |
51 const char* kBehaviorNames[] = { | 51 const char* kBehaviorNames[] = { |
52 NULL, | 52 NULL, |
53 | 53 |
54 // sed -Ene 's/^# define[[:space:]]EXCEPTION_([[:graph:]]+)[[:space:]]+[[:di
git:]]{1,2}([[:space:]]|$).*/ "\1",/p' | 54 // sed -Ene 's/^# define[[:space:]]EXCEPTION_([[:graph:]]+)[[:space:]]+[[:di
git:]]{1,2}([[:space:]]|$).*/ "\1",/p' |
55 // /usr/include/mach/exception_types.h | 55 // /usr/include/mach/exception_types.h |
56 "DEFAULT", | 56 "DEFAULT", |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 } | 536 } |
537 | 537 |
538 if (options & kAllowNumber) { | 538 if (options & kAllowNumber) { |
539 return StringToNumber(string, reinterpret_cast<unsigned int*>(flavor)); | 539 return StringToNumber(string, reinterpret_cast<unsigned int*>(flavor)); |
540 } | 540 } |
541 | 541 |
542 return false; | 542 return false; |
543 } | 543 } |
544 | 544 |
545 } // namespace crashpad | 545 } // namespace crashpad |
OLD | NEW |