diff options
author | dhewg | 2011-02-14 17:51:58 +0100 |
---|---|---|
committer | dhewg | 2011-02-14 18:58:56 +0100 |
commit | ea2cfc44c0ce91267aa87173cfd02eb1c69d3147 (patch) | |
tree | d4509230d3c22c5388500372001db824f5a22912 /backends | |
parent | 21c2dda5ba42d65cba71c3f27bb6679ecdd01c9e (diff) | |
download | scummvm-rg350-ea2cfc44c0ce91267aa87173cfd02eb1c69d3147.tar.gz scummvm-rg350-ea2cfc44c0ce91267aa87173cfd02eb1c69d3147.tar.bz2 scummvm-rg350-ea2cfc44c0ce91267aa87173cfd02eb1c69d3147.zip |
ANDROID: Fix assert() to log output
add bionic replacement __assert2(), so we actually see what's happening
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/android/android.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index d3b7697e7a..b59fc76a59 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -73,12 +73,20 @@ #undef JNIEXPORT #define JNIEXPORT __attribute__ ((visibility("default"))) -// This replaces the bionic libc assert message with something that +// This replaces the bionic libc assert functions 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); +extern "C" { + void __assert(const char *file, int line, const char *expr) { + __android_log_assert(expr, LOG_TAG, + "Assertion failure: '%s' in %s:%d", + expr, file, line); + } + + void __assert2(const char *file, int line, const char *func, const char *expr) { + __android_log_assert(expr, LOG_TAG, + "Assertion failure: '%s' in %s:%d (%s)", + expr, file, line, func); + } } static JavaVM *cached_jvm; |