Add ability to unwind stack for the current thread

Bug: webrtc:10308
Change-Id: Ia82cb7512524bede8da69bbc747ece6e718733ab
Reviewed-on: https://webrtc-review.googlesource.com/c/124993
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26945}
diff --git a/sdk/android/native_api/stacktrace/stacktrace.h b/sdk/android/native_api/stacktrace/stacktrace.h
index 1fbf21b..4cae1a5 100644
--- a/sdk/android/native_api/stacktrace/stacktrace.h
+++ b/sdk/android/native_api/stacktrace/stacktrace.h
@@ -33,6 +33,9 @@
 // on top of unwind.h and unwinds native (C++) stack traces only.
 std::vector<StackTraceElement> GetStackTrace(int tid);
 
+// Unwind the stack of the current thread.
+std::vector<StackTraceElement> GetStackTrace();
+
 // Get a string representation of the stack trace in a format ndk-stack accepts.
 std::string StackTraceToString(
     const std::vector<StackTraceElement>& stack_trace);