summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-14 15:13:20 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-14 15:13:20 +0000
commitd67031983bb9fbe463a248e2989cdd9e14186cc0 (patch)
treeca23e5a04b4e10f32b624bcf61366c925485a6dc
parent09b6ba02dc7b50562f876e5ccad6d259ef54b018 (diff)
parentaf01fd1afdb9124bfdd4d8b23daa0152dd717956 (diff)
downloadunwinding-android14-mainline-conscrypt-release.tar.gz
Snap for 10654358 from af01fd1afdb9124bfdd4d8b23daa0152dd717956 to mainline-conscrypt-releaseaml_con_341614000aml_con_341511080aml_con_341410300aml_con_341310090aml_con_341110000android14-mainline-conscrypt-release
Change-Id: I2348bd86276761a3a84698c029b6f7ada0c63d6d
-rw-r--r--libunwindstack/Unwinder.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/libunwindstack/Unwinder.cpp b/libunwindstack/Unwinder.cpp
index 7304000..115a265 100644
--- a/libunwindstack/Unwinder.cpp
+++ b/libunwindstack/Unwinder.cpp
@@ -389,13 +389,17 @@ bool UnwinderFromPid::Init() {
}
}
- jit_debug_ptr_ = CreateJitDebug(arch_, process_memory_);
- jit_debug_ = jit_debug_ptr_.get();
- SetJitDebug(jit_debug_);
+ // jit_debug_ and dex_files_ may have already been set, for example in
+ // AndroidLocalUnwinder::InternalUnwind.
+ if (jit_debug_ == nullptr) {
+ jit_debug_ptr_ = CreateJitDebug(arch_, process_memory_);
+ SetJitDebug(jit_debug_ptr_.get());
+ }
#if defined(DEXFILE_SUPPORT)
- dex_files_ptr_ = CreateDexFiles(arch_, process_memory_);
- dex_files_ = dex_files_ptr_.get();
- SetDexFiles(dex_files_);
+ if (dex_files_ == nullptr) {
+ dex_files_ptr_ = CreateDexFiles(arch_, process_memory_);
+ SetDexFiles(dex_files_ptr_.get());
+ }
#endif
return true;