OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 // Yo dawg, I heard you like signals so I caught a signal in your | 132 // Yo dawg, I heard you like signals so I caught a signal in your |
133 // signal handler so you can handle signals while you handle signals. | 133 // signal handler so you can handle signals while you handle signals. |
134 // Let's not get into that situation. Only print if we're the first ones to get
a crash signal. | 134 // Let's not get into that situation. Only print if we're the first ones to get
a crash signal. |
135 static std::atomic<bool> in_signal_handler{false}; | 135 static std::atomic<bool> in_signal_handler{false}; |
136 | 136 |
137 #if defined(SK_BUILD_FOR_WIN32) | 137 #if defined(SK_BUILD_FOR_WIN32) |
138 static LONG WINAPI handler(EXCEPTION_POINTERS* e) { | 138 static LONG WINAPI handler(EXCEPTION_POINTERS* e) { |
139 static const struct { | 139 static const struct { |
140 const char* name; | 140 const char* name; |
141 int code; | 141 DWORD code; |
142 } kExceptions[] = { | 142 } kExceptions[] = { |
143 #define _(E) {#E, E} | 143 #define _(E) {#E, E} |
144 _(EXCEPTION_ACCESS_VIOLATION), | 144 _(EXCEPTION_ACCESS_VIOLATION), |
145 _(EXCEPTION_BREAKPOINT), | 145 _(EXCEPTION_BREAKPOINT), |
146 _(EXCEPTION_INT_DIVIDE_BY_ZERO), | 146 _(EXCEPTION_INT_DIVIDE_BY_ZERO), |
147 _(EXCEPTION_STACK_OVERFLOW), | 147 _(EXCEPTION_STACK_OVERFLOW), |
148 // TODO: more? | 148 // TODO: more? |
149 #undef _ | 149 #undef _ |
150 }; | 150 }; |
151 | 151 |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 Reporter* reporter, | 1394 Reporter* reporter, |
1395 GrContextFactory* fac
tory); | 1395 GrContextFactory* fac
tory); |
1396 } // namespace skiatest | 1396 } // namespace skiatest |
1397 | 1397 |
1398 #if !defined(SK_BUILD_FOR_IOS) | 1398 #if !defined(SK_BUILD_FOR_IOS) |
1399 int main(int argc, char** argv) { | 1399 int main(int argc, char** argv) { |
1400 SkCommandLineFlags::Parse(argc, argv); | 1400 SkCommandLineFlags::Parse(argc, argv); |
1401 return dm_main(); | 1401 return dm_main(); |
1402 } | 1402 } |
1403 #endif | 1403 #endif |
OLD | NEW |