Add support for the new unwind method.
Also add a comment to the GetElf function to indicate that it never returns
nullptr.
Also needed to add this library to the a million and one places that the vndk
has hard-coded this data.
Bug: 23762183
Test: Built, nothing uses the new code.
Test: However, I did run backtrace_test using this code, and all tests pass.
Change-Id: Ib270665dcb7a7607075e36d88be76dbde6e2faa8
(cherry picked from commit dc4104b720c7fd2014ccfa9fa621d02df58a43c4)
diff --git a/libbacktrace/Android.bp b/libbacktrace/Android.bp
index e02aaf2..c58d777 100644
--- a/libbacktrace/Android.bp
+++ b/libbacktrace/Android.bp
@@ -53,6 +53,8 @@
"UnwindCurrent.cpp",
"UnwindMap.cpp",
"UnwindPtrace.cpp",
+ "UnwindStack.cpp",
+ "UnwindStackMap.cpp",
]
cc_library_headers {
@@ -84,6 +86,7 @@
"libbase",
"liblog",
"libunwind",
+ "libunwindstack",
],
static_libs: ["libcutils"],
@@ -97,6 +100,7 @@
"libbase",
"liblog",
"libunwind",
+ "libunwindstack",
],
static_libs: ["libcutils"],
@@ -108,6 +112,7 @@
"libbase",
"liblog",
"libunwind",
+ "libunwindstack",
],
static_libs: ["libasync_safe", "libcutils"],
@@ -130,11 +135,13 @@
linux: {
shared_libs: [
"libunwind",
+ "libunwindstack",
],
},
android: {
shared_libs: [
"libunwind",
+ "libunwindstack",
],
},
}
@@ -161,6 +168,7 @@
shared_libs = [
"libbase",
"libunwind",
+ "libunwindstack",
"libziparchive",
],
}
@@ -192,6 +200,7 @@
"libcutils",
"liblog",
"libunwind",
+ "libunwindstack",
],
group_static_libs: true,