Index: tools/render_pdfs_main.cpp |
=================================================================== |
--- tools/render_pdfs_main.cpp (revision 8016) |
+++ tools/render_pdfs_main.cpp (working copy) |
@@ -16,6 +16,10 @@ |
#include "PdfRenderer.h" |
#include "picture_utils.h" |
+#ifdef SK_USE_CDB |
+#include "win_dbghelp.h" |
+#endif |
+ |
/** |
* render_pdfs |
* |
@@ -207,9 +211,8 @@ |
} |
} |
-int tool_main(int argc, char** argv); |
-int tool_main(int argc, char** argv) { |
- |
+int tool_main_core(int argc, char** argv); |
+int tool_main_core(int argc, char** argv) { |
SkAutoGraphics ag; |
SkTArray<SkString> inputs; |
@@ -229,9 +232,27 @@ |
SkDebugf("Failed to render %i PDFs.\n", failures); |
return 1; |
} |
+ |
return 0; |
} |
+int tool_main(int argc, char** argv); |
+int tool_main(int argc, char** argv) { |
+#ifdef SK_USE_CDB |
+ setUpDebuggingFromArgs(argv[0]); |
+ __try { |
+#endif |
+ return tool_main_core(argc, argv); |
+#ifdef SK_USE_CDB |
+ } |
+ __except(GenerateDumpAndPrintCallstack(GetExceptionInformation())) |
+ { |
+ return -1; |
+ } |
+#endif |
+ return 0; |
+} |
+ |
#if !defined SK_BUILD_FOR_IOS |
int main(int argc, char * const argv[]) { |
return tool_main(argc, (char**) argv); |