#endif
#endif
+/**
+ * Exit immediately.
+ *
+ * This should be called only from the wrappers, when there is no safe way of
+ * failing gracefully.
+ */
void abort(void);
void setExceptionCallback(void (*callback)(void));
__android_log_vprint(ANDROID_LOG_DEBUG, "apitrace", format, ap);
#else
vfprintf(stderr, format, ap);
+ fflush(stderr);
#endif
va_end(ap);
logging = false;
void
abort(void)
{
- exit(0);
+ _exit(1);
}
void
abort(void)
{
-#ifndef NDEBUG
- DebugBreak();
-#else
- ExitProcess(0);
-#endif
+ TerminateProcess(GetCurrentProcess(), 1);
}
static int recursion_count = 0;
if (recursion_count) {
- fprintf(stderr, "apitrace: warning: recursion handling exception\n");
+ fputs("apitrace: warning: recursion handling exception\n", stderr);
} else {
if (gCallback) {
++recursion_count;
}
retrace::warning(call) << "Failed to create " << name << " context.\n";
- os::abort();
+ exit(1);
}
context_map[orig_context] = context;