File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 12
12
#include " abort_message.h"
13
13
14
14
#ifdef __BIONIC__
15
- # include < android/api-level.h>
16
- # if __ANDROID_API__ >= 21
17
- # include < syslog.h>
18
- extern " C" void android_set_abort_message (const char * msg);
19
- # else
20
- # include < assert.h>
21
- # endif // __ANDROID_API__ >= 21
15
+ # include < syslog.h>
16
+ extern " C" void android_set_abort_message (const char * msg);
22
17
#endif // __BIONIC__
23
18
24
19
#if defined(__APPLE__) && __has_include(<CrashReporterClient.h>)
@@ -59,20 +54,13 @@ void __abort_message(const char* format, ...)
59
54
vasprintf (&buffer, format, list);
60
55
va_end (list);
61
56
62
- # if __ANDROID_API__ >= 21
63
57
// Show error in tombstone.
64
58
android_set_abort_message (buffer);
65
59
66
60
// Show error in logcat.
67
61
openlog (" libc++abi" , 0 , 0 );
68
62
syslog (LOG_CRIT, " %s" , buffer);
69
63
closelog ();
70
- # else
71
- // The good error reporting wasn't available in Android until L. Since we're
72
- // about to abort anyway, just call __assert2, which will log _somewhere_
73
- // (tombstone and/or logcat) in older releases.
74
- __assert2 (__FILE__, __LINE__, __func__, buffer);
75
- # endif // __ANDROID_API__ >= 21
76
64
#endif // __BIONIC__
77
65
78
66
abort ();
You can’t perform that action at this time.
0 commit comments