Adjust to libunwindstack JIT api.

Test: test.py -r -b --host -t 137-cfi
Change-Id: I3518fef55c8fc43720698abd30e70d8f98fe5f21
diff --git a/runtime/backtrace_helper.cc b/runtime/backtrace_helper.cc
index d0f4b34..720bce6 100644
--- a/runtime/backtrace_helper.cc
+++ b/runtime/backtrace_helper.cc
@@ -47,14 +47,15 @@
   static constexpr const char* kTlsKey = "UnwindHelper::kTlsKey";
 
   explicit UnwindHelper(size_t max_depth)
-      : memory_(unwindstack::Memory::CreateProcessMemory(getpid())),
-        jit_(memory_),
-        dex_(memory_),
+      : arch_(unwindstack::Regs::CurrentArch()),
+        memory_(unwindstack::Memory::CreateProcessMemory(getpid())),
+        jit_(unwindstack::CreateJitDebug(arch_, memory_)),
+        dex_(unwindstack::CreateDexFiles(arch_, memory_)),
         unwinder_(max_depth, &maps_, memory_) {
     CHECK(maps_.Parse());
-    unwinder_.SetArch(unwindstack::Regs::CurrentArch());
-    unwinder_.SetJitDebug(&jit_);
-    unwinder_.SetDexFiles(&dex_);
+    unwinder_.SetArch(arch_);
+    unwinder_.SetJitDebug(jit_.get());
+    unwinder_.SetDexFiles(dex_.get());
     unwinder_.SetResolveNames(false);
     unwindstack::Elf::SetCachingEnabled(true);
   }
@@ -75,9 +76,10 @@
 
  private:
   unwindstack::LocalUpdatableMaps maps_;
+  unwindstack::ArchEnum arch_;
   std::shared_ptr<unwindstack::Memory> memory_;
-  unwindstack::JitDebug jit_;
-  unwindstack::DexFiles dex_;
+  std::unique_ptr<unwindstack::JitDebug> jit_;
+  std::unique_ptr<unwindstack::DexFiles> dex_;
   unwindstack::Unwinder unwinder_;
 };