Skip to content

Commit 40a975f

Browse files
fbleibel-gcopybara-github
authored andcommitted
Add stacktrace config for android using the generic implementation
This change adds support for unwinding stack traces on supported android platforms (NDK 33+) to absl::GetStackTrace(). PiperOrigin-RevId: 668041186 Change-Id: Ie4c4c123686050c6b81683b71fe0246e8fa75f2b
1 parent 9457dfd commit 40a975f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

absl/debugging/internal/stacktrace_config.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@
4242
#define ABSL_STACKTRACE_INL_HEADER \
4343
"absl/debugging/internal/stacktrace_emscripten-inl.inc"
4444

45+
#elif defined(__ANDROID__) && __ANDROID_API__ >= 33
46+
47+
// Use the generic implementation for Android 33+ (Android T+). This is the
48+
// first version of Android for which <execinfo.h> implements backtrace().
49+
#define ABSL_STACKTRACE_INL_HEADER \
50+
"absl/debugging/internal/stacktrace_generic-inl.inc"
51+
4552
#elif defined(__linux__) && !defined(__ANDROID__)
4653

4754
#if defined(NO_FRAME_POINTER) && \

0 commit comments

Comments
 (0)