Use libunwindstack instead of libbacktrace.
Replace all instances of libbacktrace code with equivalent
libunwindstack code.
Test: Run 037-cfi test in optimized, interpreter, jit modes.
Test: Ran 004-ThreadStress in a loop for optimized, interpreter, jit modes.
Test: Forced an ANR and verified native stacks are correct, and that
Test: native stacks correctly stop before java stacks.
Change-Id: I642ffd61b731dae6a68a5ba9453485a79f608d28
diff --git a/runtime/native_stack_dump.h b/runtime/native_stack_dump.h
index 4d4b36b..99fb59c 100644
--- a/runtime/native_stack_dump.h
+++ b/runtime/native_stack_dump.h
@@ -23,7 +23,9 @@
#include "base/macros.h"
-class BacktraceMap;
+namespace unwindstack {
+class AndroidLocalUnwinder;
+} // namespace unwindstack
namespace art {
@@ -32,7 +34,15 @@
// Dumps the native stack for thread 'tid' to 'os'.
void DumpNativeStack(std::ostream& os,
pid_t tid,
- BacktraceMap* map = nullptr,
+ const char* prefix = "",
+ ArtMethod* current_method = nullptr,
+ void* ucontext = nullptr,
+ bool skip_frames = true)
+ NO_THREAD_SAFETY_ANALYSIS;
+
+void DumpNativeStack(std::ostream& os,
+ unwindstack::AndroidLocalUnwinder& unwinder,
+ pid_t tid,
const char* prefix = "",
ArtMethod* current_method = nullptr,
void* ucontext = nullptr,