[Scummvm-cvs-logs] SF.net SVN: scummvm:[49506] scummvm/trunk/backends/platform/android/android .cpp

anguslees at users.sourceforge.net anguslees at users.sourceforge.net
Tue Jun 8 15:25:00 CEST 2010


Revision: 49506
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49506&view=rev
Author:   anguslees
Date:     2010-06-08 13:25:00 +0000 (Tue, 08 Jun 2010)

Log Message:
-----------
Provide a replacement for bionic's __assert().
The usual Android version doesn't actually print the assert message
before aborting.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/android/android.cpp

Modified: scummvm/trunk/backends/platform/android/android.cpp
===================================================================
--- scummvm/trunk/backends/platform/android/android.cpp	2010-06-08 13:23:08 UTC (rev 49505)
+++ scummvm/trunk/backends/platform/android/android.cpp	2010-06-08 13:25:00 UTC (rev 49506)
@@ -74,6 +74,14 @@
 #undef JNIEXPORT
 #define JNIEXPORT __attribute__ ((visibility("default")))
 
+// This replaces the bionic libc assert message with something that
+// actually prints the assertion failure before aborting.
+extern "C"
+void __assert(const char *file, int line, const char *expr) {
+  __android_log_assert(expr, LOG_TAG, "%s:%d: Assertion failure: %s",
+		       file, line, expr);
+}
+
 static JavaVM *cached_jvm;
 static jfieldID FID_Event_type;
 static jfieldID FID_Event_synthetic;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list