diff options
author | Christopher Ferris <cferris@google.com> | 2023-02-23 05:10:19 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-02-23 05:10:19 +0000 |
commit | 746041ba7aa10306457af3bc77189f715f1e87bf (patch) | |
tree | 083a1c9abb85f372edfd287a66986c49339ab8a0 | |
parent | 135165c43fe214dd24703f44d5f105497dd8e7b7 (diff) | |
parent | 2e5782145c51b538c2ec1c5df031a0e1bfea1794 (diff) | |
download | unwinding-746041ba7aa10306457af3bc77189f715f1e87bf.tar.gz |
Remove libbacktrace. am: f60075f709 am: 2374a82679 am: 2e5782145c
Original change: https://android-review.googlesource.com/c/platform/system/unwinding/+/2449889
Change-Id: I22b3c1b44946c84fa81796ea4bee6f397d9fac57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
47 files changed, 0 insertions, 5185 deletions
diff --git a/libbacktrace/.clang-format b/libbacktrace/.clang-format deleted file mode 120000 index 5f196c3..0000000 --- a/libbacktrace/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../build/soong/scripts/system-clang-format-2
\ No newline at end of file diff --git a/libbacktrace/Backtrace.cpp b/libbacktrace/Backtrace.cpp deleted file mode 100644 index 3e050ab..0000000 --- a/libbacktrace/Backtrace.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <inttypes.h> -#include <stdint.h> -#include <stdlib.h> -#include <sys/types.h> -#include <ucontext.h> - -#include <string> - -#include <android-base/stringprintf.h> -#include <android-base/threads.h> - -#include <backtrace/Backtrace.h> -#include <backtrace/BacktraceMap.h> - -#include "BacktraceLog.h" -#include "UnwindStack.h" - -using android::base::StringPrintf; - -extern "C" char* __cxa_demangle(const char*, char*, size_t*, int*); - -//------------------------------------------------------------------------- -// Backtrace functions. -//------------------------------------------------------------------------- -Backtrace::Backtrace(pid_t pid, pid_t tid, BacktraceMap* map) - : pid_(pid), tid_(tid), map_(map), map_shared_(true) { - if (map_ == nullptr) { - map_ = BacktraceMap::Create(pid); - map_shared_ = false; - } -} - -Backtrace::~Backtrace() { - if (map_ && !map_shared_) { - delete map_; - map_ = nullptr; - } -} - -std::string Backtrace::GetFunctionName(uint64_t pc, uint64_t* offset, const backtrace_map_t* map) { - backtrace_map_t map_value; - if (map == nullptr) { - FillInMap(pc, &map_value); - map = &map_value; - } - // If no map is found, or this map is backed by a device, then return nothing. - if (map->start == 0 || (map->flags & PROT_DEVICE_MAP)) { - return ""; - } - std::string name(GetFunctionNameRaw(pc, offset)); - char* demangled_name = __cxa_demangle(name.c_str(), nullptr, nullptr, nullptr); - if (demangled_name != nullptr) { - name = demangled_name; - free(demangled_name); - return name; - } - return name; -} - -bool Backtrace::VerifyReadWordArgs(uint64_t ptr, word_t* out_value) { - if (ptr & (sizeof(word_t)-1)) { - BACK_LOGW("invalid pointer %p", reinterpret_cast<void*>(ptr)); - *out_value = static_cast<word_t>(-1); - return false; - } - return true; -} - -std::string Backtrace::FormatFrameData(size_t frame_num) { - if (frame_num >= frames_.size()) { - return ""; - } - return FormatFrameData(&frames_[frame_num]); -} - -std::string Backtrace::FormatFrameData(const backtrace_frame_data_t* frame) { - std::string map_name; - if (BacktraceMap::IsValid(frame->map)) { - map_name = frame->map.Name(); - if (!frame->map.name.empty()) { - if (map_name[0] == '[' && map_name[map_name.size() - 1] == ']') { - map_name.resize(map_name.size() - 1); - map_name += StringPrintf(":%" PRIPTR "]", frame->map.start); - } - } - } else { - map_name = "<unknown>"; - } - - std::string line(StringPrintf("#%02zu pc %" PRIPTR " ", frame->num, frame->rel_pc)); - line += map_name; - // Special handling for non-zero offset maps, we need to print that - // information. - if (frame->map.offset != 0) { - line += " (offset " + StringPrintf("0x%" PRIx64, frame->map.offset) + ")"; - } - if (!frame->func_name.empty()) { - line += " (" + frame->func_name; - if (frame->func_offset) { - line += StringPrintf("+%" PRIu64, frame->func_offset); - } - line += ')'; - } - - return line; -} - -void Backtrace::FillInMap(uint64_t pc, backtrace_map_t* map) { - if (map_ != nullptr) { - map_->FillIn(pc, map); - } -} - -Backtrace* Backtrace::Create(pid_t pid, pid_t tid, BacktraceMap* map) { - if (pid == BACKTRACE_CURRENT_PROCESS) { - pid = getpid(); - if (tid == BACKTRACE_CURRENT_THREAD) { - tid = android::base::GetThreadId(); - } - } else if (tid == BACKTRACE_CURRENT_THREAD) { - tid = pid; - } - - if (pid == getpid()) { - return new UnwindStackCurrent(pid, tid, map); - } else { - return new UnwindStackPtrace(pid, tid, map); - } -} - -std::string Backtrace::GetErrorString(BacktraceUnwindError error) { - switch (error.error_code) { - case BACKTRACE_UNWIND_NO_ERROR: - return "No error"; - case BACKTRACE_UNWIND_ERROR_SETUP_FAILED: - return "Setup failed"; - case BACKTRACE_UNWIND_ERROR_MAP_MISSING: - return "No map found"; - case BACKTRACE_UNWIND_ERROR_INTERNAL: - return "Internal libbacktrace error, please submit a bugreport"; - case BACKTRACE_UNWIND_ERROR_THREAD_DOESNT_EXIST: - return "Thread doesn't exist"; - case BACKTRACE_UNWIND_ERROR_THREAD_TIMEOUT: - return "Thread has not responded to signal in time"; - case BACKTRACE_UNWIND_ERROR_UNSUPPORTED_OPERATION: - return "Attempt to use an unsupported feature"; - case BACKTRACE_UNWIND_ERROR_NO_CONTEXT: - return "Attempt to do an offline unwind without a context"; - case BACKTRACE_UNWIND_ERROR_EXCEED_MAX_FRAMES_LIMIT: - return "Exceed MAX_BACKTRACE_FRAMES limit"; - case BACKTRACE_UNWIND_ERROR_ACCESS_MEM_FAILED: - return android::base::StringPrintf("Failed to read memory at addr 0x%" PRIx64, - error.error_info.addr); - case BACKTRACE_UNWIND_ERROR_ACCESS_REG_FAILED: - return android::base::StringPrintf("Failed to read register %" PRIu64, error.error_info.regno); - case BACKTRACE_UNWIND_ERROR_FIND_PROC_INFO_FAILED: - return "Failed to find a function in debug sections"; - case BACKTRACE_UNWIND_ERROR_EXECUTE_DWARF_INSTRUCTION_FAILED: - return "Failed to execute dwarf instructions in debug sections"; - case BACKTRACE_UNWIND_ERROR_UNWIND_INFO: - return "Failed to unwind due to invalid unwind information"; - case BACKTRACE_UNWIND_ERROR_REPEATED_FRAME: - return "Failed to unwind due to same sp/pc repeating"; - case BACKTRACE_UNWIND_ERROR_INVALID_ELF: - return "Failed to unwind due to invalid elf"; - } -} diff --git a/libbacktrace/BacktraceAsyncSafeLog.h b/libbacktrace/BacktraceAsyncSafeLog.h deleted file mode 100644 index 14f51be..0000000 --- a/libbacktrace/BacktraceAsyncSafeLog.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_BACKTRACE_ASYNC_SAFE_LOG_H -#define _LIBBACKTRACE_BACKTRACE_ASYNC_SAFE_LOG_H - -#if defined(__ANDROID__) - -#include <async_safe/log.h> - -// Logging macros for use in signal handler, only available on target. -#define BACK_ASYNC_SAFE_LOGW(format, ...) \ - async_safe_format_log(ANDROID_LOG_WARN, "libbacktrace", "%s: " format, __PRETTY_FUNCTION__, \ - ##__VA_ARGS__) - -#define BACK_ASYNC_SAFE_LOGE(format, ...) \ - async_safe_format_log(ANDROID_LOG_ERROR, "libbacktrace", "%s: " format, __PRETTY_FUNCTION__, \ - ##__VA_ARGS__) - -#else - -#define BACK_ASYNC_SAFE_LOGW(format, ...) - -#define BACK_ASYNC_SAFE_LOGE(format, ...) - -#endif - -#endif // _LIBBACKTRACE_BACKTRACE_ASYNC_SAFE_LOG_H diff --git a/libbacktrace/BacktraceCurrent.cpp b/libbacktrace/BacktraceCurrent.cpp deleted file mode 100644 index 84c7bc8..0000000 --- a/libbacktrace/BacktraceCurrent.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define _GNU_SOURCE 1 -#include <errno.h> -#include <stdint.h> -#include <string.h> -#include <sys/param.h> -#include <sys/ptrace.h> -#include <sys/types.h> -#include <ucontext.h> -#include <unistd.h> - -#include <stdlib.h> - -#include <string> - -#include <android-base/file.h> -#include <android-base/threads.h> -#include <backtrace/Backtrace.h> -#include <backtrace/BacktraceMap.h> - -#include "BacktraceAsyncSafeLog.h" -#include "BacktraceCurrent.h" -#include "ThreadEntry.h" - -bool BacktraceCurrent::ReadWord(uint64_t ptr, word_t* out_value) { -#if defined(__aarch64__) - // Tagged pointer after Android R would lead top byte to have random values - // https://source.android.com/devices/tech/debug/tagged-pointers - ptr &= (1ULL << 56) - 1; -#endif - - if (!VerifyReadWordArgs(ptr, out_value)) { - return false; - } - - backtrace_map_t map; - FillInMap(ptr, &map); - if (BacktraceMap::IsValid(map) && map.flags & PROT_READ) { - *out_value = *reinterpret_cast<word_t*>(ptr); - return true; - } else { - BACK_ASYNC_SAFE_LOGW("pointer %p not in a readable map", reinterpret_cast<void*>(ptr)); - *out_value = static_cast<word_t>(-1); - return false; - } -} - -size_t BacktraceCurrent::Read(uint64_t addr, uint8_t* buffer, size_t bytes) { -#if defined(__aarch64__) - // Tagged pointer after Android R would lead top byte to have random values - // https://source.android.com/devices/tech/debug/tagged-pointers - addr &= (1ULL << 56) - 1; -#endif - - backtrace_map_t map; - FillInMap(addr, &map); - if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { - return 0; - } - bytes = MIN(map.end - addr, bytes); - memcpy(buffer, reinterpret_cast<uint8_t*>(addr), bytes); - return bytes; -} - -bool BacktraceCurrent::Unwind(size_t num_ignore_frames, void* ucontext) { - if (GetMap() == nullptr) { - // Without a map object, we can't do anything. - error_.error_code = BACKTRACE_UNWIND_ERROR_MAP_MISSING; - return false; - } - - error_.error_code = BACKTRACE_UNWIND_NO_ERROR; - if (ucontext) { - return UnwindFromContext(num_ignore_frames, ucontext); - } - - if (Tid() != static_cast<pid_t>(android::base::GetThreadId())) { - return UnwindThread(num_ignore_frames); - } - - return UnwindFromContext(num_ignore_frames, nullptr); -} - -bool BacktraceCurrent::DiscardFrame(const backtrace_frame_data_t& frame) { - if (BacktraceMap::IsValid(frame.map)) { - const std::string library = android::base::Basename(frame.map.name); - if (library == "libunwind.so" || library == "libbacktrace.so") { - return true; - } - } - return false; -} - -static pthread_mutex_t g_sigaction_mutex = PTHREAD_MUTEX_INITIALIZER; - -// Since errno is stored per thread, changing it in the signal handler -// modifies the value on the thread in which the signal handler executes. -// If a signal occurs between a call and an errno check, it's possible -// to get the errno set here. Always save and restore it just in case -// code would modify it. -class ErrnoRestorer { - public: - ErrnoRestorer() : saved_errno_(errno) {} - ~ErrnoRestorer() { - errno = saved_errno_; - } - - private: - int saved_errno_; -}; - -static void SignalLogOnly(int, siginfo_t*, void*) { - ErrnoRestorer restore; - - BACK_ASYNC_SAFE_LOGE("pid %d, tid %d: Received a spurious signal %d\n", getpid(), - static_cast<int>(android::base::GetThreadId()), THREAD_SIGNAL); -} - -static void SignalHandler(int, siginfo_t*, void* sigcontext) { - ErrnoRestorer restore; - - ThreadEntry* entry = ThreadEntry::Get(getpid(), android::base::GetThreadId(), false); - if (!entry) { - BACK_ASYNC_SAFE_LOGE("pid %d, tid %d entry not found", getpid(), - static_cast<int>(android::base::GetThreadId())); - return; - } - - entry->CopyUcontextFromSigcontext(sigcontext); - - // Indicate the ucontext is now valid. - entry->Wake(); - - // Pause the thread until the unwind is complete. This avoids having - // the thread run ahead causing problems. - // The number indicates that we are waiting for the second Wake() call - // overall which is made by the thread requesting an unwind. - if (entry->Wait(2)) { - // Do not remove the entry here because that can result in a deadlock - // if the code cannot properly send a signal to the thread under test. - entry->Wake(); - } else { - // At this point, it is possible that entry has been freed, so just exit. - BACK_ASYNC_SAFE_LOGE("Timed out waiting for unwind thread to indicate it completed."); - } -} - -bool BacktraceCurrent::UnwindThread(size_t num_ignore_frames) { - // Prevent multiple threads trying to set the trigger action on different - // threads at the same time. - pthread_mutex_lock(&g_sigaction_mutex); - - ThreadEntry* entry = ThreadEntry::Get(Pid(), Tid()); - entry->Lock(); - - struct sigaction act, oldact; - memset(&act, 0, sizeof(act)); - act.sa_sigaction = SignalHandler; - act.sa_flags = SA_RESTART | SA_SIGINFO | SA_ONSTACK; - sigemptyset(&act.sa_mask); - if (sigaction(THREAD_SIGNAL, &act, &oldact) != 0) { - BACK_ASYNC_SAFE_LOGE("sigaction failed: %s", strerror(errno)); - ThreadEntry::Remove(entry); - pthread_mutex_unlock(&g_sigaction_mutex); - error_.error_code = BACKTRACE_UNWIND_ERROR_INTERNAL; - return false; - } - - if (tgkill(Pid(), Tid(), THREAD_SIGNAL) != 0) { - // Do not emit an error message, this might be expected. Set the - // error and let the caller decide. - if (errno == ESRCH) { - error_.error_code = BACKTRACE_UNWIND_ERROR_THREAD_DOESNT_EXIST; - } else { - error_.error_code = BACKTRACE_UNWIND_ERROR_INTERNAL; - } - - sigaction(THREAD_SIGNAL, &oldact, nullptr); - ThreadEntry::Remove(entry); - pthread_mutex_unlock(&g_sigaction_mutex); - return false; - } - - // Wait for the thread to get the ucontext. The number indicates - // that we are waiting for the first Wake() call made by the thread. - bool wait_completed = entry->Wait(1); - - if (!wait_completed && oldact.sa_sigaction == nullptr) { - // If the wait failed, it could be that the signal could not be delivered - // within the timeout. Add a signal handler that's simply going to log - // something so that we don't crash if the signal eventually gets - // delivered. Only do this if there isn't already an action set up. - memset(&act, 0, sizeof(act)); - act.sa_sigaction = SignalLogOnly; - act.sa_flags = SA_RESTART | SA_SIGINFO | SA_ONSTACK; - sigemptyset(&act.sa_mask); - sigaction(THREAD_SIGNAL, &act, nullptr); - } else { - sigaction(THREAD_SIGNAL, &oldact, nullptr); - } - // After the thread has received the signal, allow other unwinders to - // continue. - pthread_mutex_unlock(&g_sigaction_mutex); - - bool unwind_done = false; - if (wait_completed) { - unwind_done = UnwindFromContext(num_ignore_frames, entry->GetUcontext()); - - // Tell the signal handler to exit and release the entry. - entry->Wake(); - - // Wait for the thread to indicate it is done with the ThreadEntry. - if (!entry->Wait(3)) { - // Send a warning, but do not mark as a failure to unwind. - BACK_ASYNC_SAFE_LOGW("Timed out waiting for signal handler to indicate it finished."); - } - } else { - // Check to see if the thread has disappeared. - if (tgkill(Pid(), Tid(), 0) == -1 && errno == ESRCH) { - error_.error_code = BACKTRACE_UNWIND_ERROR_THREAD_DOESNT_EXIST; - } else { - error_.error_code = BACKTRACE_UNWIND_ERROR_THREAD_TIMEOUT; - BACK_ASYNC_SAFE_LOGE("Timed out waiting for signal handler to get ucontext data."); - } - } - - ThreadEntry::Remove(entry); - - return unwind_done; -} diff --git a/libbacktrace/BacktraceCurrent.h b/libbacktrace/BacktraceCurrent.h deleted file mode 100644 index 55afea3..0000000 --- a/libbacktrace/BacktraceCurrent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_BACKTRACE_CURRENT_H -#define _LIBBACKTRACE_BACKTRACE_CURRENT_H - -#include <stdint.h> -#include <sys/types.h> - -#include <backtrace/Backtrace.h> - -// The signal used to cause a thread to dump the stack. -#if !defined(__BIONIC__) -// In order to run the backtrace_tests on the host, we can't use -// the internal real time signals used by GLIBC. To avoid this, -// use SIGRTMIN for the signal to dump the stack. -#define THREAD_SIGNAL SIGRTMIN -#else -#define THREAD_SIGNAL (__SIGRTMIN+1) -#endif - -class BacktraceMap; - -class BacktraceCurrent : public Backtrace { - public: - BacktraceCurrent(pid_t pid, pid_t tid, BacktraceMap* map) : Backtrace(pid, tid, map) {} - virtual ~BacktraceCurrent() {} - - size_t Read(uint64_t addr, uint8_t* buffer, size_t bytes) override; - - bool ReadWord(uint64_t ptr, word_t* out_value) override; - - bool Unwind(size_t num_ignore_frames, void* ucontext) override; - - protected: - bool DiscardFrame(const backtrace_frame_data_t& frame); - - private: - bool UnwindThread(size_t num_ignore_frames); - - virtual bool UnwindFromContext(size_t num_ignore_frames, void* ucontext) = 0; -}; - -#endif // _LIBBACKTRACE_BACKTRACE_CURRENT_H diff --git a/libbacktrace/BacktraceLog.h b/libbacktrace/BacktraceLog.h deleted file mode 100644 index 5c39f1c..0000000 --- a/libbacktrace/BacktraceLog.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_BACKTRACE_LOG_H -#define _LIBBACKTRACE_BACKTRACE_LOG_H - -#define LOG_TAG "libbacktrace" - -#include <log/log.h> - -// Macro to log the function name along with the warning message. -#define BACK_LOGW(format, ...) \ - ALOGW("%s: " format, __PRETTY_FUNCTION__, ##__VA_ARGS__) - -#define BACK_LOGE(format, ...) \ - ALOGE("%s: " format, __PRETTY_FUNCTION__, ##__VA_ARGS__) - -#endif // _LIBBACKTRACE_BACKTRACE_LOG_H diff --git a/libbacktrace/BacktraceMap.cpp b/libbacktrace/BacktraceMap.cpp deleted file mode 100644 index cd46ce0..0000000 --- a/libbacktrace/BacktraceMap.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "backtrace-map" - -#include <ctype.h> -#include <inttypes.h> -#include <stdint.h> -#include <sys/types.h> -#include <unistd.h> - -#include <log/log.h> - -#include <android-base/stringprintf.h> -#include <backtrace/Backtrace.h> -#include <backtrace/BacktraceMap.h> -#include <backtrace/backtrace_constants.h> -#if defined(__linux__) -#include <procinfo/process_map.h> -#endif - -using android::base::StringPrintf; - -std::string backtrace_map_t::Name() const { - if (!name.empty()) return name; - if (start == 0 && end == 0) return ""; - return StringPrintf("<anonymous:%" PRIPTR ">", start); -} - -BacktraceMap::BacktraceMap(pid_t pid) : pid_(pid) { - if (pid_ < 0) { - pid_ = getpid(); - } -} - -BacktraceMap::~BacktraceMap() {} - -void BacktraceMap::FillIn(uint64_t addr, backtrace_map_t* map) { - ScopedBacktraceMapIteratorLock lock(this); - for (auto it = begin(); it != end(); ++it) { - const backtrace_map_t* entry = *it; - if (addr >= entry->start && addr < entry->end) { - *map = *entry; - return; - } - } - *map = {}; -} - -#if defined(__APPLE__) -static bool ParseLine(const char* line, backtrace_map_t* map) { - uint64_t start; - uint64_t end; - char permissions[5]; - int name_pos; - - // Mac OS vmmap(1) output: - // __TEXT 0009f000-000a1000 [ 8K 8K] r-x/rwx SM=COW - // /Volumes/android/dalvik-dev/out/host/darwin-x86/bin/libcorkscrew_test\n - // 012345678901234567890123456789012345678901234567890123456789 - // 0 1 2 3 4 5 - if (sscanf(line, "%*21c %" SCNx64 "-%" SCNx64 " [%*13c] %3c/%*3c SM=%*3c %n", &start, &end, - permissions, &name_pos) != 3) { - return false; - } - - map->start = start; - map->end = end; - map->flags = PROT_NONE; - if (permissions[0] == 'r') { - map->flags |= PROT_READ; - } - if (permissions[1] == 'w') { - map->flags |= PROT_WRITE; - } - if (permissions[2] == 'x') { - map->flags |= PROT_EXEC; - } - - map->name = line + name_pos; - if (!map->name.empty() && map->name[map->name.length() - 1] == '\n') { - map->name.erase(map->name.length() - 1); - } - - ALOGV("Parsed map: start=%p, end=%p, flags=%x, name=%s", reinterpret_cast<void*>(map->start), - reinterpret_cast<void*>(map->end), map->flags, map->name.c_str()); - return true; -} -#endif // defined(__APPLE__) - -bool BacktraceMap::Build() { -#if defined(__APPLE__) - char - cmd[sizeof(pid_t) * 3 + sizeof("vmmap -w -resident -submap -allSplitLibs -interleaved ") + 1]; - char line[1024]; - // cmd is guaranteed to always be big enough to hold this string. - snprintf(cmd, sizeof(cmd), "vmmap -w -resident -submap -allSplitLibs -interleaved %d", pid_); - FILE* fp = popen(cmd, "r"); - if (fp == nullptr) { - return false; - } - - while (fgets(line, sizeof(line), fp)) { - backtrace_map_t map; - if (ParseLine(line, &map)) { - maps_.push_back(map); - } - } - pclose(fp); - return true; -#else - return android::procinfo::ReadProcessMaps(pid_, - [&](const android::procinfo::MapInfo& mapinfo) { - maps_.resize(maps_.size() + 1); - backtrace_map_t& map = maps_.back(); - map.start = mapinfo.start; - map.end = mapinfo.end; - map.flags = mapinfo.flags; - map.name = mapinfo.name; - }); -#endif -} - -#if defined(__APPLE__) -// Corkscrew and libunwind don't compile on the mac, so create a generic -// map object. -BacktraceMap* BacktraceMap::Create(pid_t pid, bool /*uncached*/) { - BacktraceMap* map = new BacktraceMap(pid); - if (!map->Build()) { - delete map; - return nullptr; - } - return map; -} -#endif diff --git a/libbacktrace/BacktracePtrace.cpp b/libbacktrace/BacktracePtrace.cpp deleted file mode 100644 index 9da457d..0000000 --- a/libbacktrace/BacktracePtrace.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <errno.h> -#include <stdint.h> -#include <string.h> -#include <sys/param.h> -#include <sys/ptrace.h> -#include <sys/types.h> -#include <ucontext.h> -#include <unistd.h> - -#include <backtrace/Backtrace.h> -#include <backtrace/BacktraceMap.h> - -#include "BacktraceLog.h" -#include "BacktracePtrace.h" - -#if !defined(__APPLE__) -static bool PtraceRead(pid_t tid, uint64_t addr, word_t* out_value) { - // ptrace() returns -1 and sets errno when the operation fails. - // To disambiguate -1 from a valid result, we clear errno beforehand. - errno = 0; - *out_value = ptrace(PTRACE_PEEKTEXT, tid, reinterpret_cast<void*>(addr), nullptr); - if (*out_value == static_cast<word_t>(-1) && errno) { - return false; - } - return true; -} -#endif - -bool BacktracePtrace::ReadWord(uint64_t ptr, word_t* out_value) { -#if defined(__APPLE__) - BACK_LOGW("MacOS does not support reading from another pid."); - return false; -#else - if (!VerifyReadWordArgs(ptr, out_value)) { - return false; - } - - backtrace_map_t map; - FillInMap(ptr, &map); - if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { - return false; - } - - return PtraceRead(Tid(), ptr, out_value); -#endif -} - -size_t BacktracePtrace::Read(uint64_t addr, uint8_t* buffer, size_t bytes) { -#if defined(__APPLE__) - BACK_LOGW("MacOS does not support reading from another pid."); - return 0; -#else - backtrace_map_t map; - FillInMap(addr, &map); - if (!BacktraceMap::IsValid(map) || !(map.flags & PROT_READ)) { - return 0; - } - - bytes = MIN(map.end - addr, bytes); - size_t bytes_read = 0; - word_t data_word; - size_t align_bytes = addr & (sizeof(word_t) - 1); - if (align_bytes != 0) { - if (!PtraceRead(Tid(), addr & ~(sizeof(word_t) - 1), &data_word)) { - return 0; - } - size_t copy_bytes = MIN(sizeof(word_t) - align_bytes, bytes); - memcpy(buffer, reinterpret_cast<uint8_t*>(&data_word) + align_bytes, copy_bytes); - addr += copy_bytes; - buffer += copy_bytes; - bytes -= copy_bytes; - bytes_read += copy_bytes; - } - - size_t num_words = bytes / sizeof(word_t); - for (size_t i = 0; i < num_words; i++) { - if (!PtraceRead(Tid(), addr, &data_word)) { - return bytes_read; - } - memcpy(buffer, &data_word, sizeof(word_t)); - buffer += sizeof(word_t); - addr += sizeof(word_t); - bytes_read += sizeof(word_t); - } - - size_t left_over = bytes & (sizeof(word_t) - 1); - if (left_over) { - if (!PtraceRead(Tid(), addr, &data_word)) { - return bytes_read; - } - memcpy(buffer, &data_word, left_over); - bytes_read += left_over; - } - return bytes_read; -#endif -} diff --git a/libbacktrace/BacktracePtrace.h b/libbacktrace/BacktracePtrace.h deleted file mode 100644 index 1ae3adf..0000000 --- a/libbacktrace/BacktracePtrace.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_BACKTRACE_PTRACE_H -#define _LIBBACKTRACE_BACKTRACE_PTRACE_H - -#include <stdint.h> -#include <sys/types.h> - -#include <backtrace/Backtrace.h> - -class BacktraceMap; - -class BacktracePtrace : public Backtrace { - public: - BacktracePtrace(pid_t pid, pid_t tid, BacktraceMap* map) : Backtrace(pid, tid, map) {} - virtual ~BacktracePtrace() {} - - size_t Read(uint64_t addr, uint8_t* buffer, size_t bytes) override; - - bool ReadWord(uint64_t ptr, word_t* out_value) override; -}; - -#endif // _LIBBACKTRACE_BACKTRACE_PTRACE_H diff --git a/libbacktrace/BacktraceTest.h b/libbacktrace/BacktraceTest.h deleted file mode 100644 index c38af04..0000000 --- a/libbacktrace/BacktraceTest.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_BACKTRACE_TEST_H -#define _LIBBACKTRACE_BACKTRACE_TEST_H - -#include <dlfcn.h> - -#include <gtest/gtest.h> - -class BacktraceTest : public ::testing::Test { - protected: - static void SetUpTestCase() { - dl_handle_ = dlopen("libbacktrace_test.so", RTLD_NOW | RTLD_LOCAL); - - test_level_one_ = reinterpret_cast<int (*)(int, int, int, int, void (*)(void*), void*)>( - dlsym(dl_handle_, "test_level_one")); - - test_level_two_ = reinterpret_cast<int (*)(int, int, int, int, void (*)(void*), void*)>( - dlsym(dl_handle_, "test_level_two")); - - test_level_three_ = reinterpret_cast<int (*)(int, int, int, int, void (*)(void*), void*)>( - dlsym(dl_handle_, "test_level_three")); - - test_level_four_ = reinterpret_cast<int (*)(int, int, int, int, void (*)(void*), void*)>( - dlsym(dl_handle_, "test_level_four")); - - test_recursive_call_ = reinterpret_cast<int (*)(int, void (*)(void*), void*)>( - dlsym(dl_handle_, "test_recursive_call")); - - test_get_context_and_wait_ = reinterpret_cast<void (*)(void*, volatile int*)>( - dlsym(dl_handle_, "test_get_context_and_wait")); - - test_signal_action_ = - reinterpret_cast<void (*)(int, siginfo_t*, void*)>(dlsym(dl_handle_, "test_signal_action")); - - test_signal_handler_ = - reinterpret_cast<void (*)(int)>(dlsym(dl_handle_, "test_signal_handler")); - } - - void SetUp() override { - ASSERT_TRUE(dl_handle_ != nullptr); - ASSERT_TRUE(test_level_one_ != nullptr); - ASSERT_TRUE(test_level_two_ != nullptr); - ASSERT_TRUE(test_level_three_ != nullptr); - ASSERT_TRUE(test_level_four_ != nullptr); - ASSERT_TRUE(test_recursive_call_ != nullptr); - ASSERT_TRUE(test_get_context_and_wait_ != nullptr); - ASSERT_TRUE(test_signal_action_ != nullptr); - ASSERT_TRUE(test_signal_handler_ != nullptr); - } - - public: - static void* dl_handle_; - static int (*test_level_one_)(int, int, int, int, void (*)(void*), void*); - static int (*test_level_two_)(int, int, int, int, void (*)(void*), void*); - static int (*test_level_three_)(int, int, int, int, void (*)(void*), void*); - static int (*test_level_four_)(int, int, int, int, void (*)(void*), void*); - static int (*test_recursive_call_)(int, void (*)(void*), void*); - static void (*test_get_context_and_wait_)(void*, volatile int*); - static void (*test_signal_action_)(int, siginfo_t*, void*); - static void (*test_signal_handler_)(int); -}; - -#endif // _LIBBACKTRACE_BACKTRACE_TEST_H diff --git a/libbacktrace/ThreadEntry.cpp b/libbacktrace/ThreadEntry.cpp deleted file mode 100644 index 9bd59e4..0000000 --- a/libbacktrace/ThreadEntry.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <pthread.h> -#include <stdint.h> -#include <string.h> -#include <sys/types.h> -#include <time.h> -#include <ucontext.h> - -#include "BacktraceAsyncSafeLog.h" -#include "ThreadEntry.h" - -// Initialize static member variables. -ThreadEntry* ThreadEntry::list_ = nullptr; -pthread_mutex_t ThreadEntry::list_mutex_ = PTHREAD_MUTEX_INITIALIZER; - -// Assumes that ThreadEntry::list_mutex_ has already been locked before -// creating a ThreadEntry object. -ThreadEntry::ThreadEntry(pid_t pid, pid_t tid) - : pid_(pid), tid_(tid), ref_count_(1), mutex_(PTHREAD_MUTEX_INITIALIZER), - wait_mutex_(PTHREAD_MUTEX_INITIALIZER), wait_value_(0), - next_(ThreadEntry::list_), prev_(nullptr) { - pthread_condattr_t attr; - pthread_condattr_init(&attr); - pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); - pthread_cond_init(&wait_cond_, &attr); - - // Add ourselves to the list. - if (ThreadEntry::list_) { - ThreadEntry::list_->prev_ = this; - } - ThreadEntry::list_ = this; -} - -ThreadEntry* ThreadEntry::Get(pid_t pid, pid_t tid, bool create) { - pthread_mutex_lock(&ThreadEntry::list_mutex_); - ThreadEntry* entry = list_; - while (entry != nullptr) { - if (entry->Match(pid, tid)) { - break; - } - entry = entry->next_; - } - - if (!entry) { - if (create) { - entry = new ThreadEntry(pid, tid); - } - } else { - entry->ref_count_++; - } - pthread_mutex_unlock(&ThreadEntry::list_mutex_); - - return entry; -} - -void ThreadEntry::Remove(ThreadEntry* entry) { - entry->Unlock(); - - pthread_mutex_lock(&ThreadEntry::list_mutex_); - if (--entry->ref_count_ == 0) { - delete entry; - } - pthread_mutex_unlock(&ThreadEntry::list_mutex_); -} - -// Assumes that ThreadEntry::list_mutex_ has already been locked before -// deleting a ThreadEntry object. -ThreadEntry::~ThreadEntry() { - if (list_ == this) { - list_ = next_; - } else { - if (next_) { - next_->prev_ = prev_; - } - prev_->next_ = next_; - } - - next_ = nullptr; - prev_ = nullptr; - - pthread_cond_destroy(&wait_cond_); -} - -bool ThreadEntry::Wait(int value) { - timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - ts.tv_sec += 5; - - bool wait_completed = true; - pthread_mutex_lock(&wait_mutex_); - while (wait_value_ != value) { - int ret = pthread_cond_timedwait(&wait_cond_, &wait_mutex_, &ts); - if (ret != 0) { - BACK_ASYNC_SAFE_LOGW("pthread_cond_timedwait for value %d failed: %s", value, strerror(ret)); - wait_completed = false; - break; - } - } - pthread_mutex_unlock(&wait_mutex_); - - return wait_completed; -} - -void ThreadEntry::Wake() { - pthread_mutex_lock(&wait_mutex_); - wait_value_++; - pthread_mutex_unlock(&wait_mutex_); - - pthread_cond_signal(&wait_cond_); -} - -void ThreadEntry::CopyUcontextFromSigcontext(void* sigcontext) { - ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(sigcontext); - // The only thing the unwinder cares about is the mcontext data. - memcpy(&ucontext_.uc_mcontext, &ucontext->uc_mcontext, sizeof(ucontext->uc_mcontext)); -} diff --git a/libbacktrace/ThreadEntry.h b/libbacktrace/ThreadEntry.h deleted file mode 100644 index caa5497..0000000 --- a/libbacktrace/ThreadEntry.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_THREAD_ENTRY_H -#define _LIBBACKTRACE_THREAD_ENTRY_H - -#include <pthread.h> -#include <sys/types.h> -#include <ucontext.h> - -class ThreadEntry { - public: - static ThreadEntry* Get(pid_t pid, pid_t tid, bool create = true); - - static void Remove(ThreadEntry* entry); - - void Wake(); - - bool Wait(int); - - void CopyUcontextFromSigcontext(void*); - - inline void Lock() { - pthread_mutex_lock(&mutex_); - - // Always reset the wait value since this could be the first or nth - // time this entry is locked. - wait_value_ = 0; - } - - inline void Unlock() { - pthread_mutex_unlock(&mutex_); - } - - inline ucontext_t* GetUcontext() { return &ucontext_; } - - private: - ThreadEntry(pid_t pid, pid_t tid); - ~ThreadEntry(); - - bool Match(pid_t chk_pid, pid_t chk_tid) { return (chk_pid == pid_ && chk_tid == tid_); } - - pid_t pid_; - pid_t tid_; - int ref_count_; - pthread_mutex_t mutex_; - pthread_mutex_t wait_mutex_; - pthread_cond_t wait_cond_; - int wait_value_; - ThreadEntry* next_; - ThreadEntry* prev_; - ucontext_t ucontext_; - - static ThreadEntry* list_; - static pthread_mutex_t list_mutex_; -}; - -#endif // _LIBBACKTRACE_THREAD_ENTRY_H diff --git a/libbacktrace/UnwindMap.cpp b/libbacktrace/UnwindMap.cpp deleted file mode 100644 index 798c769..0000000 --- a/libbacktrace/UnwindMap.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <pthread.h> -#include <stdint.h> -#include <stdlib.h> -#include <sys/types.h> -#include <unistd.h> - -#include <backtrace/BacktraceMap.h> - -#include <libunwind.h> - -#include "BacktraceLog.h" -#include "UnwindMap.h" - -//------------------------------------------------------------------------- -// libunwind has a single shared address space for the current process -// aka local. If multiple maps are created for the current pid, then -// only update the local address space once, and keep a reference count -// of maps using the same map cursor. -//------------------------------------------------------------------------- -UnwindMap::UnwindMap(pid_t pid) : BacktraceMap(pid) { - unw_map_cursor_clear(&map_cursor_); -} - -UnwindMapRemote::UnwindMapRemote(pid_t pid) : UnwindMap(pid) { -} - -UnwindMapRemote::~UnwindMapRemote() { - unw_map_cursor_destroy(&map_cursor_); - unw_map_cursor_clear(&map_cursor_); -} - -bool UnwindMapRemote::GenerateMap() { - // Use the map_cursor information to construct the BacktraceMap data - // rather than reparsing /proc/self/maps. - unw_map_cursor_reset(&map_cursor_); - - unw_map_t unw_map; - while (unw_map_cursor_get_next(&map_cursor_, &unw_map)) { - backtrace_map_t map; - - map.start = unw_map.start; - map.end = unw_map.end; - map.offset = unw_map.offset; - map.load_bias = unw_map.load_base; - map.flags = unw_map.flags; - map.name = unw_map.path; - - // The maps are in descending order, but we want them in ascending order. - maps_.push_front(map); - } - - return true; -} - -bool UnwindMapRemote::Build() { - return (unw_map_cursor_create(&map_cursor_, pid_) == 0) && GenerateMap(); -} - -UnwindMapLocal::UnwindMapLocal() : UnwindMap(getpid()), map_created_(false) { - pthread_rwlock_init(&map_lock_, nullptr); -} - -UnwindMapLocal::~UnwindMapLocal() { - if (map_created_) { - unw_map_local_destroy(); - unw_map_cursor_clear(&map_cursor_); - } -} - -bool UnwindMapLocal::GenerateMap() { - // Lock so that multiple threads cannot modify the maps data at the - // same time. - pthread_rwlock_wrlock(&map_lock_); - - // It's possible for the map to be regenerated while this loop is occurring. - // If that happens, get the map again, but only try at most three times - // before giving up. - bool generated = false; - for (int i = 0; i < 3; i++) { - maps_.clear(); - - // Save the map data retrieved so we can tell if it changes. - unw_map_local_cursor_get(&map_cursor_); - - unw_map_t unw_map; - int ret; - while ((ret = unw_map_local_cursor_get_next(&map_cursor_, &unw_map)) > 0) { - backtrace_map_t map; - - map.start = unw_map.start; - map.end = unw_map.end; - map.offset = unw_map.offset; - map.load_bias = unw_map.load_base; - map.flags = unw_map.flags; - map.name = unw_map.path; - - free(unw_map.path); - - // The maps are in descending order, but we want them in ascending order. - maps_.push_front(map); - } - // Check to see if the map changed while getting the data. - if (ret != -UNW_EINVAL) { - generated = true; - break; - } - } - - pthread_rwlock_unlock(&map_lock_); - - if (!generated) { - BACK_LOGW("Unable to generate the map."); - } - return generated; -} - -bool UnwindMapLocal::Build() { - return (map_created_ = (unw_map_local_create() == 0)) && GenerateMap();; -} - -void UnwindMapLocal::FillIn(uint64_t addr, backtrace_map_t* map) { - BacktraceMap::FillIn(addr, map); - if (!IsValid(*map)) { - // Check to see if the underlying map changed and regenerate the map - // if it did. - if (unw_map_local_cursor_valid(&map_cursor_) < 0) { - if (GenerateMap()) { - BacktraceMap::FillIn(addr, map); - } - } - } -} diff --git a/libbacktrace/UnwindMap.h b/libbacktrace/UnwindMap.h deleted file mode 100644 index 15544e8..0000000 --- a/libbacktrace/UnwindMap.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_UNWIND_MAP_H -#define _LIBBACKTRACE_UNWIND_MAP_H - -#include <pthread.h> -#include <stdint.h> -#include <sys/types.h> - -#include <backtrace/BacktraceMap.h> - -// The unw_map_cursor_t structure is different depending on whether it is -// the local or remote version. In order to get the correct version, include -// libunwind.h first then this header. - -class UnwindMap : public BacktraceMap { - public: - explicit UnwindMap(pid_t pid); - - unw_map_cursor_t* GetMapCursor() { return &map_cursor_; } - - protected: - unw_map_cursor_t map_cursor_; -}; - -class UnwindMapRemote : public UnwindMap { - public: - explicit UnwindMapRemote(pid_t pid); - virtual ~UnwindMapRemote(); - - bool Build() override; - - private: - bool GenerateMap(); -}; - -class UnwindMapLocal : public UnwindMap { - public: - UnwindMapLocal(); - virtual ~UnwindMapLocal(); - - bool Build() override; - - void FillIn(uint64_t addr, backtrace_map_t* map) override; - - void LockIterator() override { pthread_rwlock_rdlock(&map_lock_); } - void UnlockIterator() override { pthread_rwlock_unlock(&map_lock_); } - - private: - bool GenerateMap(); - - bool map_created_; - - pthread_rwlock_t map_lock_; -}; - -#endif // _LIBBACKTRACE_UNWIND_MAP_H diff --git a/libbacktrace/UnwindStack.cpp b/libbacktrace/UnwindStack.cpp deleted file mode 100644 index ae94903..0000000 --- a/libbacktrace/UnwindStack.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define _GNU_SOURCE 1 -#include <stdint.h> -#include <stdlib.h> -#include <string.h> - -#include <memory> -#include <set> -#include <string> - -#include <backtrace/Backtrace.h> -#include <unwindstack/Elf.h> -#include <unwindstack/MapInfo.h> -#include <unwindstack/Maps.h> -#include <unwindstack/Memory.h> -#include <unwindstack/Regs.h> -#include <unwindstack/RegsGetLocal.h> - -#if !defined(NO_LIBDEXFILE_SUPPORT) -#include <unwindstack/DexFiles.h> -#endif -#include <unwindstack/Unwinder.h> - -#include "BacktraceLog.h" -#include "UnwindStack.h" -#include "UnwindStackMap.h" - -extern "C" char* __cxa_demangle(const char*, char*, size_t*, int*); - -bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, - std::vector<backtrace_frame_data_t>* frames, size_t num_ignore_frames, - std::vector<std::string>* skip_names, BacktraceUnwindError* error) { - UnwindStackMap* stack_map = reinterpret_cast<UnwindStackMap*>(back_map); - auto process_memory = stack_map->process_memory(); - unwindstack::Unwinder unwinder(MAX_BACKTRACE_FRAMES + num_ignore_frames, stack_map->stack_maps(), - regs, stack_map->process_memory()); - unwinder.SetResolveNames(stack_map->ResolveNames()); - stack_map->SetArch(regs->Arch()); - if (stack_map->GetJitDebug() != nullptr) { - unwinder.SetJitDebug(stack_map->GetJitDebug()); - } -#if !defined(NO_LIBDEXFILE_SUPPORT) - if (stack_map->GetDexFiles() != nullptr) { - unwinder.SetDexFiles(stack_map->GetDexFiles()); - } -#endif - unwinder.Unwind(skip_names, &stack_map->GetSuffixesToIgnore()); - if (error != nullptr) { - switch (unwinder.LastErrorCode()) { - case unwindstack::ERROR_NONE: - error->error_code = BACKTRACE_UNWIND_NO_ERROR; - break; - - case unwindstack::ERROR_MEMORY_INVALID: - error->error_code = BACKTRACE_UNWIND_ERROR_ACCESS_MEM_FAILED; - error->error_info.addr = unwinder.LastErrorAddress(); - break; - - case unwindstack::ERROR_UNWIND_INFO: - error->error_code = BACKTRACE_UNWIND_ERROR_UNWIND_INFO; - break; - - case unwindstack::ERROR_UNSUPPORTED: - error->error_code = BACKTRACE_UNWIND_ERROR_UNSUPPORTED_OPERATION; - break; - - case unwindstack::ERROR_INVALID_MAP: - error->error_code = BACKTRACE_UNWIND_ERROR_MAP_MISSING; - break; - - case unwindstack::ERROR_MAX_FRAMES_EXCEEDED: - error->error_code = BACKTRACE_UNWIND_ERROR_EXCEED_MAX_FRAMES_LIMIT; - break; - - case unwindstack::ERROR_REPEATED_FRAME: - error->error_code = BACKTRACE_UNWIND_ERROR_REPEATED_FRAME; - break; - - case unwindstack::ERROR_INVALID_ELF: - error->error_code = BACKTRACE_UNWIND_ERROR_INVALID_ELF; - break; - - case unwindstack::ERROR_THREAD_DOES_NOT_EXIST: - error->error_code = BACKTRACE_UNWIND_ERROR_THREAD_DOESNT_EXIST; - break; - - case unwindstack::ERROR_THREAD_TIMEOUT: - error->error_code = BACKTRACE_UNWIND_ERROR_THREAD_TIMEOUT; - break; - - case unwindstack::ERROR_SYSTEM_CALL: - case unwindstack::ERROR_PTRACE_CALL: - case unwindstack::ERROR_MAPS_PARSE: - case unwindstack::ERROR_BAD_ARCH: - case unwindstack::ERROR_INVALID_PARAMETER: - error->error_code = BACKTRACE_UNWIND_ERROR_INTERNAL; - break; - } - } - - if (num_ignore_frames >= unwinder.NumFrames()) { - frames->resize(0); - return true; - } - - auto unwinder_frames = unwinder.frames(); - frames->resize(unwinder.NumFrames() - num_ignore_frames); - size_t cur_frame = 0; - for (size_t i = num_ignore_frames; i < unwinder.NumFrames(); i++) { - auto frame = &unwinder_frames[i]; - - backtrace_frame_data_t* back_frame = &frames->at(cur_frame); - - back_frame->num = cur_frame++; - - back_frame->rel_pc = frame->rel_pc; - back_frame->pc = frame->pc; - back_frame->sp = frame->sp; - - char* demangled_name = __cxa_demangle(frame->function_name.c_str(), nullptr, nullptr, nullptr); - if (demangled_name != nullptr) { - back_frame->func_name = demangled_name; - free(demangled_name); - } else { - back_frame->func_name = frame->function_name; - } - back_frame->func_offset = frame->function_offset; - - if (frame->map_info != nullptr) { - back_frame->map.name = frame->map_info->name(); - back_frame->map.start = frame->map_info->start(); - back_frame->map.end = frame->map_info->end(); - back_frame->map.offset = frame->map_info->elf_start_offset(); - back_frame->map.load_bias = frame->map_info->load_bias(); - back_frame->map.flags = frame->map_info->flags(); - } else { - back_frame->map.start = 0; - back_frame->map.end = 0; - back_frame->map.offset = 0; - back_frame->map.load_bias = 0; - back_frame->map.flags = 0; - } - } - - return true; -} - -UnwindStackCurrent::UnwindStackCurrent(pid_t pid, pid_t tid, BacktraceMap* map) - : BacktraceCurrent(pid, tid, map) {} - -std::string UnwindStackCurrent::GetFunctionNameRaw(uint64_t pc, uint64_t* offset) { - return GetMap()->GetFunctionName(pc, offset); -} - -bool UnwindStackCurrent::UnwindFromContext(size_t num_ignore_frames, void* ucontext) { - std::unique_ptr<unwindstack::Regs> regs; - if (ucontext == nullptr) { - regs.reset(unwindstack::Regs::CreateFromLocal()); - // Fill in the registers from this function. Do it here to avoid - // one extra function call appearing in the unwind. - unwindstack::RegsGetLocal(regs.get()); - } else { - regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); - } - - std::vector<std::string> skip_names{"libunwindstack.so", "libbacktrace.so"}; - if (!skip_frames_) { - skip_names.clear(); - } - return Backtrace::Unwind(regs.get(), GetMap(), &frames_, num_ignore_frames, &skip_names, &error_); -} - -UnwindStackPtrace::UnwindStackPtrace(pid_t pid, pid_t tid, BacktraceMap* map) - : BacktracePtrace(pid, tid, map), memory_(unwindstack::Memory::CreateProcessMemory(pid)) {} - -std::string UnwindStackPtrace::GetFunctionNameRaw(uint64_t pc, uint64_t* offset) { - return GetMap()->GetFunctionName(pc, offset); -} - -bool UnwindStackPtrace::Unwind(size_t num_ignore_frames, void* context) { - std::unique_ptr<unwindstack::Regs> regs; - if (context == nullptr) { - regs.reset(unwindstack::Regs::RemoteGet(Tid())); - } else { - regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), context)); - } - - return Backtrace::Unwind(regs.get(), GetMap(), &frames_, num_ignore_frames, nullptr, &error_); -} - -size_t UnwindStackPtrace::Read(uint64_t addr, uint8_t* buffer, size_t bytes) { -#if defined(__aarch64__) - // Tagged pointer after Android R would lead top byte to have random values - // https://source.android.com/devices/tech/debug/tagged-pointers - addr &= (1ULL << 56) - 1; -#endif - return memory_->Read(addr, buffer, bytes); -} diff --git a/libbacktrace/UnwindStack.h b/libbacktrace/UnwindStack.h deleted file mode 100644 index 47f6757..0000000 --- a/libbacktrace/UnwindStack.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_UNWIND_STACK_H -#define _LIBBACKTRACE_UNWIND_STACK_H - -#include <stdint.h> - -#include <memory> -#include <string> - -#include <backtrace/BacktraceMap.h> -#include <unwindstack/Memory.h> - -#include "BacktraceCurrent.h" -#include "BacktracePtrace.h" - -class UnwindStackCurrent : public BacktraceCurrent { - public: - UnwindStackCurrent(pid_t pid, pid_t tid, BacktraceMap* map); - virtual ~UnwindStackCurrent() = default; - - std::string GetFunctionNameRaw(uint64_t pc, uint64_t* offset) override; - - bool UnwindFromContext(size_t num_ignore_frames, void* ucontext) override; -}; - -class UnwindStackPtrace : public BacktracePtrace { - public: - UnwindStackPtrace(pid_t pid, pid_t tid, BacktraceMap* map); - virtual ~UnwindStackPtrace() = default; - - bool Unwind(size_t num_ignore_frames, void* context) override; - - std::string GetFunctionNameRaw(uint64_t pc, uint64_t* offset) override; - - size_t Read(uint64_t addr, uint8_t* buffer, size_t bytes) override; - - private: - std::shared_ptr<unwindstack::Memory> memory_; -}; - -#endif // _LIBBACKTRACE_UNWIND_STACK_H diff --git a/libbacktrace/UnwindStackMap.cpp b/libbacktrace/UnwindStackMap.cpp deleted file mode 100644 index b0508d9..0000000 --- a/libbacktrace/UnwindStackMap.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <stdint.h> -#include <stdlib.h> -#include <sys/types.h> - -#include <string> -#include <vector> - -#include <backtrace/BacktraceMap.h> -#include <unwindstack/Elf.h> -#include <unwindstack/MapInfo.h> -#include <unwindstack/Maps.h> -#include <unwindstack/Regs.h> - -#include "UnwindStackMap.h" - -//------------------------------------------------------------------------- -UnwindStackMap::UnwindStackMap(pid_t pid) : BacktraceMap(pid) {} - -bool UnwindStackMap::Build() { - if (pid_ == 0) { - pid_ = getpid(); - stack_maps_.reset(new unwindstack::LocalMaps); - } else { - stack_maps_.reset(new unwindstack::RemoteMaps(pid_)); - } - - // Create the process memory object. - process_memory_ = unwindstack::Memory::CreateProcessMemory(pid_); - - if (arch_ == unwindstack::ARCH_UNKNOWN) { - if (pid_ == getpid()) { - arch_ = unwindstack::Regs::CurrentArch(); - } else { - // Create a remote regs, to figure out the architecture. - std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::RemoteGet(pid_)); - if (regs.get() != nullptr) { - arch_ = regs->Arch(); - } - } - } - - // Create a JitDebug object for getting jit unwind information. - if (arch_ != unwindstack::ARCH_UNKNOWN) { - std::vector<std::string> search_libs_{"libart.so", "libartd.so"}; - jit_debug_ = CreateJitDebug(arch_, process_memory_, search_libs_); -#if !defined(NO_LIBDEXFILE_SUPPORT) - dex_files_ = CreateDexFiles(arch_, process_memory_, search_libs_); -#endif - } - - if (!stack_maps_->Parse()) { - return false; - } - - // Iterate through the maps and fill in the backtrace_map_t structure. - for (const auto& map_info : *stack_maps_) { - backtrace_map_t map; - map.start = map_info->start(); - map.end = map_info->end(); - map.offset = map_info->offset(); - // Set to -1 so that it is demand loaded. - map.load_bias = static_cast<uint64_t>(-1); - map.flags = map_info->flags(); - map.name = map_info->name(); - - maps_.push_back(map); - } - - return true; -} - -void UnwindStackMap::FillIn(uint64_t addr, backtrace_map_t* map) { - BacktraceMap::FillIn(addr, map); - if (map->load_bias != static_cast<uint64_t>(-1)) { - return; - } - - // Fill in the load_bias. - std::shared_ptr<unwindstack::MapInfo> map_info = stack_maps_->Find(addr); - if (map_info == nullptr) { - return; - } - map->load_bias = map_info->GetLoadBias(process_memory_); -} - -std::string UnwindStackMap::GetBuildId(uint64_t addr) { - auto map_info = stack_maps_->Find(addr); - return map_info == nullptr ? std::string() : map_info->GetPrintableBuildID(); -} - -uint64_t UnwindStackMap::GetLoadBias(size_t index) { - if (index >= stack_maps_->Total()) { - return 0; - } - - std::shared_ptr<unwindstack::MapInfo> map_info = stack_maps_->Get(index); - if (map_info == nullptr) { - return 0; - } - return map_info->GetLoadBias(process_memory_); -} - -std::string UnwindStackMap::GetFunctionName(uint64_t pc, uint64_t* offset) { - *offset = 0; - unwindstack::Maps* maps = stack_maps(); - - // Get the map for this - auto map_info = maps->Find(pc); - if (map_info == nullptr || map_info->flags() & PROT_DEVICE_MAP) { - return ""; - } - - if (arch_ == unwindstack::ARCH_UNKNOWN) { - if (pid_ == getpid()) { - arch_ = unwindstack::Regs::CurrentArch(); - } else { - // Create a remote regs, to figure out the architecture. - std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::RemoteGet(pid_)); - arch_ = regs->Arch(); - } - } - - unwindstack::Elf* elf = map_info->GetElf(process_memory(), arch_); - - unwindstack::SharedString name; - uint64_t func_offset; - if (!elf->GetFunctionName(elf->GetRelPc(pc, map_info.get()), &name, &func_offset)) { - return ""; - } - *offset = func_offset; - return name; -} - -std::shared_ptr<unwindstack::Memory> UnwindStackMap::GetProcessMemory() { - return process_memory_; -} - -//------------------------------------------------------------------------- -// BacktraceMap create function. -//------------------------------------------------------------------------- -BacktraceMap* BacktraceMap::Create(pid_t pid, bool uncached) { - BacktraceMap* map; - - if (uncached) { - // Force use of the base class to parse the maps when this call is made. - map = new BacktraceMap(pid); - } else if (pid == getpid()) { - map = new UnwindStackMap(0); - } else { - map = new UnwindStackMap(pid); - } - if (!map->Build()) { - delete map; - return nullptr; - } - return map; -} diff --git a/libbacktrace/UnwindStackMap.h b/libbacktrace/UnwindStackMap.h deleted file mode 100644 index 3c2591e..0000000 --- a/libbacktrace/UnwindStackMap.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_UNWINDSTACK_MAP_H -#define _LIBBACKTRACE_UNWINDSTACK_MAP_H - -#include <stdint.h> -#include <sys/types.h> - -#include <memory> -#include <mutex> -#include <unordered_map> -#include <vector> - -#include <backtrace/Backtrace.h> -#include <backtrace/BacktraceMap.h> -#if !defined(NO_LIBDEXFILE_SUPPORT) -#include <unwindstack/DexFiles.h> -#endif -#include <unwindstack/Elf.h> -#include <unwindstack/JitDebug.h> -#include <unwindstack/Maps.h> -#include <unwindstack/Memory.h> - -// Forward declarations. -class UnwindDexFile; - -class UnwindStackMap : public BacktraceMap { - public: - explicit UnwindStackMap(pid_t pid); - ~UnwindStackMap() = default; - - bool Build() override; - - void FillIn(uint64_t addr, backtrace_map_t* map) override; - - std::string GetBuildId(uint64_t addr) override; - - virtual std::string GetFunctionName(uint64_t pc, uint64_t* offset) override; - virtual std::shared_ptr<unwindstack::Memory> GetProcessMemory() override final; - - unwindstack::Maps* stack_maps() { return stack_maps_.get(); } - - const std::shared_ptr<unwindstack::Memory>& process_memory() { return process_memory_; } - - unwindstack::JitDebug* GetJitDebug() { return jit_debug_.get(); } - -#if !defined(NO_LIBDEXFILE_SUPPORT) - unwindstack::DexFiles* GetDexFiles() { return dex_files_.get(); } -#endif - - void SetArch(unwindstack::ArchEnum arch) { arch_ = arch; } - - protected: - uint64_t GetLoadBias(size_t index) override; - - std::unique_ptr<unwindstack::Maps> stack_maps_; - std::shared_ptr<unwindstack::Memory> process_memory_; - std::unique_ptr<unwindstack::JitDebug> jit_debug_; -#if !defined(NO_LIBDEXFILE_SUPPORT) - std::unique_ptr<unwindstack::DexFiles> dex_files_; -#endif - - unwindstack::ArchEnum arch_ = unwindstack::ARCH_UNKNOWN; -}; - -#endif // _LIBBACKTRACE_UNWINDSTACK_MAP_H diff --git a/libbacktrace/backtrace_benchmarks.cpp b/libbacktrace/backtrace_benchmarks.cpp deleted file mode 100644 index a93a25e..0000000 --- a/libbacktrace/backtrace_benchmarks.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <string.h> -#include <sys/prctl.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <sys/wait.h> -#include <unistd.h> - -#include <string> - -#include <android-base/file.h> -#include <android-base/threads.h> - -#include <benchmark/benchmark.h> - -#include <backtrace/Backtrace.h> -#include <backtrace/BacktraceMap.h> -#include <unwindstack/Memory.h> - -constexpr size_t kNumMaps = 2000; - -static bool CountMaps(pid_t pid, size_t* num_maps) { - // Minimize the calls that might allocate memory. If too much memory - // gets allocated, then this routine will add extra maps and the next - // call will fail to get the same number of maps as before. - int fd = - open((std::string("/proc/") + std::to_string(pid) + "/maps").c_str(), O_RDONLY | O_CLOEXEC); - if (fd == -1) { - fprintf(stderr, "Cannot open map file for pid %d: %s\n", pid, strerror(errno)); - return false; - } - *num_maps = 0; - while (true) { - char buffer[2048]; - ssize_t bytes = read(fd, buffer, sizeof(buffer)); - if (bytes <= 0) { - break; - } - // Count the '\n'. - for (size_t i = 0; i < static_cast<size_t>(bytes); i++) { - if (buffer[i] == '\n') { - ++*num_maps; - } - } - } - - close(fd); - return true; -} - -static void CreateMap(benchmark::State& state, BacktraceMap* (*map_func)(pid_t, bool)) { - // Create a remote process so that the map data is exactly the same. - // Also, so that we can create a set number of maps. - pid_t pid; - if ((pid = fork()) == 0) { - size_t num_maps; - if (!CountMaps(getpid(), &num_maps)) { - exit(1); - } - // Create uniquely named maps. - std::vector<void*> maps; - for (size_t i = num_maps; i < kNumMaps; i++) { - int flags = PROT_READ | PROT_WRITE; - // Alternate page type to make sure a map entry is added for each call. - if ((i % 2) == 0) { - flags |= PROT_EXEC; - } - void* memory = mmap(nullptr, PAGE_SIZE, flags, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (memory == MAP_FAILED) { - fprintf(stderr, "Failed to create map: %s\n", strerror(errno)); - exit(1); - } - memset(memory, 0x1, PAGE_SIZE); -#if defined(PR_SET_VMA) - if (prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, memory, PAGE_SIZE, "test_map") == -1) { - fprintf(stderr, "Failed: %s\n", strerror(errno)); - } -#endif - maps.push_back(memory); - } - - if (!CountMaps(getpid(), &num_maps)) { - exit(1); - } - - if (num_maps < kNumMaps) { - fprintf(stderr, "Maps set incorrectly: %zu found, %zu expected at least.\n", num_maps, - kNumMaps); - std::string str; - android::base::ReadFileToString("/proc/self/maps", &str); - fprintf(stderr, "%s\n", str.c_str()); - exit(1); - } - - // Wait for an hour at most. - sleep(3600); - exit(1); - } else if (pid < 0) { - fprintf(stderr, "Fork failed: %s\n", strerror(errno)); - return; - } - - size_t num_maps = 0; - for (size_t i = 0; i < 2000; i++) { - if (CountMaps(pid, &num_maps) && num_maps >= kNumMaps) { - break; - } - usleep(1000); - } - if (num_maps < kNumMaps) { - fprintf(stderr, "Timed out waiting for the number of maps available: %zu\n", num_maps); - return; - } - - while (state.KeepRunning()) { - BacktraceMap* map = map_func(pid, false); - if (map == nullptr) { - fprintf(stderr, "Failed to create map\n"); - return; - } - delete map; - } - - kill(pid, SIGKILL); - waitpid(pid, nullptr, 0); -} - -static void BM_create_map(benchmark::State& state) { - CreateMap(state, BacktraceMap::Create); -} -BENCHMARK(BM_create_map); - -using BacktraceCreateFn = decltype(Backtrace::Create); - -static void CreateBacktrace(benchmark::State& state, BacktraceMap* map, BacktraceCreateFn fn) { - while (state.KeepRunning()) { - std::unique_ptr<Backtrace> backtrace(fn(getpid(), android::base::GetThreadId(), map)); - backtrace->Unwind(0); - } -} - -static void BM_create_backtrace(benchmark::State& state) { - std::unique_ptr<BacktraceMap> backtrace_map(BacktraceMap::Create(getpid())); - CreateBacktrace(state, backtrace_map.get(), Backtrace::Create); -} -BENCHMARK(BM_create_backtrace); - -BENCHMARK_MAIN(); diff --git a/libbacktrace/backtrace_read_benchmarks.cpp b/libbacktrace/backtrace_read_benchmarks.cpp deleted file mode 100644 index 6a688b0..0000000 --- a/libbacktrace/backtrace_read_benchmarks.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <errno.h> -#include <signal.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/mman.h> -#include <sys/ptrace.h> -#include <sys/types.h> -#include <sys/uio.h> -#include <sys/wait.h> -#include <unistd.h> - -#include <memory> -#include <vector> - -#include <benchmark/benchmark.h> - -#include <backtrace/Backtrace.h> - -#define AT_COMMON_SIZES Arg(1)->Arg(4)->Arg(8)->Arg(16)->Arg(100)->Arg(200)->Arg(500)->Arg(1024) - -static void Attach(pid_t pid) { - if (ptrace(PTRACE_ATTACH, pid, 0, 0) == -1) { - perror("Failed to attach"); - abort(); - } - - siginfo_t si; - // Wait for up to 5 seconds. - for (size_t i = 0; i < 5000; i++) { - if (ptrace(PTRACE_GETSIGINFO, pid, 0, &si) == 0) { - return; - } - usleep(1000); - } - printf("Remote process failed to stop in five seconds.\n"); - abort(); -} - -class ScopedPidReaper { - public: - ScopedPidReaper(pid_t pid) : pid_(pid) {} - ~ScopedPidReaper() { - kill(pid_, SIGKILL); - waitpid(pid_, nullptr, 0); - } - - private: - pid_t pid_; -}; - -static size_t ProcessVmRead(pid_t pid, uint64_t remote_src, void* dst, size_t len) { - struct iovec dst_iov = { - .iov_base = dst, .iov_len = len, - }; - - struct iovec src_iov = { - .iov_base = reinterpret_cast<void*>(remote_src), .iov_len = len, - }; - - ssize_t rc = process_vm_readv(pid, &dst_iov, 1, &src_iov, 1, 0); - return rc == -1 ? 0 : rc; -} - -static bool PtraceReadLong(pid_t pid, uint64_t addr, long* value) { - // ptrace() returns -1 and sets errno when the operation fails. - // To disambiguate -1 from a valid result, we clear errno beforehand. - errno = 0; - *value = ptrace(PTRACE_PEEKTEXT, pid, reinterpret_cast<void*>(addr), nullptr); - if (*value == -1 && errno) { - return false; - } - return true; -} - -static size_t PtraceRead(pid_t pid, uint64_t addr, void* dst, size_t bytes) { - size_t bytes_read = 0; - long data; - for (size_t i = 0; i < bytes / sizeof(long); i++) { - if (!PtraceReadLong(pid, addr, &data)) { - return bytes_read; - } - memcpy(dst, &data, sizeof(long)); - dst = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(dst) + sizeof(long)); - addr += sizeof(long); - bytes_read += sizeof(long); - } - - size_t left_over = bytes & (sizeof(long) - 1); - if (left_over) { - if (!PtraceReadLong(pid, addr, &data)) { - return bytes_read; - } - memcpy(dst, &data, left_over); - bytes_read += left_over; - } - return bytes_read; -} - -static void CreateRemoteProcess(size_t size, void** map, pid_t* pid) { - *map = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (*map == MAP_FAILED) { - perror("Can't allocate memory"); - abort(); - } - memset(*map, 0xaa, size); - - if ((*pid = fork()) == 0) { - for (volatile int i = 0;; i++) - ; - exit(1); - } - if (*pid < 0) { - perror("Failed to fork"); - abort(); - } - Attach(*pid); - // Don't need this map in the current process any more. - munmap(*map, size); -} - -static void BM_read_with_ptrace(benchmark::State& state) { - void* map; - pid_t pid; - CreateRemoteProcess(state.range(0), &map, &pid); - ScopedPidReaper reap(pid); - - std::vector<uint8_t> read_buffer(state.range(0)); - uint64_t addr = reinterpret_cast<uint64_t>(map); - while (state.KeepRunning()) { - if (PtraceRead(pid, addr, read_buffer.data(), read_buffer.size()) != read_buffer.size()) { - printf("Unexpected bad read.\n"); - abort(); - } - } - ptrace(PTRACE_DETACH, pid, 0, 0); -} -BENCHMARK(BM_read_with_ptrace)->AT_COMMON_SIZES; - -static void BM_read_with_process_vm_read(benchmark::State& state) { - void* map; - pid_t pid; - CreateRemoteProcess(state.range(0), &map, &pid); - ScopedPidReaper reap(pid); - - std::vector<uint8_t> read_buffer(state.range(0)); - uint64_t addr = reinterpret_cast<uint64_t>(map); - while (state.KeepRunning()) { - if (ProcessVmRead(pid, addr, read_buffer.data(), read_buffer.size()) != read_buffer.size()) { - printf("Unexpected bad read.\n"); - abort(); - } - } - ptrace(PTRACE_DETACH, pid, 0, 0); -} -BENCHMARK(BM_read_with_process_vm_read)->AT_COMMON_SIZES; - -static void BM_read_with_backtrace_object(benchmark::State& state) { - void* map; - pid_t pid; - CreateRemoteProcess(state.range(0), &map, &pid); - ScopedPidReaper reap(pid); - - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, BACKTRACE_CURRENT_THREAD)); - if (backtrace.get() == nullptr) { - printf("Failed to create backtrace.\n"); - abort(); - } - - uint64_t addr = reinterpret_cast<uint64_t>(map); - std::vector<uint8_t> read_buffer(state.range(0)); - while (state.KeepRunning()) { - if (backtrace->Read(addr, read_buffer.data(), read_buffer.size()) != read_buffer.size()) { - printf("Unexpected bad read.\n"); - abort(); - } - } - ptrace(PTRACE_DETACH, pid, 0, 0); -} -BENCHMARK(BM_read_with_backtrace_object)->AT_COMMON_SIZES; diff --git a/libbacktrace/backtrace_test.cpp b/libbacktrace/backtrace_test.cpp deleted file mode 100644 index b978349..0000000 --- a/libbacktrace/backtrace_test.cpp +++ /dev/null @@ -1,1910 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define _GNU_SOURCE 1 -#include <dirent.h> -#include <dlfcn.h> -#include <errno.h> -#include <fcntl.h> -#include <inttypes.h> -#include <malloc.h> -#include <pthread.h> -#include <signal.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/ptrace.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <sys/wait.h> -#include <time.h> -#include <ucontext.h> -#include <unistd.h> - -#include <algorithm> -#include <list> -#include <memory> -#include <ostream> -#include <string> -#include <vector> - -#include <backtrace/Backtrace.h> -#include <backtrace/BacktraceMap.h> - -#include <android-base/file.h> -#include <android-base/macros.h> -#include <android-base/stringprintf.h> -#include <android-base/test_utils.h> -#include <android-base/threads.h> -#include <android-base/unique_fd.h> -#include <cutils/atomic.h> - -#include <gtest/gtest.h> - -// For the THREAD_SIGNAL definition. -#include "BacktraceCurrent.h" -#include "BacktraceTest.h" -#include "backtrace_testlib.h" - -// Number of microseconds per milliseconds. -#define US_PER_MSEC 1000 - -// Number of nanoseconds in a second. -#define NS_PER_SEC 1000000000ULL - -// Number of simultaneous dumping operations to perform. -#define NUM_THREADS 40 - -// Number of simultaneous threads running in our forked process. -#define NUM_PTRACE_THREADS 5 - -// The list of shared libaries that make up the backtrace library. -static std::vector<std::string> kBacktraceLibs{"libunwindstack.so", "libbacktrace.so"}; - -struct thread_t { - pid_t tid; - int32_t state; - pthread_t threadId; - void* data; -}; - -struct dump_thread_t { - thread_t thread; - BacktraceMap* map; - Backtrace* backtrace; - int32_t* now; - int32_t done; -}; - -typedef Backtrace* (*create_func_t)(pid_t, pid_t, BacktraceMap*); -typedef BacktraceMap* (*map_create_func_t)(pid_t, bool); - -static void VerifyLevelDump(Backtrace* backtrace, create_func_t create_func = nullptr, - map_create_func_t map_func = nullptr); -static void VerifyMaxDump(Backtrace* backtrace, create_func_t create_func = nullptr, - map_create_func_t map_func = nullptr); - -void* BacktraceTest::dl_handle_; -int (*BacktraceTest::test_level_one_)(int, int, int, int, void (*)(void*), void*); -int (*BacktraceTest::test_level_two_)(int, int, int, int, void (*)(void*), void*); -int (*BacktraceTest::test_level_three_)(int, int, int, int, void (*)(void*), void*); -int (*BacktraceTest::test_level_four_)(int, int, int, int, void (*)(void*), void*); -int (*BacktraceTest::test_recursive_call_)(int, void (*)(void*), void*); -void (*BacktraceTest::test_get_context_and_wait_)(void*, volatile int*); -void (*BacktraceTest::test_signal_action_)(int, siginfo_t*, void*); -void (*BacktraceTest::test_signal_handler_)(int); - -extern "C" bool GetInitialArgs(const char*** args, size_t* num_args) { - static const char* initial_args[] = {"--slow_threshold_ms=8000", "--deadline_threshold_ms=15000"}; - *args = initial_args; - *num_args = 2; - return true; -} - -static uint64_t NanoTime() { - struct timespec t = { 0, 0 }; - clock_gettime(CLOCK_MONOTONIC, &t); - return static_cast<uint64_t>(t.tv_sec * NS_PER_SEC + t.tv_nsec); -} - -static std::string DumpFrames(Backtrace* backtrace) { - if (backtrace->NumFrames() == 0) { - return " No frames to dump.\n"; - } - - std::string frame; - for (size_t i = 0; i < backtrace->NumFrames(); i++) { - frame += " " + backtrace->FormatFrameData(i) + '\n'; - } - return frame; -} - -static void WaitForStop(pid_t pid) { - uint64_t start = NanoTime(); - - siginfo_t si; - while (ptrace(PTRACE_GETSIGINFO, pid, 0, &si) < 0 && (errno == EINTR || errno == ESRCH)) { - if ((NanoTime() - start) > NS_PER_SEC) { - printf("The process did not get to a stopping point in 1 second.\n"); - break; - } - usleep(US_PER_MSEC); - } -} - -static void CreateRemoteProcess(pid_t* pid) { - if ((*pid = fork()) == 0) { - while (true) - ; - _exit(0); - } - ASSERT_NE(-1, *pid); - - ASSERT_TRUE(ptrace(PTRACE_ATTACH, *pid, 0, 0) == 0); - - // Wait for the process to get to a stopping point. - WaitForStop(*pid); -} - -static void FinishRemoteProcess(pid_t pid) { - ASSERT_TRUE(ptrace(PTRACE_DETACH, pid, 0, 0) == 0); - - kill(pid, SIGKILL); - ASSERT_EQ(waitpid(pid, nullptr, 0), pid); -} - -#if !defined(__ANDROID__) || defined(__arm__) -// On host and arm target we aren't guaranteed that we will terminate cleanly. -#define VERIFY_NO_ERROR(error_code) \ - ASSERT_TRUE(error_code == BACKTRACE_UNWIND_NO_ERROR || \ - error_code == BACKTRACE_UNWIND_ERROR_UNWIND_INFO || \ - error_code == BACKTRACE_UNWIND_ERROR_MAP_MISSING) \ - << "Unknown error code " << std::to_string(error_code); -#else -#define VERIFY_NO_ERROR(error_code) ASSERT_EQ(BACKTRACE_UNWIND_NO_ERROR, error_code); -#endif - -static bool ReadyLevelBacktrace(Backtrace* backtrace) { - // See if test_level_four is in the backtrace. - bool found = false; - for (Backtrace::const_iterator it = backtrace->begin(); it != backtrace->end(); ++it) { - if (it->func_name == "test_level_four") { - found = true; - break; - } - } - - return found; -} - -static void VerifyLevelDump(Backtrace* backtrace, create_func_t, map_create_func_t) { - ASSERT_GT(backtrace->NumFrames(), static_cast<size_t>(0)) - << DumpFrames(backtrace); - ASSERT_LT(backtrace->NumFrames(), static_cast<size_t>(MAX_BACKTRACE_FRAMES)) - << DumpFrames(backtrace); - - // Look through the frames starting at the highest to find the - // frame we want. - size_t frame_num = 0; - for (size_t i = backtrace->NumFrames()-1; i > 2; i--) { - if (backtrace->GetFrame(i)->func_name == "test_level_one") { - frame_num = i; - break; - } - } - ASSERT_LT(static_cast<size_t>(0), frame_num) << DumpFrames(backtrace); - ASSERT_LE(static_cast<size_t>(3), frame_num) << DumpFrames(backtrace); - - ASSERT_EQ(backtrace->GetFrame(frame_num)->func_name, "test_level_one") - << DumpFrames(backtrace); - ASSERT_EQ(backtrace->GetFrame(frame_num-1)->func_name, "test_level_two") - << DumpFrames(backtrace); - ASSERT_EQ(backtrace->GetFrame(frame_num-2)->func_name, "test_level_three") - << DumpFrames(backtrace); - ASSERT_EQ(backtrace->GetFrame(frame_num-3)->func_name, "test_level_four") - << DumpFrames(backtrace); -} - -static void VerifyLevelBacktrace(void*) { - std::unique_ptr<Backtrace> backtrace( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - - VerifyLevelDump(backtrace.get()); -} - -static bool ReadyMaxBacktrace(Backtrace* backtrace) { - return (backtrace->NumFrames() == MAX_BACKTRACE_FRAMES); -} - -static void VerifyMaxDump(Backtrace* backtrace, create_func_t, map_create_func_t) { - ASSERT_EQ(backtrace->NumFrames(), static_cast<size_t>(MAX_BACKTRACE_FRAMES)) - << DumpFrames(backtrace); - // Verify that the last frame is our recursive call. - ASSERT_EQ(backtrace->GetFrame(MAX_BACKTRACE_FRAMES-1)->func_name, "test_recursive_call") - << DumpFrames(backtrace); -} - -static void VerifyMaxBacktrace(void*) { - std::unique_ptr<Backtrace> backtrace( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - ASSERT_EQ(BACKTRACE_UNWIND_ERROR_EXCEED_MAX_FRAMES_LIMIT, backtrace->GetError().error_code); - - VerifyMaxDump(backtrace.get()); -} - -static void ThreadSetState(void* data) { - thread_t* thread = reinterpret_cast<thread_t*>(data); - android_atomic_acquire_store(1, &thread->state); - volatile int i = 0; - while (thread->state) { - i++; - } -} - -static bool WaitForNonZero(int32_t* value, uint64_t seconds) { - uint64_t start = NanoTime(); - do { - if (android_atomic_acquire_load(value)) { - return true; - } - } while ((NanoTime() - start) < seconds * NS_PER_SEC); - return false; -} - -TEST_F(BacktraceTest, local_no_unwind_frames) { - // Verify that a local unwind does not include any frames within - // libunwind or libbacktrace. - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), getpid())); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - - ASSERT_TRUE(backtrace->NumFrames() != 0); - // None of the frames should be in the backtrace libraries. - for (const auto& frame : *backtrace ) { - if (BacktraceMap::IsValid(frame.map)) { - const std::string name = android::base::Basename(frame.map.name); - for (const auto& lib : kBacktraceLibs) { - ASSERT_TRUE(name != lib) << DumpFrames(backtrace.get()); - } - } - } -} - -TEST_F(BacktraceTest, local_unwind_frames) { - // Verify that a local unwind with the skip frames disabled does include - // frames within the backtrace libraries. - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), getpid())); - ASSERT_TRUE(backtrace.get() != nullptr); - backtrace->SetSkipFrames(false); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - - ASSERT_TRUE(backtrace->NumFrames() != 0); - size_t first_frame_non_backtrace_lib = 0; - for (const auto& frame : *backtrace) { - if (BacktraceMap::IsValid(frame.map)) { - const std::string name = android::base::Basename(frame.map.name); - bool found = false; - for (const auto& lib : kBacktraceLibs) { - if (name == lib) { - found = true; - break; - } - } - if (!found) { - first_frame_non_backtrace_lib = frame.num; - break; - } - } - } - - ASSERT_NE(0U, first_frame_non_backtrace_lib) << "No frames found in backtrace libraries:\n" - << DumpFrames(backtrace.get()); -} - -TEST_F(BacktraceTest, local_trace) { - ASSERT_NE(test_level_one_(1, 2, 3, 4, VerifyLevelBacktrace, nullptr), 0); -} - -static void VerifyIgnoreFrames(Backtrace* bt_all, Backtrace* bt_ign1, Backtrace* bt_ign2, - const char* cur_proc) { - ASSERT_EQ(bt_all->NumFrames(), bt_ign1->NumFrames() + 1) << "All backtrace:\n" - << DumpFrames(bt_all) - << "Ignore 1 backtrace:\n" - << DumpFrames(bt_ign1); - ASSERT_EQ(bt_all->NumFrames(), bt_ign2->NumFrames() + 2) << "All backtrace:\n" - << DumpFrames(bt_all) - << "Ignore 2 backtrace:\n" - << DumpFrames(bt_ign2); - - // Check all of the frames are the same > the current frame. - bool check = (cur_proc == nullptr); - for (size_t i = 0; i < bt_ign2->NumFrames(); i++) { - if (check) { - EXPECT_EQ(bt_ign2->GetFrame(i)->pc, bt_ign1->GetFrame(i+1)->pc); - EXPECT_EQ(bt_ign2->GetFrame(i)->sp, bt_ign1->GetFrame(i+1)->sp); - EXPECT_EQ(bt_ign2->GetFrame(i)->stack_size, bt_ign1->GetFrame(i+1)->stack_size); - - EXPECT_EQ(bt_ign2->GetFrame(i)->pc, bt_all->GetFrame(i+2)->pc); - EXPECT_EQ(bt_ign2->GetFrame(i)->sp, bt_all->GetFrame(i+2)->sp); - EXPECT_EQ(bt_ign2->GetFrame(i)->stack_size, bt_all->GetFrame(i+2)->stack_size); - } - if (!check && bt_ign2->GetFrame(i)->func_name == cur_proc) { - check = true; - } - } -} - -static void VerifyLevelIgnoreFrames(void*) { - std::unique_ptr<Backtrace> all( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(all.get() != nullptr); - ASSERT_TRUE(all->Unwind(0)); - VERIFY_NO_ERROR(all->GetError().error_code); - - std::unique_ptr<Backtrace> ign1( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(ign1.get() != nullptr); - ASSERT_TRUE(ign1->Unwind(1)); - VERIFY_NO_ERROR(ign1->GetError().error_code); - - std::unique_ptr<Backtrace> ign2( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(ign2.get() != nullptr); - ASSERT_TRUE(ign2->Unwind(2)); - VERIFY_NO_ERROR(ign2->GetError().error_code); - - VerifyIgnoreFrames(all.get(), ign1.get(), ign2.get(), "VerifyLevelIgnoreFrames"); -} - -TEST_F(BacktraceTest, local_trace_ignore_frames) { - ASSERT_NE(test_level_one_(1, 2, 3, 4, VerifyLevelIgnoreFrames, nullptr), 0); -} - -TEST_F(BacktraceTest, local_max_trace) { - ASSERT_NE(test_recursive_call_(MAX_BACKTRACE_FRAMES + 10, VerifyMaxBacktrace, nullptr), 0); -} - -static void VerifyProcTest(pid_t pid, pid_t tid, bool (*ReadyFunc)(Backtrace*), - void (*VerifyFunc)(Backtrace*, create_func_t, map_create_func_t), - create_func_t create_func, map_create_func_t map_create_func) { - pid_t ptrace_tid; - if (tid < 0) { - ptrace_tid = pid; - } else { - ptrace_tid = tid; - } - uint64_t start = NanoTime(); - bool verified = false; - std::string last_dump; - do { - usleep(US_PER_MSEC); - if (ptrace(PTRACE_ATTACH, ptrace_tid, 0, 0) == 0) { - // Wait for the process to get to a stopping point. - WaitForStop(ptrace_tid); - - std::unique_ptr<BacktraceMap> map; - map.reset(map_create_func(pid, false)); - std::unique_ptr<Backtrace> backtrace(create_func(pid, tid, map.get())); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - if (ReadyFunc(backtrace.get())) { - VerifyFunc(backtrace.get(), create_func, map_create_func); - verified = true; - } else { - last_dump = DumpFrames(backtrace.get()); - } - - ASSERT_TRUE(ptrace(PTRACE_DETACH, ptrace_tid, 0, 0) == 0); - } - // If 5 seconds have passed, then we are done. - } while (!verified && (NanoTime() - start) <= 5 * NS_PER_SEC); - ASSERT_TRUE(verified) << "Last backtrace:\n" << last_dump; -} - -TEST_F(BacktraceTest, ptrace_trace) { - pid_t pid; - if ((pid = fork()) == 0) { - ASSERT_NE(test_level_one_(1, 2, 3, 4, nullptr, nullptr), 0); - _exit(1); - } - VerifyProcTest(pid, BACKTRACE_CURRENT_THREAD, ReadyLevelBacktrace, VerifyLevelDump, - Backtrace::Create, BacktraceMap::Create); - - kill(pid, SIGKILL); - int status; - ASSERT_EQ(waitpid(pid, &status, 0), pid); -} - -TEST_F(BacktraceTest, ptrace_max_trace) { - pid_t pid; - if ((pid = fork()) == 0) { - ASSERT_NE(test_recursive_call_(MAX_BACKTRACE_FRAMES + 10, nullptr, nullptr), 0); - _exit(1); - } - VerifyProcTest(pid, BACKTRACE_CURRENT_THREAD, ReadyMaxBacktrace, VerifyMaxDump, Backtrace::Create, - BacktraceMap::Create); - - kill(pid, SIGKILL); - int status; - ASSERT_EQ(waitpid(pid, &status, 0), pid); -} - -static void VerifyProcessIgnoreFrames(Backtrace* bt_all, create_func_t create_func, - map_create_func_t map_create_func) { - std::unique_ptr<BacktraceMap> map(map_create_func(bt_all->Pid(), false)); - std::unique_ptr<Backtrace> ign1(create_func(bt_all->Pid(), BACKTRACE_CURRENT_THREAD, map.get())); - ASSERT_TRUE(ign1.get() != nullptr); - ASSERT_TRUE(ign1->Unwind(1)); - VERIFY_NO_ERROR(ign1->GetError().error_code); - - std::unique_ptr<Backtrace> ign2(create_func(bt_all->Pid(), BACKTRACE_CURRENT_THREAD, map.get())); - ASSERT_TRUE(ign2.get() != nullptr); - ASSERT_TRUE(ign2->Unwind(2)); - VERIFY_NO_ERROR(ign2->GetError().error_code); - - VerifyIgnoreFrames(bt_all, ign1.get(), ign2.get(), nullptr); -} - -TEST_F(BacktraceTest, ptrace_ignore_frames) { - pid_t pid; - if ((pid = fork()) == 0) { - ASSERT_NE(test_level_one_(1, 2, 3, 4, nullptr, nullptr), 0); - _exit(1); - } - VerifyProcTest(pid, BACKTRACE_CURRENT_THREAD, ReadyLevelBacktrace, VerifyProcessIgnoreFrames, - Backtrace::Create, BacktraceMap::Create); - - kill(pid, SIGKILL); - int status; - ASSERT_EQ(waitpid(pid, &status, 0), pid); -} - -// Create a process with multiple threads and dump all of the threads. -static void* PtraceThreadLevelRun(void*) { - EXPECT_NE(BacktraceTest::test_level_one_(1, 2, 3, 4, nullptr, nullptr), 0); - return nullptr; -} - -static void GetThreads(pid_t pid, std::vector<pid_t>* threads) { - // Get the list of tasks. - char task_path[128]; - snprintf(task_path, sizeof(task_path), "/proc/%d/task", pid); - - std::unique_ptr<DIR, decltype(&closedir)> tasks_dir(opendir(task_path), closedir); - ASSERT_TRUE(tasks_dir != nullptr); - struct dirent* entry; - while ((entry = readdir(tasks_dir.get())) != nullptr) { - char* end; - pid_t tid = strtoul(entry->d_name, &end, 10); - if (*end == '\0') { - threads->push_back(tid); - } - } -} - -TEST_F(BacktraceTest, ptrace_threads) { - pid_t pid; - if ((pid = fork()) == 0) { - for (size_t i = 0; i < NUM_PTRACE_THREADS; i++) { - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - - pthread_t thread; - ASSERT_TRUE(pthread_create(&thread, &attr, PtraceThreadLevelRun, nullptr) == 0); - } - ASSERT_NE(test_level_one_(1, 2, 3, 4, nullptr, nullptr), 0); - _exit(1); - } - - // Check to see that all of the threads are running before unwinding. - std::vector<pid_t> threads; - uint64_t start = NanoTime(); - do { - usleep(US_PER_MSEC); - threads.clear(); - GetThreads(pid, &threads); - } while ((threads.size() != NUM_PTRACE_THREADS + 1) && - ((NanoTime() - start) <= 5 * NS_PER_SEC)); - ASSERT_EQ(threads.size(), static_cast<size_t>(NUM_PTRACE_THREADS + 1)); - - ASSERT_TRUE(ptrace(PTRACE_ATTACH, pid, 0, 0) == 0); - WaitForStop(pid); - for (std::vector<int>::const_iterator it = threads.begin(); it != threads.end(); ++it) { - // Skip the current forked process, we only care about the threads. - if (pid == *it) { - continue; - } - VerifyProcTest(pid, *it, ReadyLevelBacktrace, VerifyLevelDump, Backtrace::Create, - BacktraceMap::Create); - } - - FinishRemoteProcess(pid); -} - -void VerifyLevelThread(void*) { - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), android::base::GetThreadId())); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - - VerifyLevelDump(backtrace.get()); -} - -TEST_F(BacktraceTest, thread_current_level) { - ASSERT_NE(test_level_one_(1, 2, 3, 4, VerifyLevelThread, nullptr), 0); -} - -static void VerifyMaxThread(void*) { - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), android::base::GetThreadId())); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - ASSERT_EQ(BACKTRACE_UNWIND_ERROR_EXCEED_MAX_FRAMES_LIMIT, backtrace->GetError().error_code); - - VerifyMaxDump(backtrace.get()); -} - -TEST_F(BacktraceTest, thread_current_max) { - ASSERT_NE(test_recursive_call_(MAX_BACKTRACE_FRAMES + 10, VerifyMaxThread, nullptr), 0); -} - -static void* ThreadLevelRun(void* data) { - thread_t* thread = reinterpret_cast<thread_t*>(data); - - thread->tid = android::base::GetThreadId(); - EXPECT_NE(BacktraceTest::test_level_one_(1, 2, 3, 4, ThreadSetState, data), 0); - return nullptr; -} - -TEST_F(BacktraceTest, thread_level_trace) { - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - - thread_t thread_data = { 0, 0, 0, nullptr }; - pthread_t thread; - ASSERT_TRUE(pthread_create(&thread, &attr, ThreadLevelRun, &thread_data) == 0); - - // Wait up to 2 seconds for the tid to be set. - ASSERT_TRUE(WaitForNonZero(&thread_data.state, 2)); - - // Make sure that the thread signal used is not visible when compiled for - // the target. -#if !defined(__GLIBC__) - ASSERT_LT(THREAD_SIGNAL, SIGRTMIN); -#endif - - // Save the current signal action and make sure it is restored afterwards. - struct sigaction cur_action; - ASSERT_TRUE(sigaction(THREAD_SIGNAL, nullptr, &cur_action) == 0); - - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), thread_data.tid)); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - - VerifyLevelDump(backtrace.get()); - - // Tell the thread to exit its infinite loop. - android_atomic_acquire_store(0, &thread_data.state); - - // Verify that the old action was restored. - struct sigaction new_action; - ASSERT_TRUE(sigaction(THREAD_SIGNAL, nullptr, &new_action) == 0); - EXPECT_EQ(cur_action.sa_sigaction, new_action.sa_sigaction); - // The SA_RESTORER flag gets set behind our back, so a direct comparison - // doesn't work unless we mask the value off. Mips doesn't have this - // flag, so skip this on that platform. -#if defined(SA_RESTORER) - cur_action.sa_flags &= ~SA_RESTORER; - new_action.sa_flags &= ~SA_RESTORER; -#elif defined(__GLIBC__) - // Our host compiler doesn't appear to define this flag for some reason. - cur_action.sa_flags &= ~0x04000000; - new_action.sa_flags &= ~0x04000000; -#endif - EXPECT_EQ(cur_action.sa_flags, new_action.sa_flags); -} - -TEST_F(BacktraceTest, thread_ignore_frames) { - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - - thread_t thread_data = { 0, 0, 0, nullptr }; - pthread_t thread; - ASSERT_TRUE(pthread_create(&thread, &attr, ThreadLevelRun, &thread_data) == 0); - - // Wait up to 2 seconds for the tid to be set. - ASSERT_TRUE(WaitForNonZero(&thread_data.state, 2)); - - std::unique_ptr<Backtrace> all(Backtrace::Create(getpid(), thread_data.tid)); - ASSERT_TRUE(all.get() != nullptr); - ASSERT_TRUE(all->Unwind(0)); - VERIFY_NO_ERROR(all->GetError().error_code); - - std::unique_ptr<Backtrace> ign1(Backtrace::Create(getpid(), thread_data.tid)); - ASSERT_TRUE(ign1.get() != nullptr); - ASSERT_TRUE(ign1->Unwind(1)); - VERIFY_NO_ERROR(ign1->GetError().error_code); - - std::unique_ptr<Backtrace> ign2(Backtrace::Create(getpid(), thread_data.tid)); - ASSERT_TRUE(ign2.get() != nullptr); - ASSERT_TRUE(ign2->Unwind(2)); - VERIFY_NO_ERROR(ign2->GetError().error_code); - - VerifyIgnoreFrames(all.get(), ign1.get(), ign2.get(), nullptr); - - // Tell the thread to exit its infinite loop. - android_atomic_acquire_store(0, &thread_data.state); -} - -static void* ThreadMaxRun(void* data) { - thread_t* thread = reinterpret_cast<thread_t*>(data); - - thread->tid = android::base::GetThreadId(); - EXPECT_NE(BacktraceTest::test_recursive_call_(MAX_BACKTRACE_FRAMES + 10, ThreadSetState, data), - 0); - return nullptr; -} - -TEST_F(BacktraceTest, thread_max_trace) { - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - - thread_t thread_data = { 0, 0, 0, nullptr }; - pthread_t thread; - ASSERT_TRUE(pthread_create(&thread, &attr, ThreadMaxRun, &thread_data) == 0); - - // Wait for the tid to be set. - ASSERT_TRUE(WaitForNonZero(&thread_data.state, 2)); - - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), thread_data.tid)); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - ASSERT_EQ(BACKTRACE_UNWIND_ERROR_EXCEED_MAX_FRAMES_LIMIT, backtrace->GetError().error_code); - - VerifyMaxDump(backtrace.get()); - - // Tell the thread to exit its infinite loop. - android_atomic_acquire_store(0, &thread_data.state); -} - -static void* ThreadDump(void* data) { - dump_thread_t* dump = reinterpret_cast<dump_thread_t*>(data); - while (true) { - if (android_atomic_acquire_load(dump->now)) { - break; - } - } - - // The status of the actual unwind will be checked elsewhere. - dump->backtrace = Backtrace::Create(getpid(), dump->thread.tid, dump->map); - dump->backtrace->Unwind(0); - - android_atomic_acquire_store(1, &dump->done); - - return nullptr; -} - -static void MultipleThreadDumpTest(bool share_map) { - // Dump NUM_THREADS simultaneously using the same map. - std::vector<thread_t> runners(NUM_THREADS); - std::vector<dump_thread_t> dumpers(NUM_THREADS); - - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - for (size_t i = 0; i < NUM_THREADS; i++) { - // Launch the runners, they will spin in hard loops doing nothing. - runners[i].tid = 0; - runners[i].state = 0; - ASSERT_TRUE(pthread_create(&runners[i].threadId, &attr, ThreadMaxRun, &runners[i]) == 0); - } - - // Wait for tids to be set. - for (std::vector<thread_t>::iterator it = runners.begin(); it != runners.end(); ++it) { - ASSERT_TRUE(WaitForNonZero(&it->state, 30)); - } - - // Start all of the dumpers at once, they will spin until they are signalled - // to begin their dump run. - std::unique_ptr<BacktraceMap> map; - if (share_map) { - map.reset(BacktraceMap::Create(getpid())); - } - int32_t dump_now = 0; - for (size_t i = 0; i < NUM_THREADS; i++) { - dumpers[i].thread.tid = runners[i].tid; - dumpers[i].thread.state = 0; - dumpers[i].done = 0; - dumpers[i].now = &dump_now; - dumpers[i].map = map.get(); - - ASSERT_TRUE(pthread_create(&dumpers[i].thread.threadId, &attr, ThreadDump, &dumpers[i]) == 0); - } - - // Start all of the dumpers going at once. - android_atomic_acquire_store(1, &dump_now); - - for (size_t i = 0; i < NUM_THREADS; i++) { - ASSERT_TRUE(WaitForNonZero(&dumpers[i].done, 30)); - - // Tell the runner thread to exit its infinite loop. - android_atomic_acquire_store(0, &runners[i].state); - - ASSERT_TRUE(dumpers[i].backtrace != nullptr); - VerifyMaxDump(dumpers[i].backtrace); - - delete dumpers[i].backtrace; - dumpers[i].backtrace = nullptr; - } -} - -TEST_F(BacktraceTest, thread_multiple_dump) { - MultipleThreadDumpTest(false); -} - -TEST_F(BacktraceTest, thread_multiple_dump_same_map) { - MultipleThreadDumpTest(true); -} - -// This test is for UnwindMaps that should share the same map cursor when -// multiple maps are created for the current process at the same time. -TEST_F(BacktraceTest, simultaneous_maps) { - BacktraceMap* map1 = BacktraceMap::Create(getpid()); - BacktraceMap* map2 = BacktraceMap::Create(getpid()); - BacktraceMap* map3 = BacktraceMap::Create(getpid()); - - Backtrace* back1 = Backtrace::Create(getpid(), BACKTRACE_CURRENT_THREAD, map1); - ASSERT_TRUE(back1 != nullptr); - EXPECT_TRUE(back1->Unwind(0)); - VERIFY_NO_ERROR(back1->GetError().error_code); - delete back1; - delete map1; - - Backtrace* back2 = Backtrace::Create(getpid(), BACKTRACE_CURRENT_THREAD, map2); - ASSERT_TRUE(back2 != nullptr); - EXPECT_TRUE(back2->Unwind(0)); - VERIFY_NO_ERROR(back2->GetError().error_code); - delete back2; - delete map2; - - Backtrace* back3 = Backtrace::Create(getpid(), BACKTRACE_CURRENT_THREAD, map3); - ASSERT_TRUE(back3 != nullptr); - EXPECT_TRUE(back3->Unwind(0)); - VERIFY_NO_ERROR(back3->GetError().error_code); - delete back3; - delete map3; -} - -TEST_F(BacktraceTest, fillin_erases) { - BacktraceMap* back_map = BacktraceMap::Create(getpid()); - - backtrace_map_t map; - - map.start = 1; - map.end = 3; - map.flags = 1; - map.name = "Initialized"; - back_map->FillIn(0, &map); - delete back_map; - - ASSERT_FALSE(BacktraceMap::IsValid(map)); - ASSERT_EQ(static_cast<uint64_t>(0), map.start); - ASSERT_EQ(static_cast<uint64_t>(0), map.end); - ASSERT_EQ(0, map.flags); - ASSERT_EQ("", map.name); -} - -TEST_F(BacktraceTest, format_test) { - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - - backtrace_frame_data_t frame; - frame.num = 1; - frame.pc = 2; - frame.rel_pc = 2; - frame.sp = 0; - frame.stack_size = 0; - frame.func_offset = 0; - - // Check no map set. - frame.num = 1; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 0000000000000002 <unknown>", -#else - EXPECT_EQ("#01 pc 00000002 <unknown>", -#endif - backtrace->FormatFrameData(&frame)); - - // Check map name empty, but exists. - frame.pc = 0xb0020; - frame.rel_pc = 0x20; - frame.map.start = 0xb0000; - frame.map.end = 0xbffff; - frame.map.load_bias = 0; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 0000000000000020 <anonymous:00000000000b0000>", -#else - EXPECT_EQ("#01 pc 00000020 <anonymous:000b0000>", -#endif - backtrace->FormatFrameData(&frame)); - - // Check map name begins with a [. - frame.pc = 0xc0020; - frame.map.start = 0xc0000; - frame.map.end = 0xcffff; - frame.map.load_bias = 0; - frame.map.name = "[anon:thread signal stack]"; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 0000000000000020 [anon:thread signal stack:00000000000c0000]", -#else - EXPECT_EQ("#01 pc 00000020 [anon:thread signal stack:000c0000]", -#endif - backtrace->FormatFrameData(&frame)); - - // Check relative pc is set and map name is set. - frame.pc = 0x12345679; - frame.rel_pc = 0x12345678; - frame.map.name = "MapFake"; - frame.map.start = 1; - frame.map.end = 1; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 0000000012345678 MapFake", -#else - EXPECT_EQ("#01 pc 12345678 MapFake", -#endif - backtrace->FormatFrameData(&frame)); - - // Check func_name is set, but no func offset. - frame.func_name = "ProcFake"; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 0000000012345678 MapFake (ProcFake)", -#else - EXPECT_EQ("#01 pc 12345678 MapFake (ProcFake)", -#endif - backtrace->FormatFrameData(&frame)); - - // Check func_name is set, and func offset is non-zero. - frame.func_offset = 645; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 0000000012345678 MapFake (ProcFake+645)", -#else - EXPECT_EQ("#01 pc 12345678 MapFake (ProcFake+645)", -#endif - backtrace->FormatFrameData(&frame)); - - // Check func_name is set, func offset is non-zero, and load_bias is non-zero. - frame.rel_pc = 0x123456dc; - frame.func_offset = 645; - frame.map.load_bias = 100; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 00000000123456dc MapFake (ProcFake+645)", -#else - EXPECT_EQ("#01 pc 123456dc MapFake (ProcFake+645)", -#endif - backtrace->FormatFrameData(&frame)); - - // Check a non-zero map offset. - frame.map.offset = 0x1000; -#if defined(__LP64__) - EXPECT_EQ("#01 pc 00000000123456dc MapFake (offset 0x1000) (ProcFake+645)", -#else - EXPECT_EQ("#01 pc 123456dc MapFake (offset 0x1000) (ProcFake+645)", -#endif - backtrace->FormatFrameData(&frame)); -} - -struct map_test_t { - uint64_t start; - uint64_t end; -}; - -static bool map_sort(map_test_t i, map_test_t j) { return i.start < j.start; } - -static std::string GetTestMapsAsString(const std::vector<map_test_t>& maps) { - if (maps.size() == 0) { - return "No test map entries\n"; - } - std::string map_txt; - for (auto map : maps) { - map_txt += android::base::StringPrintf("%" PRIx64 "-%" PRIx64 "\n", map.start, map.end); - } - return map_txt; -} - -static std::string GetMapsAsString(BacktraceMap* maps) { - if (maps->size() == 0) { - return "No map entries\n"; - } - std::string map_txt; - for (const backtrace_map_t* map : *maps) { - map_txt += android::base::StringPrintf( - "%" PRIx64 "-%" PRIx64 " flags: 0x%x offset: 0x%" PRIx64 " load_bias: 0x%" PRIx64, - map->start, map->end, map->flags, map->offset, map->load_bias); - if (!map->name.empty()) { - map_txt += ' ' + map->name; - } - map_txt += '\n'; - } - return map_txt; -} - -static void VerifyMap(pid_t pid) { - char buffer[4096]; - snprintf(buffer, sizeof(buffer), "/proc/%d/maps", pid); - - FILE* map_file = fopen(buffer, "r"); - ASSERT_TRUE(map_file != nullptr); - std::vector<map_test_t> test_maps; - while (fgets(buffer, sizeof(buffer), map_file)) { - map_test_t map; - ASSERT_EQ(2, sscanf(buffer, "%" SCNx64 "-%" SCNx64 " ", &map.start, &map.end)); - test_maps.push_back(map); - } - fclose(map_file); - std::sort(test_maps.begin(), test_maps.end(), map_sort); - - std::unique_ptr<BacktraceMap> map(BacktraceMap::Create(pid)); - - // Basic test that verifies that the map is in the expected order. - auto test_it = test_maps.begin(); - for (auto it = map->begin(); it != map->end(); ++it) { - ASSERT_TRUE(test_it != test_maps.end()) << "Mismatch in number of maps, expected test maps:\n" - << GetTestMapsAsString(test_maps) << "Actual maps:\n" - << GetMapsAsString(map.get()); - ASSERT_EQ(test_it->start, (*it)->start) << "Mismatch in map data, expected test maps:\n" - << GetTestMapsAsString(test_maps) << "Actual maps:\n" - << GetMapsAsString(map.get()); - ASSERT_EQ(test_it->end, (*it)->end) << "Mismatch maps in map data, expected test maps:\n" - << GetTestMapsAsString(test_maps) << "Actual maps:\n" - << GetMapsAsString(map.get()); - // Make sure the load bias get set to a value. - ASSERT_NE(static_cast<uint64_t>(-1), (*it)->load_bias) << "Found uninitialized load_bias\n" - << GetMapsAsString(map.get()); - ++test_it; - } - ASSERT_TRUE(test_it == test_maps.end()); -} - -TEST_F(BacktraceTest, verify_map_remote) { - pid_t pid; - CreateRemoteProcess(&pid); - - // The maps should match exactly since the forked process has been paused. - VerifyMap(pid); - - FinishRemoteProcess(pid); -} - -static void InitMemory(uint8_t* memory, size_t bytes) { - for (size_t i = 0; i < bytes; i++) { - memory[i] = i; - if (memory[i] == '\0') { - // Don't use '\0' in our data so we can verify that an overread doesn't - // occur by using a '\0' as the character after the read data. - memory[i] = 23; - } - } -} - -static void* ThreadReadTest(void* data) { - thread_t* thread_data = reinterpret_cast<thread_t*>(data); - - thread_data->tid = android::base::GetThreadId(); - - // Create two map pages. - // Mark the second page as not-readable. - size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); - uint8_t* memory; - if (posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 2 * pagesize) != 0) { - return reinterpret_cast<void*>(-1); - } - - if (mprotect(&memory[pagesize], pagesize, PROT_NONE) != 0) { - return reinterpret_cast<void*>(-1); - } - - // Set up a simple pattern in memory. - InitMemory(memory, pagesize); - - thread_data->data = memory; - - // Tell the caller it's okay to start reading memory. - android_atomic_acquire_store(1, &thread_data->state); - - // Loop waiting for the caller to finish reading the memory. - while (thread_data->state) { - } - - // Re-enable read-write on the page so that we don't crash if we try - // and access data on this page when freeing the memory. - if (mprotect(&memory[pagesize], pagesize, PROT_READ | PROT_WRITE) != 0) { - return reinterpret_cast<void*>(-1); - } - free(memory); - - android_atomic_acquire_store(1, &thread_data->state); - - return nullptr; -} - -static void RunReadTest(Backtrace* backtrace, uint64_t read_addr) { - size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); - - // Create a page of data to use to do quick compares. - uint8_t* expected = new uint8_t[pagesize]; - InitMemory(expected, pagesize); - - uint8_t* data = new uint8_t[2 * pagesize]; - // Verify that we can only read one page worth of data. - size_t bytes_read = backtrace->Read(read_addr, data, 2 * pagesize); - ASSERT_EQ(pagesize, bytes_read); - ASSERT_TRUE(memcmp(data, expected, pagesize) == 0); - - // Verify unaligned reads. - for (size_t i = 1; i < sizeof(word_t); i++) { - bytes_read = backtrace->Read(read_addr + i, data, 2 * sizeof(word_t)); - ASSERT_EQ(2 * sizeof(word_t), bytes_read); - ASSERT_TRUE(memcmp(data, &expected[i], 2 * sizeof(word_t)) == 0) - << "Offset at " << i << " failed"; - } - - // Verify small unaligned reads. - for (size_t i = 1; i < sizeof(word_t); i++) { - for (size_t j = 1; j < sizeof(word_t); j++) { - // Set one byte past what we expect to read, to guarantee we don't overread. - data[j] = '\0'; - bytes_read = backtrace->Read(read_addr + i, data, j); - ASSERT_EQ(j, bytes_read); - ASSERT_TRUE(memcmp(data, &expected[i], j) == 0) - << "Offset at " << i << " length " << j << " miscompared"; - ASSERT_EQ('\0', data[j]) - << "Offset at " << i << " length " << j << " wrote too much data"; - } - } - delete[] data; - delete[] expected; -} - -TEST_F(BacktraceTest, thread_read) { - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - pthread_t thread; - thread_t thread_data = { 0, 0, 0, nullptr }; - ASSERT_TRUE(pthread_create(&thread, &attr, ThreadReadTest, &thread_data) == 0); - - ASSERT_TRUE(WaitForNonZero(&thread_data.state, 10)); - - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(getpid(), thread_data.tid)); - ASSERT_TRUE(backtrace.get() != nullptr); - - RunReadTest(backtrace.get(), reinterpret_cast<uint64_t>(thread_data.data)); - - android_atomic_acquire_store(0, &thread_data.state); - - ASSERT_TRUE(WaitForNonZero(&thread_data.state, 10)); -} - -// The code requires these variables are the same size. -volatile uint64_t g_ready = 0; -volatile uint64_t g_addr = 0; -static_assert(sizeof(g_ready) == sizeof(g_addr), "g_ready/g_addr must be same size"); - -static void ForkedReadTest() { - // Create two map pages. - size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); - uint8_t* memory; - if (posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 2 * pagesize) != 0) { - perror("Failed to allocate memory\n"); - exit(1); - } - - // Mark the second page as not-readable. - if (mprotect(&memory[pagesize], pagesize, PROT_NONE) != 0) { - perror("Failed to mprotect memory\n"); - exit(1); - } - - // Set up a simple pattern in memory. - InitMemory(memory, pagesize); - - g_addr = reinterpret_cast<uint64_t>(memory); - g_ready = 1; - - while (1) { - usleep(US_PER_MSEC); - } -} - -TEST_F(BacktraceTest, process_read) { - g_ready = 0; - pid_t pid; - if ((pid = fork()) == 0) { - ForkedReadTest(); - exit(0); - } - ASSERT_NE(-1, pid); - - bool test_executed = false; - uint64_t start = NanoTime(); - while (1) { - if (ptrace(PTRACE_ATTACH, pid, 0, 0) == 0) { - WaitForStop(pid); - - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, pid)); - ASSERT_TRUE(backtrace.get() != nullptr); - - uint64_t read_addr; - size_t bytes_read = backtrace->Read(reinterpret_cast<uint64_t>(&g_ready), - reinterpret_cast<uint8_t*>(&read_addr), sizeof(g_ready)); - ASSERT_EQ(sizeof(g_ready), bytes_read); - if (read_addr) { - // The forked process is ready to be read. - bytes_read = backtrace->Read(reinterpret_cast<uint64_t>(&g_addr), - reinterpret_cast<uint8_t*>(&read_addr), sizeof(g_addr)); - ASSERT_EQ(sizeof(g_addr), bytes_read); - - RunReadTest(backtrace.get(), read_addr); - - test_executed = true; - break; - } - ASSERT_TRUE(ptrace(PTRACE_DETACH, pid, 0, 0) == 0); - } - if ((NanoTime() - start) > 5 * NS_PER_SEC) { - break; - } - usleep(US_PER_MSEC); - } - kill(pid, SIGKILL); - ASSERT_EQ(waitpid(pid, nullptr, 0), pid); - - ASSERT_TRUE(test_executed); -} - -static void VerifyFunctionsFound(const std::vector<std::string>& found_functions) { - // We expect to find these functions in libbacktrace_test. If we don't - // find them, that's a bug in the memory read handling code in libunwind. - std::list<std::string> expected_functions; - expected_functions.push_back("test_recursive_call"); - expected_functions.push_back("test_level_one"); - expected_functions.push_back("test_level_two"); - expected_functions.push_back("test_level_three"); - expected_functions.push_back("test_level_four"); - for (const auto& found_function : found_functions) { - for (const auto& expected_function : expected_functions) { - if (found_function == expected_function) { - expected_functions.remove(found_function); - break; - } - } - } - ASSERT_TRUE(expected_functions.empty()) << "Not all functions found in shared library."; -} - -static void CopySharedLibrary(const char* tmp_dir, std::string* tmp_so_name) { - std::string test_lib(testing::internal::GetArgvs()[0]); - auto const value = test_lib.find_last_of('/'); - if (value == std::string::npos) { - test_lib = "./"; - } else { - test_lib = test_lib.substr(0, value + 1) + "./"; - } - test_lib += "libbacktrace_test.so"; - - *tmp_so_name = std::string(tmp_dir) + "/libbacktrace_test.so"; - std::string cp_cmd = android::base::StringPrintf("cp %s %s", test_lib.c_str(), tmp_dir); - - // Copy the shared so to a tempory directory. - ASSERT_EQ(0, system(cp_cmd.c_str())); -} - -TEST_F(BacktraceTest, check_unreadable_elf_local) { - TemporaryDir td; - std::string tmp_so_name; - ASSERT_NO_FATAL_FAILURE(CopySharedLibrary(td.path, &tmp_so_name)); - - struct stat buf; - ASSERT_TRUE(stat(tmp_so_name.c_str(), &buf) != -1); - uint64_t map_size = buf.st_size; - - int fd = open(tmp_so_name.c_str(), O_RDONLY); - ASSERT_TRUE(fd != -1); - - void* map = mmap(nullptr, map_size, PROT_READ | PROT_EXEC, MAP_PRIVATE, fd, 0); - ASSERT_TRUE(map != MAP_FAILED); - close(fd); - ASSERT_TRUE(unlink(tmp_so_name.c_str()) != -1); - - std::vector<std::string> found_functions; - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, - BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - - // Needed before GetFunctionName will work. - backtrace->Unwind(0); - - // Loop through the entire map, and get every function we can find. - map_size += reinterpret_cast<uint64_t>(map); - std::string last_func; - for (uint64_t read_addr = reinterpret_cast<uint64_t>(map); read_addr < map_size; read_addr += 4) { - uint64_t offset; - std::string func_name = backtrace->GetFunctionName(read_addr, &offset); - if (!func_name.empty() && last_func != func_name) { - found_functions.push_back(func_name); - } - last_func = func_name; - } - - ASSERT_TRUE(munmap(map, map_size - reinterpret_cast<uint64_t>(map)) == 0); - - VerifyFunctionsFound(found_functions); -} - -TEST_F(BacktraceTest, check_unreadable_elf_remote) { - TemporaryDir td; - std::string tmp_so_name; - ASSERT_NO_FATAL_FAILURE(CopySharedLibrary(td.path, &tmp_so_name)); - - g_ready = 0; - - struct stat buf; - ASSERT_TRUE(stat(tmp_so_name.c_str(), &buf) != -1); - uint64_t map_size = buf.st_size; - - pid_t pid; - if ((pid = fork()) == 0) { - int fd = open(tmp_so_name.c_str(), O_RDONLY); - if (fd == -1) { - fprintf(stderr, "Failed to open file %s: %s\n", tmp_so_name.c_str(), strerror(errno)); - unlink(tmp_so_name.c_str()); - exit(0); - } - - void* map = mmap(nullptr, map_size, PROT_READ | PROT_EXEC, MAP_PRIVATE, fd, 0); - if (map == MAP_FAILED) { - fprintf(stderr, "Failed to map in memory: %s\n", strerror(errno)); - unlink(tmp_so_name.c_str()); - exit(0); - } - close(fd); - if (unlink(tmp_so_name.c_str()) == -1) { - fprintf(stderr, "Failed to unlink: %s\n", strerror(errno)); - exit(0); - } - - g_addr = reinterpret_cast<uint64_t>(map); - g_ready = 1; - while (true) { - usleep(US_PER_MSEC); - } - exit(0); - } - ASSERT_TRUE(pid > 0); - - std::vector<std::string> found_functions; - uint64_t start = NanoTime(); - while (true) { - ASSERT_TRUE(ptrace(PTRACE_ATTACH, pid, 0, 0) == 0); - - // Wait for the process to get to a stopping point. - WaitForStop(pid); - - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - - uint64_t read_addr; - ASSERT_EQ(sizeof(g_ready), - backtrace->Read(reinterpret_cast<uint64_t>(&g_ready), - reinterpret_cast<uint8_t*>(&read_addr), sizeof(g_ready))); - if (read_addr) { - ASSERT_EQ(sizeof(g_addr), - backtrace->Read(reinterpret_cast<uint64_t>(&g_addr), - reinterpret_cast<uint8_t*>(&read_addr), sizeof(uint64_t))); - - // Needed before GetFunctionName will work. - backtrace->Unwind(0); - - // Loop through the entire map, and get every function we can find. - map_size += read_addr; - std::string last_func; - for (; read_addr < map_size; read_addr += 4) { - uint64_t offset; - std::string func_name = backtrace->GetFunctionName(read_addr, &offset); - if (!func_name.empty() && last_func != func_name) { - found_functions.push_back(func_name); - } - last_func = func_name; - } - break; - } - ASSERT_TRUE(ptrace(PTRACE_DETACH, pid, 0, 0) == 0); - - if ((NanoTime() - start) > 5 * NS_PER_SEC) { - break; - } - usleep(US_PER_MSEC); - } - - kill(pid, SIGKILL); - ASSERT_EQ(waitpid(pid, nullptr, 0), pid); - - VerifyFunctionsFound(found_functions); -} - -static bool FindFuncFrameInBacktrace(Backtrace* backtrace, uint64_t test_func, size_t* frame_num) { - backtrace_map_t map; - backtrace->FillInMap(test_func, &map); - if (!BacktraceMap::IsValid(map)) { - return false; - } - - // Loop through the frames, and find the one that is in the map. - *frame_num = 0; - for (Backtrace::const_iterator it = backtrace->begin(); it != backtrace->end(); ++it) { - if (BacktraceMap::IsValid(it->map) && map.start == it->map.start && - it->pc >= test_func) { - *frame_num = it->num; - return true; - } - } - return false; -} - -static void VerifyUnreadableElfFrame(Backtrace* backtrace, uint64_t test_func, size_t frame_num) { - ASSERT_LT(backtrace->NumFrames(), static_cast<size_t>(MAX_BACKTRACE_FRAMES)) - << DumpFrames(backtrace); - - ASSERT_TRUE(frame_num != 0) << DumpFrames(backtrace); - // Make sure that there is at least one more frame above the test func call. - ASSERT_LT(frame_num, backtrace->NumFrames()) << DumpFrames(backtrace); - - uint64_t diff = backtrace->GetFrame(frame_num)->pc - test_func; - ASSERT_LT(diff, 200U) << DumpFrames(backtrace); -} - -static void VerifyUnreadableElfBacktrace(void* func) { - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, - BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - - size_t frame_num; - uint64_t test_func = reinterpret_cast<uint64_t>(func); - ASSERT_TRUE(FindFuncFrameInBacktrace(backtrace.get(), test_func, &frame_num)) - << DumpFrames(backtrace.get()); - - VerifyUnreadableElfFrame(backtrace.get(), test_func, frame_num); -} - -typedef int (*test_func_t)(int, int, int, int, void (*)(void*), void*); - -TEST_F(BacktraceTest, unwind_through_unreadable_elf_local) { -#if defined(__arm__) - // The exidx information does not include unwind information for the test - // library. The debug_frame is not findable because the symbol table - // that includes the ".debug_frame" name is also not in memory. - // So skip this test for arm. - GTEST_SKIP() << "Arm library does not contain unwind information in memory."; -#endif - - TemporaryDir td; - std::string tmp_so_name; - ASSERT_NO_FATAL_FAILURE(CopySharedLibrary(td.path, &tmp_so_name)); - - void* lib_handle = dlopen(tmp_so_name.c_str(), RTLD_NOW); - ASSERT_TRUE(lib_handle != nullptr); - ASSERT_TRUE(unlink(tmp_so_name.c_str()) != -1); - - test_func_t test_func; - test_func = reinterpret_cast<test_func_t>(dlsym(lib_handle, "test_level_one")); - ASSERT_TRUE(test_func != nullptr); - - ASSERT_NE(test_func(1, 2, 3, 4, VerifyUnreadableElfBacktrace, reinterpret_cast<void*>(test_func)), - 0); -} - -TEST_F(BacktraceTest, unwind_through_unreadable_elf_remote) { -#if defined(__arm__) - // The exidx information does not include unwind information for the test - // library. The debug_frame is not findable because the symbol table - // that includes the ".debug_frame" name is also not in memory. - // So skip this test for arm. - GTEST_SKIP() << "Arm library does not contain unwind information in memory."; -#endif - - TemporaryDir td; - std::string tmp_so_name; - ASSERT_NO_FATAL_FAILURE(CopySharedLibrary(td.path, &tmp_so_name)); - - void* lib_handle = dlopen(tmp_so_name.c_str(), RTLD_NOW); - ASSERT_TRUE(lib_handle != nullptr); - ASSERT_TRUE(unlink(tmp_so_name.c_str()) != -1); - - test_func_t test_func; - test_func = reinterpret_cast<test_func_t>(dlsym(lib_handle, "test_level_one")); - ASSERT_TRUE(test_func != nullptr); - - pid_t pid; - if ((pid = fork()) == 0) { - test_func(1, 2, 3, 4, 0, 0); - exit(0); - } - ASSERT_TRUE(pid > 0); - - uint64_t start = NanoTime(); - bool done = false; - while (!done) { - ASSERT_TRUE(ptrace(PTRACE_ATTACH, pid, 0, 0) == 0); - - // Wait for the process to get to a stopping point. - WaitForStop(pid); - - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - - size_t frame_num; - if (FindFuncFrameInBacktrace(backtrace.get(), reinterpret_cast<uint64_t>(test_func), - &frame_num) && - frame_num != 0) { - VerifyUnreadableElfFrame(backtrace.get(), reinterpret_cast<uint64_t>(test_func), frame_num); - done = true; - } - - ASSERT_TRUE(ptrace(PTRACE_DETACH, pid, 0, 0) == 0); - - if ((NanoTime() - start) > 5 * NS_PER_SEC) { - break; - } - usleep(US_PER_MSEC); - } - - kill(pid, SIGKILL); - ASSERT_EQ(waitpid(pid, nullptr, 0), pid); - - ASSERT_TRUE(done) << "Test function never found in unwind."; -} - -TEST_F(BacktraceTest, unwind_thread_doesnt_exist) { - std::unique_ptr<Backtrace> backtrace( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, 99999999)); - ASSERT_TRUE(backtrace.get() != nullptr); - ASSERT_FALSE(backtrace->Unwind(0)); - ASSERT_EQ(BACKTRACE_UNWIND_ERROR_THREAD_DOESNT_EXIST, backtrace->GetError().error_code); -} - -TEST_F(BacktraceTest, local_get_function_name_before_unwind) { - std::unique_ptr<Backtrace> backtrace( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace.get() != nullptr); - - // Verify that trying to get a function name before doing an unwind works. - uint64_t cur_func_offset = reinterpret_cast<uint64_t>(test_level_one_) + 1; - uint64_t offset; - ASSERT_NE(std::string(""), backtrace->GetFunctionName(cur_func_offset, &offset)); -} - -TEST_F(BacktraceTest, remote_get_function_name_before_unwind) { - pid_t pid; - CreateRemoteProcess(&pid); - - // Now create an unwind object. - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, pid)); - - // Verify that trying to get a function name before doing an unwind works. - uint64_t cur_func_offset = reinterpret_cast<uint64_t>(test_level_one_) + 1; - uint64_t offset; - ASSERT_NE(std::string(""), backtrace->GetFunctionName(cur_func_offset, &offset)); - - FinishRemoteProcess(pid); -} - -static void SetUcontextSp(uint64_t sp, ucontext_t* ucontext) { -#if defined(__arm__) - ucontext->uc_mcontext.arm_sp = sp; -#elif defined(__aarch64__) - ucontext->uc_mcontext.sp = sp; -#elif defined(__i386__) - ucontext->uc_mcontext.gregs[REG_ESP] = sp; -#elif defined(__x86_64__) - ucontext->uc_mcontext.gregs[REG_RSP] = sp; -#else - UNUSED(sp); - UNUSED(ucontext); - ASSERT_TRUE(false) << "Unsupported architecture"; -#endif -} - -static void SetUcontextPc(uint64_t pc, ucontext_t* ucontext) { -#if defined(__arm__) - ucontext->uc_mcontext.arm_pc = pc; -#elif defined(__aarch64__) - ucontext->uc_mcontext.pc = pc; -#elif defined(__i386__) - ucontext->uc_mcontext.gregs[REG_EIP] = pc; -#elif defined(__x86_64__) - ucontext->uc_mcontext.gregs[REG_RIP] = pc; -#else - UNUSED(pc); - UNUSED(ucontext); - ASSERT_TRUE(false) << "Unsupported architecture"; -#endif -} - -static void SetUcontextLr(uint64_t lr, ucontext_t* ucontext) { -#if defined(__arm__) - ucontext->uc_mcontext.arm_lr = lr; -#elif defined(__aarch64__) - ucontext->uc_mcontext.regs[30] = lr; -#elif defined(__i386__) - // The lr is on the stack. - ASSERT_TRUE(lr != 0); - ASSERT_TRUE(ucontext != nullptr); -#elif defined(__x86_64__) - // The lr is on the stack. - ASSERT_TRUE(lr != 0); - ASSERT_TRUE(ucontext != nullptr); -#else - UNUSED(lr); - UNUSED(ucontext); - ASSERT_TRUE(false) << "Unsupported architecture"; -#endif -} - -static constexpr size_t DEVICE_MAP_SIZE = 1024; - -static void SetupDeviceMap(void** device_map) { - // Make sure that anything in a device map will result in fails - // to read. - android::base::unique_fd device_fd(open("/dev/zero", O_RDONLY | O_CLOEXEC)); - - *device_map = mmap(nullptr, 1024, PROT_READ, MAP_PRIVATE, device_fd, 0); - ASSERT_TRUE(*device_map != MAP_FAILED); - - // Make sure the map is readable. - ASSERT_EQ(0, reinterpret_cast<int*>(*device_map)[0]); -} - -static void UnwindFromDevice(Backtrace* backtrace, void* device_map) { - uint64_t device_map_uint = reinterpret_cast<uint64_t>(device_map); - - backtrace_map_t map; - backtrace->FillInMap(device_map_uint, &map); - // Verify the flag is set. - ASSERT_EQ(PROT_DEVICE_MAP, map.flags & PROT_DEVICE_MAP); - - // Quick basic checks of functionality. - uint64_t offset; - ASSERT_EQ(std::string(""), backtrace->GetFunctionName(device_map_uint, &offset)); - ASSERT_EQ(std::string(""), backtrace->GetFunctionName(device_map_uint, &offset, &map)); - ASSERT_EQ(std::string(""), backtrace->GetFunctionName(0, &offset)); - - uint64_t cur_func_offset = reinterpret_cast<uint64_t>(BacktraceTest::test_level_one_) + 1; - // Now verify the device map flag actually causes the function name to be empty. - backtrace->FillInMap(cur_func_offset, &map); - ASSERT_TRUE((map.flags & PROT_DEVICE_MAP) == 0); - ASSERT_NE(std::string(""), backtrace->GetFunctionName(cur_func_offset, &offset, &map)); - map.flags |= PROT_DEVICE_MAP; - ASSERT_EQ(std::string(""), backtrace->GetFunctionName(cur_func_offset, &offset, &map)); - - ucontext_t ucontext; - - // Create a context that has the pc in the device map, but the sp - // in a non-device map. - memset(&ucontext, 0, sizeof(ucontext)); - SetUcontextSp(reinterpret_cast<uint64_t>(&ucontext), &ucontext); - SetUcontextPc(device_map_uint, &ucontext); - SetUcontextLr(cur_func_offset, &ucontext); - - ASSERT_TRUE(backtrace->Unwind(0, &ucontext)); - - // The buffer should only be a single element. - ASSERT_EQ(1U, backtrace->NumFrames()); - const backtrace_frame_data_t* frame = backtrace->GetFrame(0); - ASSERT_EQ(device_map_uint, frame->pc); - ASSERT_EQ(reinterpret_cast<uint64_t>(&ucontext), frame->sp); - - // Check what happens when skipping the first frame. - ASSERT_TRUE(backtrace->Unwind(1, &ucontext)); - ASSERT_EQ(0U, backtrace->NumFrames()); - - // Create a context that has the sp in the device map, but the pc - // in a non-device map. - memset(&ucontext, 0, sizeof(ucontext)); - SetUcontextSp(device_map_uint, &ucontext); - SetUcontextPc(cur_func_offset, &ucontext); - SetUcontextLr(cur_func_offset, &ucontext); - - ASSERT_TRUE(backtrace->Unwind(0, &ucontext)); - - // The buffer should only be a single element. - ASSERT_EQ(1U, backtrace->NumFrames()); - frame = backtrace->GetFrame(0); - ASSERT_EQ(cur_func_offset, frame->pc); - ASSERT_EQ(device_map_uint, frame->sp); - - // Check what happens when skipping the first frame. - ASSERT_TRUE(backtrace->Unwind(1, &ucontext)); - ASSERT_EQ(0U, backtrace->NumFrames()); -} - -TEST_F(BacktraceTest, unwind_disallow_device_map_local) { - void* device_map; - SetupDeviceMap(&device_map); - - // Now create an unwind object. - std::unique_ptr<Backtrace> backtrace( - Backtrace::Create(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD)); - ASSERT_TRUE(backtrace); - - UnwindFromDevice(backtrace.get(), device_map); - - munmap(device_map, DEVICE_MAP_SIZE); -} - -TEST_F(BacktraceTest, unwind_disallow_device_map_remote) { - void* device_map; - SetupDeviceMap(&device_map); - - // Fork a process to do a remote backtrace. - pid_t pid; - CreateRemoteProcess(&pid); - - // Now create an unwind object. - std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, pid)); - - UnwindFromDevice(backtrace.get(), device_map); - - FinishRemoteProcess(pid); - - munmap(device_map, DEVICE_MAP_SIZE); -} - -class ScopedSignalHandler { - public: - ScopedSignalHandler(int signal_number, void (*handler)(int)) : signal_number_(signal_number) { - memset(&action_, 0, sizeof(action_)); - action_.sa_handler = handler; - sigaction(signal_number_, &action_, &old_action_); - } - - ScopedSignalHandler(int signal_number, void (*action)(int, siginfo_t*, void*)) - : signal_number_(signal_number) { - memset(&action_, 0, sizeof(action_)); - action_.sa_flags = SA_SIGINFO; - action_.sa_sigaction = action; - sigaction(signal_number_, &action_, &old_action_); - } - - ~ScopedSignalHandler() { sigaction(signal_number_, &old_action_, nullptr); } - - private: - struct sigaction action_; - struct sigaction old_action_; - const int signal_number_; -}; - -static void SetValueAndLoop(void* data) { - volatile int* value = reinterpret_cast<volatile int*>(data); - - *value = 1; - for (volatile int i = 0;; i++) - ; -} - -static void UnwindThroughSignal(bool use_action, create_func_t create_func, - map_create_func_t map_create_func) { - volatile int value = 0; - pid_t pid; - if ((pid = fork()) == 0) { - if (use_action) { - ScopedSignalHandler ssh(SIGUSR1, BacktraceTest::test_signal_action_); - - BacktraceTest::test_level_one_(1, 2, 3, 4, SetValueAndLoop, const_cast<int*>(&value)); - } else { - ScopedSignalHandler ssh(SIGUSR1, BacktraceTest::test_signal_handler_); - - BacktraceTest::test_level_one_(1, 2, 3, 4, SetValueAndLoop, const_cast<int*>(&value)); - } - } - ASSERT_NE(-1, pid); - - int read_value = 0; - uint64_t start = NanoTime(); - while (read_value == 0) { - usleep(1000); - - // Loop until the remote function gets into the final function. - ASSERT_TRUE(ptrace(PTRACE_ATTACH, pid, 0, 0) == 0); - - WaitForStop(pid); - - std::unique_ptr<BacktraceMap> map(map_create_func(pid, false)); - std::unique_ptr<Backtrace> backtrace(create_func(pid, pid, map.get())); - - size_t bytes_read = backtrace->Read(reinterpret_cast<uint64_t>(const_cast<int*>(&value)), - reinterpret_cast<uint8_t*>(&read_value), sizeof(read_value)); - ASSERT_EQ(sizeof(read_value), bytes_read); - - ASSERT_TRUE(ptrace(PTRACE_DETACH, pid, 0, 0) == 0); - - ASSERT_TRUE(NanoTime() - start < 5 * NS_PER_SEC) - << "Remote process did not execute far enough in 5 seconds."; - } - - // Now need to send a signal to the remote process. - kill(pid, SIGUSR1); - - // Wait for the process to get to the signal handler loop. - Backtrace::const_iterator frame_iter; - start = NanoTime(); - std::unique_ptr<BacktraceMap> map; - std::unique_ptr<Backtrace> backtrace; - while (true) { - usleep(1000); - - ASSERT_TRUE(ptrace(PTRACE_ATTACH, pid, 0, 0) == 0); - - WaitForStop(pid); - - map.reset(map_create_func(pid, false)); - ASSERT_TRUE(map.get() != nullptr); - backtrace.reset(create_func(pid, pid, map.get())); - ASSERT_TRUE(backtrace->Unwind(0)); - bool found = false; - for (frame_iter = backtrace->begin(); frame_iter != backtrace->end(); ++frame_iter) { - if (frame_iter->func_name == "test_loop_forever") { - ++frame_iter; - found = true; - break; - } - } - if (found) { - break; - } - - ASSERT_TRUE(ptrace(PTRACE_DETACH, pid, 0, 0) == 0); - - ASSERT_TRUE(NanoTime() - start < 5 * NS_PER_SEC) - << "Remote process did not get in signal handler in 5 seconds." << std::endl - << DumpFrames(backtrace.get()); - } - - std::vector<std::string> names; - // Loop through the frames, and save the function names. - size_t frame = 0; - for (; frame_iter != backtrace->end(); ++frame_iter) { - if (frame_iter->func_name == "test_level_four") { - frame = names.size() + 1; - } - names.push_back(frame_iter->func_name); - } - ASSERT_NE(0U, frame) << "Unable to find test_level_four in backtrace" << std::endl - << DumpFrames(backtrace.get()); - - // The expected order of the frames: - // test_loop_forever - // test_signal_handler|test_signal_action - // <OPTIONAL_FRAME> May or may not exist. - // SetValueAndLoop (but the function name might be empty) - // test_level_four - // test_level_three - // test_level_two - // test_level_one - ASSERT_LE(frame + 2, names.size()) << DumpFrames(backtrace.get()); - ASSERT_LE(2U, frame) << DumpFrames(backtrace.get()); - if (use_action) { - ASSERT_EQ("test_signal_action", names[0]) << DumpFrames(backtrace.get()); - } else { - ASSERT_EQ("test_signal_handler", names[0]) << DumpFrames(backtrace.get()); - } - ASSERT_EQ("test_level_three", names[frame]) << DumpFrames(backtrace.get()); - ASSERT_EQ("test_level_two", names[frame + 1]) << DumpFrames(backtrace.get()); - ASSERT_EQ("test_level_one", names[frame + 2]) << DumpFrames(backtrace.get()); - - FinishRemoteProcess(pid); -} - -TEST_F(BacktraceTest, unwind_remote_through_signal_using_handler) { - UnwindThroughSignal(false, Backtrace::Create, BacktraceMap::Create); -} - -TEST_F(BacktraceTest, unwind_remote_through_signal_using_action) { - UnwindThroughSignal(true, Backtrace::Create, BacktraceMap::Create); -} - -static void TestFrameSkipNumbering(create_func_t create_func, map_create_func_t map_create_func) { - std::unique_ptr<BacktraceMap> map(map_create_func(getpid(), false)); - std::unique_ptr<Backtrace> backtrace( - create_func(getpid(), android::base::GetThreadId(), map.get())); - backtrace->Unwind(1); - ASSERT_NE(0U, backtrace->NumFrames()); - ASSERT_EQ(0U, backtrace->GetFrame(0)->num); -} - -TEST_F(BacktraceTest, unwind_frame_skip_numbering) { - TestFrameSkipNumbering(Backtrace::Create, BacktraceMap::Create); -} - -#define MAX_LEAK_BYTES (32*1024UL) - -static void CheckForLeak(pid_t pid, pid_t tid) { - std::unique_ptr<BacktraceMap> map(BacktraceMap::Create(pid)); - - // Loop enough that even a small leak should be detectable. - size_t first_allocated_bytes = 0; - size_t last_allocated_bytes = 0; - for (size_t i = 0; i < 4096; i++) { - Backtrace* backtrace = Backtrace::Create(pid, tid, map.get()); - ASSERT_TRUE(backtrace != nullptr); - ASSERT_TRUE(backtrace->Unwind(0)); - VERIFY_NO_ERROR(backtrace->GetError().error_code); - delete backtrace; - - size_t allocated_bytes = mallinfo().uordblks; - if (first_allocated_bytes == 0) { - first_allocated_bytes = allocated_bytes; - } else if (last_allocated_bytes > first_allocated_bytes) { - // Check that the memory did not increase too much over the first loop. - ASSERT_LE(last_allocated_bytes - first_allocated_bytes, MAX_LEAK_BYTES); - } - last_allocated_bytes = allocated_bytes; - } -} - -TEST_F(BacktraceTest, check_for_leak_local) { - CheckForLeak(BACKTRACE_CURRENT_PROCESS, BACKTRACE_CURRENT_THREAD); -} - -TEST_F(BacktraceTest, check_for_leak_local_thread) { - thread_t thread_data = { 0, 0, 0, nullptr }; - pthread_t thread; - ASSERT_TRUE(pthread_create(&thread, nullptr, ThreadLevelRun, &thread_data) == 0); - - // Wait up to 2 seconds for the tid to be set. - ASSERT_TRUE(WaitForNonZero(&thread_data.state, 2)); - - CheckForLeak(BACKTRACE_CURRENT_PROCESS, thread_data.tid); - - // Tell the thread to exit its infinite loop. - android_atomic_acquire_store(0, &thread_data.state); - - ASSERT_TRUE(pthread_join(thread, nullptr) == 0); -} - -TEST_F(BacktraceTest, check_for_leak_remote) { - pid_t pid; - CreateRemoteProcess(&pid); - - CheckForLeak(pid, BACKTRACE_CURRENT_THREAD); - - FinishRemoteProcess(pid); -} diff --git a/libbacktrace/backtrace_testlib.cpp b/libbacktrace/backtrace_testlib.cpp deleted file mode 100644 index fec7d98..0000000 --- a/libbacktrace/backtrace_testlib.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <signal.h> -#include <stdio.h> -#include <unistd.h> - -#include <memory> -#include <vector> - -#include <unwindstack/Regs.h> -#include <unwindstack/RegsGetLocal.h> - -#include "backtrace_testlib.h" - -void test_loop_forever() { - while (1) - ; -} - -void test_signal_handler(int) { test_loop_forever(); } - -void test_signal_action(int, siginfo_t*, void*) { test_loop_forever(); } - -int test_level_four(int one, int two, int three, int four, void (*callback_func)(void*), - void* data) { - if (callback_func != NULL) { - callback_func(data); - } else { - while (1) - ; - } - return one + two + three + four; -} - -int test_level_three(int one, int two, int three, int four, void (*callback_func)(void*), - void* data) { - return test_level_four(one + 3, two + 6, three + 9, four + 12, callback_func, data) + 3; -} - -int test_level_two(int one, int two, int three, int four, void (*callback_func)(void*), void* data) { - return test_level_three(one + 2, two + 4, three + 6, four + 8, callback_func, data) + 2; -} - -int test_level_one(int one, int two, int three, int four, void (*callback_func)(void*), void* data) { - return test_level_two(one + 1, two + 2, three + 3, four + 4, callback_func, data) + 1; -} - -int test_recursive_call(int level, void (*callback_func)(void*), void* data) { - if (level > 0) { - return test_recursive_call(level - 1, callback_func, data) + level; - } else if (callback_func != NULL) { - callback_func(data); - } else { - while (1) { - } - } - return 0; -} - -typedef struct { - std::vector<uint8_t>* ucontext; - volatile int* exit_flag; -} GetContextArg; - -static void GetContextAndExit(void* data) { - GetContextArg* arg = reinterpret_cast<GetContextArg*>(data); - - std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::CreateFromLocal()); - unwindstack::RegsGetLocal(regs.get()); - - ucontext_t ucontext; - memset(&ucontext, 0, sizeof(ucontext)); -#if defined(__arm__) - memcpy(&ucontext.uc_mcontext, regs->RawData(), sizeof(uint32_t) * 16); -#elif defined(__aarch64__) - memcpy(&ucontext.uc_mcontext, regs->RawData(), sizeof(uint64_t) * 33); -#elif defined(__i386__) - uint32_t* reg_data = reinterpret_cast<uint32_t*>(regs->RawData()); - ucontext.uc_mcontext.gregs[0] = reg_data[15]; - ucontext.uc_mcontext.gregs[1] = reg_data[14]; - ucontext.uc_mcontext.gregs[2] = reg_data[13]; - ucontext.uc_mcontext.gregs[3] = reg_data[12]; - ucontext.uc_mcontext.gregs[4] = reg_data[7]; - ucontext.uc_mcontext.gregs[5] = reg_data[6]; - ucontext.uc_mcontext.gregs[6] = reg_data[5]; - ucontext.uc_mcontext.gregs[7] = reg_data[4]; - ucontext.uc_mcontext.gregs[8] = reg_data[3]; - ucontext.uc_mcontext.gregs[9] = reg_data[2]; - ucontext.uc_mcontext.gregs[10] = reg_data[1]; - ucontext.uc_mcontext.gregs[11] = reg_data[0]; - ucontext.uc_mcontext.gregs[14] = reg_data[8]; - ucontext.uc_mcontext.gregs[15] = reg_data[10]; -#elif defined(__x86_64__) - uint64_t* reg_data = reinterpret_cast<uint64_t*>(regs->RawData()); - ucontext.uc_mcontext.gregs[0] = reg_data[8]; - ucontext.uc_mcontext.gregs[1] = reg_data[9]; - ucontext.uc_mcontext.gregs[2] = reg_data[10]; - ucontext.uc_mcontext.gregs[3] = reg_data[11]; - ucontext.uc_mcontext.gregs[4] = reg_data[12]; - ucontext.uc_mcontext.gregs[5] = reg_data[13]; - ucontext.uc_mcontext.gregs[6] = reg_data[14]; - ucontext.uc_mcontext.gregs[7] = reg_data[15]; - ucontext.uc_mcontext.gregs[8] = reg_data[5]; - ucontext.uc_mcontext.gregs[9] = reg_data[4]; - ucontext.uc_mcontext.gregs[10] = reg_data[6]; - ucontext.uc_mcontext.gregs[11] = reg_data[3]; - ucontext.uc_mcontext.gregs[12] = reg_data[1]; - ucontext.uc_mcontext.gregs[13] = reg_data[0]; - ucontext.uc_mcontext.gregs[14] = reg_data[2]; - ucontext.uc_mcontext.gregs[15] = reg_data[7]; - ucontext.uc_mcontext.gregs[16] = reg_data[16]; -#endif - - arg->ucontext->resize(sizeof(ucontext)); - memcpy(arg->ucontext->data(), &ucontext, sizeof(ucontext)); - - // Don't touch the stack anymore. - while (*arg->exit_flag == 0) { - } -} - -void test_get_context_and_wait(void* ucontext, volatile int* exit_flag) { - GetContextArg arg; - arg.ucontext = reinterpret_cast<std::vector<uint8_t>*>(ucontext); - arg.exit_flag = exit_flag; - test_level_one(1, 2, 3, 4, GetContextAndExit, &arg); -} diff --git a/libbacktrace/backtrace_testlib.h b/libbacktrace/backtrace_testlib.h deleted file mode 100644 index 9b55e56..0000000 --- a/libbacktrace/backtrace_testlib.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LIBBACKTRACE_BACKTRACE_TESTLIB_H -#define _LIBBACKTRACE_BACKTRACE_TESTLIB_H - -#include <sys/cdefs.h> - -__BEGIN_DECLS - -void test_loop_forever(); -void test_signal_handler(int); -void test_signal_action(int, siginfo_t*, void*); -int test_level_four(int, int, int, int, void (*)(void*), void*); -int test_level_three(int, int, int, int, void (*)(void*), void*); -int test_level_two(int, int, int, int, void (*)(void*), void*); -int test_level_one(int, int, int, int, void (*)(void*), void*); -int test_recursive_call(int, void (*)(void*), void*); -void test_get_context_and_wait(void*, volatile int*); - -__END_DECLS - -#endif // _LIBBACKTRACE_BACKTRACE_TESTLIB_H diff --git a/libbacktrace/include/backtrace/Backtrace.h b/libbacktrace/include/backtrace/Backtrace.h deleted file mode 100644 index 664b531..0000000 --- a/libbacktrace/include/backtrace/Backtrace.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _BACKTRACE_BACKTRACE_H -#define _BACKTRACE_BACKTRACE_H - -#include <inttypes.h> -#include <stdint.h> - -#include <string> -#include <vector> - -#include <backtrace/backtrace_constants.h> -#include <backtrace/BacktraceMap.h> - -#if defined(__LP64__) -#define PRIPTR "016" PRIx64 -typedef uint64_t word_t; -#else -#define PRIPTR "08" PRIx64 -typedef uint32_t word_t; -#endif - -enum BacktraceUnwindErrorCode : uint32_t { - BACKTRACE_UNWIND_NO_ERROR, - // Something failed while trying to perform the setup to begin the unwind. - BACKTRACE_UNWIND_ERROR_SETUP_FAILED, - // There is no map information to use with the unwind. - BACKTRACE_UNWIND_ERROR_MAP_MISSING, - // An error occurred that indicates a programming error. - BACKTRACE_UNWIND_ERROR_INTERNAL, - // The thread to unwind has disappeared before the unwind can begin. - BACKTRACE_UNWIND_ERROR_THREAD_DOESNT_EXIST, - // The thread to unwind has not responded to a signal in a timely manner. - BACKTRACE_UNWIND_ERROR_THREAD_TIMEOUT, - // Attempt to do an unsupported operation. - BACKTRACE_UNWIND_ERROR_UNSUPPORTED_OPERATION, - // Attempt to do an offline unwind without a context. - BACKTRACE_UNWIND_ERROR_NO_CONTEXT, - // The count of frames exceed MAX_BACKTRACE_FRAMES. - BACKTRACE_UNWIND_ERROR_EXCEED_MAX_FRAMES_LIMIT, - // Failed to read memory. - BACKTRACE_UNWIND_ERROR_ACCESS_MEM_FAILED, - // Failed to read registers. - BACKTRACE_UNWIND_ERROR_ACCESS_REG_FAILED, - // Failed to find a function in debug sections. - BACKTRACE_UNWIND_ERROR_FIND_PROC_INFO_FAILED, - // Failed to execute dwarf instructions in debug sections. - BACKTRACE_UNWIND_ERROR_EXECUTE_DWARF_INSTRUCTION_FAILED, - // Unwind information is incorrect. - BACKTRACE_UNWIND_ERROR_UNWIND_INFO, - // Unwind information stopped due to sp/pc repeating. - BACKTRACE_UNWIND_ERROR_REPEATED_FRAME, - // Unwind information stopped due to invalid elf. - BACKTRACE_UNWIND_ERROR_INVALID_ELF, -}; - -struct BacktraceUnwindError { - enum BacktraceUnwindErrorCode error_code; - - union { - // for BACKTRACE_UNWIND_ERROR_ACCESS_MEM_FAILED - uint64_t addr; - // for BACKTRACE_UNWIND_ERROR_ACCESS_REG_FAILED - uint64_t regno; - } error_info; - - BacktraceUnwindError() : error_code(BACKTRACE_UNWIND_NO_ERROR) {} -}; - -struct backtrace_frame_data_t { - size_t num; // The current fame number. - uint64_t pc; // The absolute pc. - uint64_t rel_pc; // The relative pc. - uint64_t sp; // The top of the stack. - size_t stack_size; // The size of the stack, zero indicate an unknown stack size. - backtrace_map_t map; // The map associated with the given pc. - std::string func_name; // The function name associated with this pc, NULL if not found. - uint64_t func_offset; // pc relative to the start of the function, only valid if func_name is not - // NULL. -}; - -struct backtrace_stackinfo_t { - uint64_t start; - uint64_t end; - const uint8_t* data; -}; - -namespace unwindstack { -class Regs; -} - -class Backtrace { - public: - enum ArchEnum : uint8_t { - ARCH_ARM, - ARCH_ARM64, - ARCH_X86, - ARCH_X86_64, - }; - - static void SetGlobalElfCache(bool enable); - - // Create the correct Backtrace object based on what is to be unwound. - // If pid < 0 or equals the current pid, then the Backtrace object - // corresponds to the current process. - // If pid < 0 or equals the current pid and tid >= 0, then the Backtrace - // object corresponds to a thread in the current process. - // If pid >= 0 and tid < 0, then the Backtrace object corresponds to a - // different process. - // Tracing a thread in a different process is not supported. - // If map is NULL, then create the map and manage it internally. - // If map is not NULL, the map is still owned by the caller. - static Backtrace* Create(pid_t pid, pid_t tid, BacktraceMap* map = nullptr); - - virtual ~Backtrace(); - - // Get the current stack trace and store in the backtrace_ structure. - virtual bool Unwind(size_t num_ignore_frames, void* context = nullptr) = 0; - - static bool Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, - std::vector<backtrace_frame_data_t>* frames, size_t num_ignore_frames, - std::vector<std::string>* skip_names, BacktraceUnwindError* error = nullptr); - - // Get the function name and offset into the function given the pc. - // If the string is empty, then no valid function name was found, - // or the pc is not in any valid map. - virtual std::string GetFunctionName(uint64_t pc, uint64_t* offset, - const backtrace_map_t* map = nullptr); - - // Fill in the map data associated with the given pc. - virtual void FillInMap(uint64_t pc, backtrace_map_t* map); - - // Read the data at a specific address. - virtual bool ReadWord(uint64_t ptr, word_t* out_value) = 0; - - // Read arbitrary data from a specific address. If a read request would - // span from one map to another, this call only reads up until the end - // of the current map. - // Returns the total number of bytes actually read. - virtual size_t Read(uint64_t addr, uint8_t* buffer, size_t bytes) = 0; - - // Create a string representing the formatted line of backtrace information - // for a single frame. - virtual std::string FormatFrameData(size_t frame_num); - static std::string FormatFrameData(const backtrace_frame_data_t* frame); - - pid_t Pid() const { return pid_; } - pid_t Tid() const { return tid_; } - size_t NumFrames() const { return frames_.size(); } - - const backtrace_frame_data_t* GetFrame(size_t frame_num) { - if (frame_num >= frames_.size()) { - return nullptr; - } - return &frames_[frame_num]; - } - - typedef std::vector<backtrace_frame_data_t>::iterator iterator; - iterator begin() { return frames_.begin(); } - iterator end() { return frames_.end(); } - - typedef std::vector<backtrace_frame_data_t>::const_iterator const_iterator; - const_iterator begin() const { return frames_.begin(); } - const_iterator end() const { return frames_.end(); } - - BacktraceMap* GetMap() { return map_; } - - BacktraceUnwindError GetError() { return error_; } - - std::string GetErrorString(BacktraceUnwindError error); - - // Set whether to skip frames in libbacktrace/libunwindstack when doing a local unwind. - void SetSkipFrames(bool skip_frames) { skip_frames_ = skip_frames; } - - protected: - Backtrace(pid_t pid, pid_t tid, BacktraceMap* map); - - // The name returned is not demangled, GetFunctionName() takes care of - // demangling the name. - virtual std::string GetFunctionNameRaw(uint64_t pc, uint64_t* offset) = 0; - - virtual bool VerifyReadWordArgs(uint64_t ptr, word_t* out_value); - - bool BuildMap(); - - pid_t pid_; - pid_t tid_; - - BacktraceMap* map_; - bool map_shared_; - - std::vector<backtrace_frame_data_t> frames_; - - // Skip frames in libbacktrace/libunwindstack when doing a local unwind. - bool skip_frames_ = true; - - BacktraceUnwindError error_; -}; - -#endif // _BACKTRACE_BACKTRACE_H diff --git a/libbacktrace/include/backtrace/BacktraceMap.h b/libbacktrace/include/backtrace/BacktraceMap.h deleted file mode 100644 index eab1328..0000000 --- a/libbacktrace/include/backtrace/BacktraceMap.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _BACKTRACE_BACKTRACE_MAP_H -#define _BACKTRACE_BACKTRACE_MAP_H - -#include <stdint.h> -#include <sys/types.h> -#ifdef _WIN32 -// MINGW does not define these constants. -#define PROT_NONE 0 -#define PROT_READ 0x1 -#define PROT_WRITE 0x2 -#define PROT_EXEC 0x4 -#else -#include <sys/mman.h> -#endif - -#include <deque> -#include <iterator> -#include <memory> -#include <string> -#include <vector> - -// Forward declaration. -struct backtrace_stackinfo_t; - -// Special flag to indicate a map is in /dev/. However, a map in -// /dev/ashmem/... does not set this flag. -static constexpr int PROT_DEVICE_MAP = 0x8000; -// Special flag to indicate that this map represents an elf file -// created by ART for use with the gdb jit debug interface. -// This should only ever appear in offline maps data. -static constexpr int PROT_JIT_SYMFILE_MAP = 0x4000; - -struct backtrace_map_t { - uint64_t start = 0; - uint64_t end = 0; - uint64_t offset = 0; - uint64_t load_bias = 0; - int flags = 0; - std::string name; - - // Returns `name` if non-empty, or `<anonymous:0x...>` otherwise. - std::string Name() const; -}; - -namespace unwindstack { -class Memory; -} - -class BacktraceMap { -public: - // If uncached is true, then parse the current process map as of the call. - // Passing a map created with uncached set to true to Backtrace::Create() - // is unsupported. - static BacktraceMap* Create(pid_t pid, bool uncached = false); - - virtual ~BacktraceMap(); - - class iterator : public std::iterator<std::bidirectional_iterator_tag, backtrace_map_t*> { - public: - iterator(BacktraceMap* map, size_t index) : map_(map), index_(index) {} - - iterator& operator++() { - index_++; - return *this; - } - const iterator operator++(int increment) { - index_ += increment; - return *this; - } - iterator& operator--() { - index_--; - return *this; - } - const iterator operator--(int decrement) { - index_ -= decrement; - return *this; - } - - bool operator==(const iterator& rhs) { return this->index_ == rhs.index_; } - bool operator!=(const iterator& rhs) { return this->index_ != rhs.index_; } - - const backtrace_map_t* operator*() { - if (index_ >= map_->size()) { - return nullptr; - } - backtrace_map_t* map = &map_->maps_[index_]; - if (map->load_bias == static_cast<uint64_t>(-1)) { - map->load_bias = map_->GetLoadBias(index_); - } - return map; - } - - private: - BacktraceMap* map_ = nullptr; - size_t index_ = 0; - }; - - iterator begin() { return iterator(this, 0); } - iterator end() { return iterator(this, maps_.size()); } - - // Fill in the map data structure for the given address. - virtual void FillIn(uint64_t addr, backtrace_map_t* map); - - // Get BuildId of ELF file at the given address, or empty string on failure. - virtual std::string GetBuildId(uint64_t /*pc*/) { return std::string(); } - - // Only supported with the new unwinder. - virtual std::string GetFunctionName(uint64_t /*pc*/, uint64_t* /*offset*/) { return ""; } - virtual std::shared_ptr<unwindstack::Memory> GetProcessMemory() { return nullptr; } - - // The flags returned are the same flags as used by the mmap call. - // The values are PROT_*. - int GetFlags(uint64_t pc) { - backtrace_map_t map; - FillIn(pc, &map); - if (IsValid(map)) { - return map.flags; - } - return PROT_NONE; - } - - bool IsReadable(uint64_t pc) { return GetFlags(pc) & PROT_READ; } - bool IsWritable(uint64_t pc) { return GetFlags(pc) & PROT_WRITE; } - bool IsExecutable(uint64_t pc) { return GetFlags(pc) & PROT_EXEC; } - - // In order to use the iterators on this object, a caller must - // call the LockIterator and UnlockIterator function to guarantee - // that the data does not change while it's being used. - virtual void LockIterator() {} - virtual void UnlockIterator() {} - - size_t size() const { return maps_.size(); } - - virtual bool Build(); - - static inline bool IsValid(const backtrace_map_t& map) { - return map.end > 0; - } - - void SetSuffixesToIgnore(std::vector<std::string> suffixes) { - suffixes_to_ignore_.insert(suffixes_to_ignore_.end(), suffixes.begin(), suffixes.end()); - } - - const std::vector<std::string>& GetSuffixesToIgnore() { return suffixes_to_ignore_; } - - // Disabling the resolving of names results in the function name being - // set to an empty string and the function offset being set to zero - // in the frame data when unwinding. - void SetResolveNames(bool resolve) { resolve_names_ = resolve; } - - bool ResolveNames() { return resolve_names_; } - - protected: - BacktraceMap(pid_t pid); - - virtual uint64_t GetLoadBias(size_t /* index */) { return 0; } - - pid_t pid_; - std::deque<backtrace_map_t> maps_; - std::vector<std::string> suffixes_to_ignore_; - bool resolve_names_ = true; -}; - -class ScopedBacktraceMapIteratorLock { -public: - explicit ScopedBacktraceMapIteratorLock(BacktraceMap* map) : map_(map) { - map->LockIterator(); - } - - ~ScopedBacktraceMapIteratorLock() { - map_->UnlockIterator(); - } - -private: - BacktraceMap* map_; -}; - -#endif // _BACKTRACE_BACKTRACE_MAP_H diff --git a/libbacktrace/include/backtrace/backtrace_constants.h b/libbacktrace/include/backtrace/backtrace_constants.h deleted file mode 100644 index 1a2da36..0000000 --- a/libbacktrace/include/backtrace/backtrace_constants.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _BACKTRACE_BACKTRACE_CONSTANTS_H -#define _BACKTRACE_BACKTRACE_CONSTANTS_H - -// When the pid to be traced is set to this value, then trace the current -// process. If the tid value is not BACKTRACE_NO_TID, then the specified -// thread from the current process will be traced. -#define BACKTRACE_CURRENT_PROCESS (-1) -// When the tid to be traced is set to this value, then trace the specified -// current thread of the specified pid. -#define BACKTRACE_CURRENT_THREAD (-1) - -#define MAX_BACKTRACE_FRAMES 256 - -#endif // _BACKTRACE_BACKTRACE_CONSTANTS_H diff --git a/libbacktrace/testdata/arm/libGLESv2_adreno.so b/libbacktrace/testdata/arm/libGLESv2_adreno.so Binary files differdeleted file mode 100644 index 871f6dc..0000000 --- a/libbacktrace/testdata/arm/libGLESv2_adreno.so +++ /dev/null diff --git a/libbacktrace/testdata/arm/libandroid_runtime.so b/libbacktrace/testdata/arm/libandroid_runtime.so Binary files differdeleted file mode 100644 index e4283e6..0000000 --- a/libbacktrace/testdata/arm/libandroid_runtime.so +++ /dev/null diff --git a/libbacktrace/testdata/arm/libart.so b/libbacktrace/testdata/arm/libart.so Binary files differdeleted file mode 100644 index bed8e35..0000000 --- a/libbacktrace/testdata/arm/libart.so +++ /dev/null diff --git a/libbacktrace/testdata/arm/libbacktrace_test_arm_exidx.so b/libbacktrace/testdata/arm/libbacktrace_test_arm_exidx.so Binary files differdeleted file mode 100755 index 454b032..0000000 --- a/libbacktrace/testdata/arm/libbacktrace_test_arm_exidx.so +++ /dev/null diff --git a/libbacktrace/testdata/arm/libbacktrace_test_debug_frame.so b/libbacktrace/testdata/arm/libbacktrace_test_debug_frame.so Binary files differdeleted file mode 100755 index 787f2cb..0000000 --- a/libbacktrace/testdata/arm/libbacktrace_test_debug_frame.so +++ /dev/null diff --git a/libbacktrace/testdata/arm/libbacktrace_test_gnu_debugdata.so b/libbacktrace/testdata/arm/libbacktrace_test_gnu_debugdata.so Binary files differdeleted file mode 100755 index 9340d98..0000000 --- a/libbacktrace/testdata/arm/libbacktrace_test_gnu_debugdata.so +++ /dev/null diff --git a/libbacktrace/testdata/arm/offline_testdata b/libbacktrace/testdata/arm/offline_testdata deleted file mode 100644 index d5b8f47..0000000 --- a/libbacktrace/testdata/arm/offline_testdata +++ /dev/null @@ -1,105 +0,0 @@ -pid: 32232 tid: 32233 -map: start: aad19000 end: aad6c000 offset: 0 load_bias: 0 flags: 5 name: /data/backtrace_test32 -map: start: aad6c000 end: aad6e000 offset: 52000 load_bias: 0 flags: 1 name: /data/backtrace_test32 -map: start: aad6e000 end: aad6f000 offset: 54000 load_bias: 0 flags: 3 name: /data/backtrace_test32 -map: start: e7380000 end: e7400000 offset: 0 load_bias: 0 flags: 3 name: [anon:libc_malloc] -map: start: e745f000 end: e7463000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libnetd_client.so -map: start: e7463000 end: e7464000 offset: 3000 load_bias: 0 flags: 1 name: /system/lib/libnetd_client.so -map: start: e7464000 end: e7465000 offset: 4000 load_bias: 0 flags: 3 name: /system/lib/libnetd_client.so -map: start: e7480000 end: e7500000 offset: 0 load_bias: 0 flags: 3 name: [anon:libc_malloc] -map: start: e7558000 end: e756c000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libunwind.so -map: start: e756c000 end: e756d000 offset: 0 load_bias: 0 flags: 0 name: -map: start: e756d000 end: e756e000 offset: 14000 load_bias: 0 flags: 1 name: /system/lib/libunwind.so -map: start: e756e000 end: e756f000 offset: 15000 load_bias: 0 flags: 3 name: /system/lib/libunwind.so -map: start: e756f000 end: e75b5000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: e75d4000 end: e75e1000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libbase.so -map: start: e75e1000 end: e75e2000 offset: c000 load_bias: 0 flags: 1 name: /system/lib/libbase.so -map: start: e75e2000 end: e75e3000 offset: d000 load_bias: 0 flags: 3 name: /system/lib/libbase.so -map: start: e7600000 end: e7616000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/liblzma.so -map: start: e7616000 end: e7617000 offset: 15000 load_bias: 0 flags: 1 name: /system/lib/liblzma.so -map: start: e7617000 end: e7618000 offset: 16000 load_bias: 0 flags: 3 name: /system/lib/liblzma.so -map: start: e7618000 end: e761d000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: e7647000 end: e7656000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/liblog.so -map: start: e7656000 end: e7657000 offset: e000 load_bias: 0 flags: 1 name: /system/lib/liblog.so -map: start: e7657000 end: e7658000 offset: f000 load_bias: 0 flags: 3 name: /system/lib/liblog.so -map: start: e7681000 end: e76a2000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libm.so -map: start: e76a2000 end: e76a3000 offset: 20000 load_bias: 0 flags: 1 name: /system/lib/libm.so -map: start: e76a3000 end: e76a4000 offset: 21000 load_bias: 0 flags: 3 name: /system/lib/libm.so -map: start: e76eb000 end: e76ee000 offset: 0 load_bias: 0 flags: 5 name: /data/libbacktrace_test.so -map: start: e76ee000 end: e76ef000 offset: 2000 load_bias: 0 flags: 1 name: /data/libbacktrace_test.so -map: start: e76ef000 end: e76f0000 offset: 3000 load_bias: 0 flags: 3 name: /data/libbacktrace_test.so -map: start: e7712000 end: e771f000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libbacktrace.so -map: start: e771f000 end: e7720000 offset: 0 load_bias: 0 flags: 0 name: -map: start: e7720000 end: e7721000 offset: d000 load_bias: 0 flags: 1 name: /system/lib/libbacktrace.so -map: start: e7721000 end: e7722000 offset: e000 load_bias: 0 flags: 3 name: /system/lib/libbacktrace.so -map: start: e7761000 end: e7778000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libutils.so -map: start: e7778000 end: e7779000 offset: 16000 load_bias: 0 flags: 1 name: /system/lib/libutils.so -map: start: e7779000 end: e777a000 offset: 17000 load_bias: 0 flags: 3 name: /system/lib/libutils.so -map: start: e77a5000 end: e782d000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libc.so -map: start: e782d000 end: e7831000 offset: 87000 load_bias: 0 flags: 1 name: /system/lib/libc.so -map: start: e7831000 end: e7833000 offset: 8b000 load_bias: 0 flags: 3 name: /system/lib/libc.so -map: start: e7833000 end: e7834000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: e7834000 end: e7835000 offset: 0 load_bias: 0 flags: 1 name: [anon:.bss] -map: start: e7835000 end: e783b000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: e7845000 end: e8437000 offset: 0 load_bias: 2b000 flags: 5 name: /system/lib/libLLVM.so -map: start: e8437000 end: e8438000 offset: 0 load_bias: 0 flags: 0 name: -map: start: e8438000 end: e848a000 offset: bf2000 load_bias: 0 flags: 1 name: /system/lib/libLLVM.so -map: start: e848a000 end: e848b000 offset: c44000 load_bias: 0 flags: 3 name: /system/lib/libLLVM.so -map: start: e848b000 end: e84a1000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: e84eb000 end: e84f7000 offset: 0 load_bias: 0 flags: 5 name: /system/lib/libcutils.so -map: start: e84f7000 end: e84f8000 offset: 0 load_bias: 0 flags: 0 name: -map: start: e84f8000 end: e84f9000 offset: c000 load_bias: 0 flags: 1 name: /system/lib/libcutils.so -map: start: e84f9000 end: e84fa000 offset: d000 load_bias: 0 flags: 3 name: /system/lib/libcutils.so -map: start: e852e000 end: e85b3000 offset: 0 load_bias: 2000 flags: 5 name: /system/lib/libc++.so -map: start: e85b3000 end: e85b4000 offset: 0 load_bias: 0 flags: 0 name: -map: start: e85b4000 end: e85b8000 offset: 85000 load_bias: 0 flags: 1 name: /system/lib/libc++.so -map: start: e85b8000 end: e85b9000 offset: 89000 load_bias: 0 flags: 3 name: /system/lib/libc++.so -map: start: e85b9000 end: e85ba000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: e85ce000 end: e85cf000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc] -map: start: e85e4000 end: e85e5000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: e8607000 end: e8608000 offset: 0 load_bias: 0 flags: 1 name: [anon:linker_alloc] -map: start: e8680000 end: e8700000 offset: 0 load_bias: 0 flags: 3 name: [anon:libc_malloc] -map: start: e870d000 end: e8719000 offset: 0 load_bias: 0 flags: 3 name: -map: start: e8719000 end: e871b000 offset: 0 load_bias: 0 flags: 1 name: [anon:atexit handlers] -map: start: e871b000 end: e873b000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/u:object_r:default_prop:s0 -map: start: e873b000 end: e875b000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/properties_serial -map: start: e875b000 end: e875c000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: e875c000 end: e875d000 offset: 0 load_bias: 0 flags: 3 name: [anon:arc4random data] -map: start: e875d000 end: e875e000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc] -map: start: e875e000 end: e875f000 offset: 0 load_bias: 0 flags: 1 name: [anon:linker_alloc] -map: start: e875f000 end: e877f000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/u:object_r:debug_prop:s0 -map: start: e877f000 end: e879f000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/properties_serial -map: start: e879f000 end: e87a0000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: e87a0000 end: e87a1000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: e87a1000 end: e87a2000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: e87a2000 end: e87a3000 offset: 0 load_bias: 0 flags: 0 name: -map: start: e87a3000 end: e87a4000 offset: 0 load_bias: 0 flags: 3 name: -map: start: e87a4000 end: e87a5000 offset: 0 load_bias: 0 flags: 0 name: -map: start: e87a5000 end: e87a6000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_lob] -map: start: e87a6000 end: e87a7000 offset: 0 load_bias: 0 flags: 1 name: [anon:linker_alloc] -map: start: e87a7000 end: e87a8000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: e87a8000 end: e87a9000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: e87a9000 end: e87aa000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: e87aa000 end: e87ab000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: e87ab000 end: e87ac000 offset: 0 load_bias: 0 flags: 1 name: [anon:atexit handlers] -map: start: e87ac000 end: e87ad000 offset: 0 load_bias: 0 flags: 0 name: [anon:thread signal stack guard page] -map: start: e87ad000 end: e87af000 offset: 0 load_bias: 0 flags: 3 name: [anon:thread signal stack] -map: start: e87af000 end: e87b0000 offset: 0 load_bias: 0 flags: 3 name: [anon:arc4random data] -map: start: e87b0000 end: e880d000 offset: 0 load_bias: 0 flags: 5 name: /system/bin/linker -map: start: e880d000 end: e880f000 offset: 5c000 load_bias: 0 flags: 1 name: /system/bin/linker -map: start: e880f000 end: e8810000 offset: 5e000 load_bias: 0 flags: 3 name: /system/bin/linker -map: start: e8810000 end: e8812000 offset: 0 load_bias: 0 flags: 3 name: -map: start: e8812000 end: e8813000 offset: 0 load_bias: 0 flags: 1 name: -map: start: e8813000 end: e8815000 offset: 0 load_bias: 0 flags: 3 name: -map: start: ff886000 end: ff8a9000 offset: 0 load_bias: 0 flags: 3 name: [stack] -map: start: ffff0000 end: ffff1000 offset: 0 load_bias: 0 flags: 5 name: [vectors] -ucontext: 104 000000000000000000000000000000000000000000000000000000000000000034868affdc8871e8150000001c0000001c000000150000000e00000007000000e08771e834868aff2354d2aa24f9ffffdc8871e88c8771e875b86ee778ba6ee70000000000000000 -stack: start: e8715000 end: e8719000 size: 16384 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dc8871e87dba6ee734868affdc8871e8dc8871e85dba6ee7070000000e000000150000001c000000dc8871e85dba6ee71c000000150000000e00000007000000100000000c0000000800000004000000ddb86ee75dba6ee7dc8871e804000000080000000c00000010000000dc8871e85dba6ee7100000000c000000080000000400000008000000060000000400000002000000288871e835b96ee75dba6ee7dc8871e802000000040000000600000008000000dc8871e85dba6ee70800000006000000040000000200000004000000030000000200000001000000708871e88db96ee75dba6ee7dc8871e801000000020000000300000004000000dc8871e85dba6ee70400000003000000020000000100000004000000208971e8208971e878000000e87d00003dba6ee75dba6ee7dc8871e878000000c5807ce7fc7183e734868aff78868aff78868aff34868aff34868aff78868affe0879437208971e84154d2aa0020000034868aff34868aff34868aff78000000c9b87ee7b1b87ee7a3f47be7288971e8b1b87ee7208971e800000000f83481e800000000e97d0000e87d000000000000005071e82039000000100000000000000000000000000000000000002354d2aa34868aff00000000002071e801000000000000000000000000000000708971e8208971e8000000000000000000000000e0879437000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -function: start: 0 end: e76eb835 name: unknown_start -function: start: e76eb835 end: e76eb88d name: test_level_four -function: start: e76eb88d end: e76eb8e5 name: test_level_three -function: start: e76eb8e5 end: e76eb93d name: test_level_two -function: start: e76eb93d end: e76eb995 name: test_level_one -function: start: e76eb995 end: e76eb9f1 name: test_recursive_call -function: start: e76eb9f1 end: ffffffff name: test_get_context_and_wait -function: start: ffffffff end: ffffffff name: unknown_end diff --git a/libbacktrace/testdata/arm/offline_testdata_for_libGLESv2_adreno b/libbacktrace/testdata/arm/offline_testdata_for_libGLESv2_adreno deleted file mode 100644 index d7c186e..0000000 --- a/libbacktrace/testdata/arm/offline_testdata_for_libGLESv2_adreno +++ /dev/null @@ -1,6 +0,0 @@ -pid: 7288 tid: 31656 -ucontext: 104 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f017cc00000000356241cc0000000000000000 -map: start: cc361000 end: cc758000 offset: 0 load_bias: 9000 flags: 5 name: /vendor/lib/egl/libGLESv2_adreno.so -stack: start: cc17f234 end: cc17f258 size: 36 0000000000000000000000000000000000000000000000000000000000000000b36141cc -function: start: be1f0 end: be304 name: EsxContext::Clear(unsigned int, unsigned int, unsigned int, EsxClearValues*) -function: start: be058 end: be1f0 name: EsxContext::ClearBuffersForDebug() diff --git a/libbacktrace/testdata/arm/offline_testdata_for_libandroid_runtime b/libbacktrace/testdata/arm/offline_testdata_for_libandroid_runtime deleted file mode 100644 index 54f3525..0000000 --- a/libbacktrace/testdata/arm/offline_testdata_for_libandroid_runtime +++ /dev/null @@ -1,6 +0,0 @@ -pid: 7288 tid: 31656 -ucontext: 104 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003069fed80000000049dcf6f10000000000000000 -map: start: f1f10000 end: f2049000 offset: 0 load_bias: 10000 flags: 5 name: /system/lib/libandroid_runtime.so -stack: start: d8fe6948 end: d8fe6958 size: 16 000000000000000000000000e7dcf6f1 -function: start: 6dbf9 end: 6dce5 name: android::AndroidRuntime::javaThreadShell -function: start: 6dce5 end: 6dd79 name: android::AndroidRuntime::javaCreateThreadEtc diff --git a/libbacktrace/testdata/arm/offline_testdata_for_libart b/libbacktrace/testdata/arm/offline_testdata_for_libart deleted file mode 100644 index c1369ff..0000000 --- a/libbacktrace/testdata/arm/offline_testdata_for_libart +++ /dev/null @@ -1,10 +0,0 @@ -pid: 32232 tid: 32233 -ucontext: 104 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006473602451b3e2e700000000d82fd1ff5600000000908eec00000000d42dd1ff00000000c02dd1ff617171e9617171e90000000000000000 -map: start: e9380000 end: e9766000 offset: 0 load_bias: b000 flags: 5 name: /system/lib/libart.so -stack: start: ffd12dc0 end: ffd1306c size: 684 00000000000c5024070000000300000005070a0a0100000051b3e2e700000000d82fd1ff560000004c2ed1ff000000000000000081b771e9d82fd1ff000000004c2ed1ff0c2ed1ff40a8d27024bf76e900908eec000000000834d1ff0000000000000000000000000d000000050000000000000000000000080000000101d1ff44b8bfeb4b0000000000000000000000e8b8952400000000fc2ed1ff4fb3e2e7bc49ac6f00908eecb02ed1ffd82fd1ff040000008c908eec942fd1ffd5c141e9d82fd1ff4fb3e2e7542fd1ff336c68e940000000400000007030d1fff031d1ff00000000bc49ac6f5c30d1ff942fd1ff842fd1ffd82fd1ff00000000b8f1786f4fb3e2e7610d67e9d82fd1ff4fb3e2e77880adeb7980adeb7a80adeb7b80adeb7c80adeb7d80adeb7e80adeb7f80adeb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007430d1ff02000000e8b89524e8d895240200000000908eec5c30d1ffbc49ac6f4fb3e2e74030d1ffe8d8952400000000b8f1786fbc49ac6f332367e94fb3e2e701000000637171e9637171e9000000005c30d1ff8430d1ffe0c08bec882fd1ff4fb3e2e70200000004000000942fd1ffe8b8952400908eec58d8952458d895247fbd69e90500000000400fe40100000000908eec58d89524060000009c86bd6f6b876fe900908eece0c08bec00008eec0000000000000000000000000000000044b8bfeb4b000000009be86f040000000038d1ff01000000c8e7446f060000000000000000908eec30d89524e8b895249c86bd6f7893476f00908eec00000000358c6fe970400fe4116e71e9a0285a6fa4d49c6f4489bd6f30d8952458d89524e8d8952400908eeca431d1ff2c31d1ffb75861e90100000000908eec30528bec409181e958d89524 -function: start: 3a2121 end: 3a217a name: art_quick_invoke_stub_internal -function: start: 3a66a5 end: 3a6787 name: art_quick_invoke_static_stub -function: start: a7129 end: a72f1 name: art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) -function: start: 2fbd35 end: 2fc789 name: art::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::ArgArray*, art::JValue*, char const*) -function: start: 2fcf75 end: 2fd88d name: art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int) -function: start: 2a089d end: 2a08bb name: art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobject*) diff --git a/libbacktrace/testdata/arm64/eglSubDriverAndroid.so b/libbacktrace/testdata/arm64/eglSubDriverAndroid.so Binary files differdeleted file mode 100644 index 10ce06b..0000000 --- a/libbacktrace/testdata/arm64/eglSubDriverAndroid.so +++ /dev/null diff --git a/libbacktrace/testdata/arm64/libbacktrace_test_eh_frame.so b/libbacktrace/testdata/arm64/libbacktrace_test_eh_frame.so Binary files differdeleted file mode 100755 index 880f337..0000000 --- a/libbacktrace/testdata/arm64/libbacktrace_test_eh_frame.so +++ /dev/null diff --git a/libbacktrace/testdata/arm64/libskia.so b/libbacktrace/testdata/arm64/libskia.so Binary files differdeleted file mode 100644 index ef1a6a1..0000000 --- a/libbacktrace/testdata/arm64/libskia.so +++ /dev/null diff --git a/libbacktrace/testdata/arm64/offline_testdata b/libbacktrace/testdata/arm64/offline_testdata deleted file mode 100644 index cee9f72..0000000 --- a/libbacktrace/testdata/arm64/offline_testdata +++ /dev/null @@ -1,107 +0,0 @@ -pid: 32438 tid: 32439 -map: start: 557066e000 end: 55706ee000 offset: 0 load_bias: 0 flags: 5 name: /data/backtrace_test64 -map: start: 55706ef000 end: 55706f2000 offset: 80000 load_bias: 0 flags: 1 name: /data/backtrace_test64 -map: start: 55706f2000 end: 55706f3000 offset: 83000 load_bias: 0 flags: 3 name: /data/backtrace_test64 -map: start: 7014200000 end: 7014600000 offset: 0 load_bias: 0 flags: 3 name: [anon:libc_malloc] -map: start: 701464c000 end: 701465c000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/libcutils.so -map: start: 701465c000 end: 701465d000 offset: 0 load_bias: 0 flags: 0 name: -map: start: 701465d000 end: 701465e000 offset: 10000 load_bias: 0 flags: 1 name: /system/lib64/libcutils.so -map: start: 701465e000 end: 701465f000 offset: 11000 load_bias: 0 flags: 3 name: /system/lib64/libcutils.so -map: start: 7014691000 end: 70146b5000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/liblzma.so -map: start: 70146b5000 end: 70146b6000 offset: 23000 load_bias: 0 flags: 1 name: /system/lib64/liblzma.so -map: start: 70146b6000 end: 70146b7000 offset: 24000 load_bias: 0 flags: 3 name: /system/lib64/liblzma.so -map: start: 70146b7000 end: 70146bc000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: 70146c9000 end: 70158b5000 offset: 0 load_bias: af000 flags: 5 name: /system/lib64/libLLVM.so -map: start: 70158b5000 end: 701596b000 offset: 11eb000 load_bias: 0 flags: 1 name: /system/lib64/libLLVM.so -map: start: 701596b000 end: 701596c000 offset: 12a1000 load_bias: 0 flags: 3 name: /system/lib64/libLLVM.so -map: start: 701596c000 end: 701599f000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: 70159c2000 end: 70159f9000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/libm.so -map: start: 70159f9000 end: 70159fa000 offset: 36000 load_bias: 0 flags: 1 name: /system/lib64/libm.so -map: start: 70159fa000 end: 70159fb000 offset: 37000 load_bias: 0 flags: 3 name: /system/lib64/libm.so -map: start: 7015a1e000 end: 7015a2e000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/libbacktrace.so -map: start: 7015a2e000 end: 7015a2f000 offset: f000 load_bias: 0 flags: 1 name: /system/lib64/libbacktrace.so -map: start: 7015a2f000 end: 7015a30000 offset: 10000 load_bias: 0 flags: 3 name: /system/lib64/libbacktrace.so -map: start: 7015a5e000 end: 7015a7d000 offset: 0 load_bias: 1000 flags: 5 name: /system/lib64/libutils.so -map: start: 7015a7d000 end: 7015a7e000 offset: 0 load_bias: 0 flags: 0 name: -map: start: 7015a7e000 end: 7015a7f000 offset: 1f000 load_bias: 0 flags: 1 name: /system/lib64/libutils.so -map: start: 7015a7f000 end: 7015a80000 offset: 20000 load_bias: 0 flags: 3 name: /system/lib64/libutils.so -map: start: 7015a99000 end: 7015b6d000 offset: 0 load_bias: 9000 flags: 5 name: /system/lib64/libc++.so -map: start: 7015b6d000 end: 7015b6e000 offset: 0 load_bias: 0 flags: 0 name: -map: start: 7015b6e000 end: 7015b76000 offset: d4000 load_bias: 0 flags: 1 name: /system/lib64/libc++.so -map: start: 7015b76000 end: 7015b77000 offset: dc000 load_bias: 0 flags: 3 name: /system/lib64/libc++.so -map: start: 7015b77000 end: 7015b7a000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: 7015b81000 end: 7015b92000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/liblog.so -map: start: 7015b92000 end: 7015b93000 offset: 10000 load_bias: 0 flags: 1 name: /system/lib64/liblog.so -map: start: 7015b93000 end: 7015b94000 offset: 11000 load_bias: 0 flags: 3 name: /system/lib64/liblog.so -map: start: 7015be3000 end: 7015ca3000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/libc.so -map: start: 7015ca3000 end: 7015ca9000 offset: bf000 load_bias: 0 flags: 1 name: /system/lib64/libc.so -map: start: 7015ca9000 end: 7015cab000 offset: c5000 load_bias: 0 flags: 3 name: /system/lib64/libc.so -map: start: 7015cab000 end: 7015cac000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: 7015cac000 end: 7015cad000 offset: 0 load_bias: 0 flags: 1 name: [anon:.bss] -map: start: 7015cad000 end: 7015cb4000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: 7015cf5000 end: 7015cf6000 offset: 0 load_bias: 0 flags: 5 name: /data/libbacktrace_test.so -map: start: 7015cf6000 end: 7015cf7000 offset: 0 load_bias: 0 flags: 1 name: /data/libbacktrace_test.so -map: start: 7015cf7000 end: 7015cf8000 offset: 1000 load_bias: 0 flags: 3 name: /data/libbacktrace_test.so -map: start: 7015d1f000 end: 7015d39000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/libunwind.so -map: start: 7015d39000 end: 7015d3a000 offset: 19000 load_bias: 0 flags: 1 name: /system/lib64/libunwind.so -map: start: 7015d3a000 end: 7015d3b000 offset: 1a000 load_bias: 0 flags: 3 name: /system/lib64/libunwind.so -map: start: 7015d3b000 end: 7015da4000 offset: 0 load_bias: 0 flags: 3 name: [anon:.bss] -map: start: 7015de8000 end: 7015df7000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/libbase.so -map: start: 7015df7000 end: 7015df8000 offset: 0 load_bias: 0 flags: 0 name: -map: start: 7015df8000 end: 7015df9000 offset: f000 load_bias: 0 flags: 1 name: /system/lib64/libbase.so -map: start: 7015df9000 end: 7015dfa000 offset: 10000 load_bias: 0 flags: 3 name: /system/lib64/libbase.so -map: start: 7015e35000 end: 7015e36000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc] -map: start: 7015e4f000 end: 7015e50000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: 7015f11000 end: 7015f13000 offset: 0 load_bias: 0 flags: 5 name: /system/lib64/libnetd_client.so -map: start: 7015f13000 end: 7015f14000 offset: 1000 load_bias: 0 flags: 1 name: /system/lib64/libnetd_client.so -map: start: 7015f14000 end: 7015f15000 offset: 2000 load_bias: 0 flags: 3 name: /system/lib64/libnetd_client.so -map: start: 7015f6c000 end: 7015f79000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7015f79000 end: 7015f99000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/u:object_r:default_prop:s0 -map: start: 7015f99000 end: 7015f9a000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: 7015f9a000 end: 7015f9b000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: 7015fa6000 end: 7015fa7000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: 7015fa8000 end: 7015fa9000 offset: 0 load_bias: 0 flags: 1 name: [anon:linker_alloc] -map: start: 7015faf000 end: 7015fcf000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/properties_serial -map: start: 7015fcf000 end: 7015fd0000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: 7015fd0000 end: 7015fd1000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: 7015fd1000 end: 7015fd2000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: 7015fd4000 end: 7015fd7000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7015fd7000 end: 7015fdb000 offset: 0 load_bias: 0 flags: 1 name: [anon:atexit handlers] -map: start: 7015fdb000 end: 7015fdc000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc] -map: start: 7015fdc000 end: 7015fdd000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7015fdd000 end: 7015fde000 offset: 0 load_bias: 0 flags: 1 name: [anon:linker_alloc] -map: start: 7015fde000 end: 7015ffe000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/u:object_r:debug_prop:s0 -map: start: 7015ffe000 end: 701601e000 offset: 0 load_bias: 0 flags: 32769 name: /dev/__properties__/properties_serial -map: start: 701601e000 end: 701601f000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: 701601f000 end: 7016020000 offset: 0 load_bias: 0 flags: 0 name: -map: start: 7016020000 end: 7016021000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7016021000 end: 7016022000 offset: 0 load_bias: 0 flags: 0 name: -map: start: 7016022000 end: 7016023000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_lob] -map: start: 7016023000 end: 7016025000 offset: 0 load_bias: 0 flags: 1 name: [anon:linker_alloc] -map: start: 7016025000 end: 7016026000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: 7016026000 end: 7016027000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_vector] -map: start: 7016027000 end: 7016028000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: 7016028000 end: 7016029000 offset: 0 load_bias: 0 flags: 3 name: [anon:arc4random data] -map: start: 7016029000 end: 701602a000 offset: 0 load_bias: 0 flags: 3 name: [anon:linker_alloc_small_objects] -map: start: 701602a000 end: 701602b000 offset: 0 load_bias: 0 flags: 1 name: [anon:atexit handlers] -map: start: 701602b000 end: 701602c000 offset: 0 load_bias: 0 flags: 0 name: [anon:thread signal stack guard page] -map: start: 701602c000 end: 7016030000 offset: 0 load_bias: 0 flags: 3 name: [anon:thread signal stack] -map: start: 7016030000 end: 7016031000 offset: 0 load_bias: 0 flags: 3 name: [anon:arc4random data] -map: start: 7016031000 end: 7016033000 offset: 0 load_bias: 0 flags: 5 name: [vdso] -map: start: 7016033000 end: 70160dd000 offset: 0 load_bias: 0 flags: 5 name: /system/bin/linker64 -map: start: 70160dd000 end: 70160e0000 offset: a9000 load_bias: 0 flags: 1 name: /system/bin/linker64 -map: start: 70160e0000 end: 70160e1000 offset: ac000 load_bias: 0 flags: 3 name: /system/bin/linker64 -map: start: 70160e1000 end: 70160e4000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 70160e4000 end: 70160e5000 offset: 0 load_bias: 0 flags: 1 name: -map: start: 70160e5000 end: 70160e8000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd8baf000 end: 7fd8be6000 offset: 0 load_bias: 0 flags: 3 name: [stack] -ucontext: 464 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f838bed87f0000000e0000000000000015000000000000001c00000000000000ec59cf1570000000b863fd15700000005064fd15700000000000000000000000ec59cf15700000000200000000000000b863fd1570000000144abed87f0000006064fd15700000005064fd157000000000010000000000005826bed87f000000d86fcf15700000006057cf157000000000000000000000005064fd15700000005064fd15700000005064fd1570000000b67e00000000000040fd677055000000d064fd15700000000030fd157000000002000000000000000100000000000000fcb58a56000000000063fd15700000009857cf1570000000c062fd15700000001c5acf157000000000000000000000000000000000000000 -stack: start: 7015fd3000 end: 7015fd7000 size: 16384 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f838bed87f0000004038bed87f000000b863fd1570000000b863fd1570000000b863fd1570000000ec59cf15700000001c000000150000000e000000070000003063fd15700000001c58cf1570000000b863fd1570000000ec59cf1570000000100000000c00000008000000040000006063fd15700000007c58cf1570000000b863fd1570000000ec59cf1570000000080000000600000004000000020000009063fd1570000000dc58cf1570000000b863fd1570000000ec59cf157000000004000000030000000200000001000000d063fd1570000000c459cf15700000000100000000000000144abed87f0000004038bed87f0000004038bed87f000000144abed87f000000d3aec914588f4bcd1064fd157000000074fd6770550000004038bed87f0000004038bed87f000000ec84c41570000000e484c41570000000c484c4157000000000000000000000004064fd15700000004015c01570000000b67e0000000000000000000000000000705a0e1670000000185b0e167000000000000000000000000000000000000000705a0e16700000000000000000000000b77e0000b67e000000000000550000000030fd157000000050340000000000000010000000000000000000000000000000b222147000000000102a14700000000000000000000000000000000000000040fd6770550000004038bed87f000000000000000000000000a0fa1570000000010000000000000000000000000000000000000000000000e864fd15700000005064fd1570000000000000000000000000000000000000000000000000000000d3aec914588f4bcd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -function: start: 0 end: 7015cf5760 name: unknown_start -function: start: 7015cf5760 end: 7015cf57cc name: test_level_four -function: start: 7015cf57cc end: 7015cf582c name: test_level_three -function: start: 7015cf582c end: 7015cf588c name: test_level_two -function: start: 7015cf588c end: 7015cf58ec name: test_level_one -function: start: 7015cf58ec end: 7015cf5968 name: test_recursive_call -function: start: 7015cf5968 end: ffffffffffffffff name: test_get_context_and_wait -function: start: ffffffffffffffff end: ffffffffffffffff name: unknown_end diff --git a/libbacktrace/testdata/arm64/offline_testdata_for_eglSubDriverAndroid b/libbacktrace/testdata/arm64/offline_testdata_for_eglSubDriverAndroid deleted file mode 100644 index 673e30e..0000000 --- a/libbacktrace/testdata/arm64/offline_testdata_for_eglSubDriverAndroid +++ /dev/null @@ -1,6 +0,0 @@ -pid: 12276 tid: 12303 -map: start: 7b8c01e000 end: 7b8c030000 offset: 0 load_bias: 0 flags: 5 name: /vendor/lib64/egl/eglSubDriverAndroid.so -ucontext: 464 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004070158c7b00000000000000000000001070158c7b000000647f028c7b00000000000000000000000000000000000000 -stack: start: 7b8c157020 end: 7b8c157050 size: 48 00000000000000000000000000000000000000000000000000000000000000000000000000000000547e028c7b000000 -function: start: 9ed8 end: a1b0 name: EglAndroidWindowSurface::Initialize(EglAndroidConfig*, int const*) -function: start: 9dcc end: 9ed8 name: EglAndroidWindowSurface::Create(ANativeWindow*, EglAndroidConfig*, EglAndroidWindowSurface**, int const*) diff --git a/libbacktrace/testdata/arm64/offline_testdata_for_libskia b/libbacktrace/testdata/arm64/offline_testdata_for_libskia deleted file mode 100644 index da820c0..0000000 --- a/libbacktrace/testdata/arm64/offline_testdata_for_libskia +++ /dev/null @@ -1,6 +0,0 @@ -pid: 32232 tid: 32233 -map: start: 7c24c80000 end: 7c25413000 offset: 0 load_bias: 5f000 flags: 5 name: /system/lib64/libskia.so -ucontext: 464 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b04b158c7b0000000000000000000000504b158c7b0000000c9a18257c00000000000000000000000000000000000000 -stack: start: 7b8c154b80 end: 7b8c154bc0 size: 64 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ec43f2247c000000 -function: start: 568970 end: 568c08 name: SkScalerContext_FreeType::generateImage(SkGlyph const&) -function: start: 30330c end: 3044b0 name: SkScalerContext::getImage(SkGlyph const&) diff --git a/libbacktrace/testdata/x86/libbacktrace_test_debug_frame.so b/libbacktrace/testdata/x86/libbacktrace_test_debug_frame.so Binary files differdeleted file mode 100755 index a6f3b29..0000000 --- a/libbacktrace/testdata/x86/libbacktrace_test_debug_frame.so +++ /dev/null diff --git a/libbacktrace/testdata/x86/libbacktrace_test_gnu_debugdata.so b/libbacktrace/testdata/x86/libbacktrace_test_gnu_debugdata.so Binary files differdeleted file mode 100755 index ea58dfb..0000000 --- a/libbacktrace/testdata/x86/libbacktrace_test_gnu_debugdata.so +++ /dev/null diff --git a/libbacktrace/testdata/x86/offline_testdata b/libbacktrace/testdata/x86/offline_testdata deleted file mode 100644 index 920b338..0000000 --- a/libbacktrace/testdata/x86/offline_testdata +++ /dev/null @@ -1,82 +0,0 @@ -pid: 34545 tid: 34546 -map: start: f705a000 end: f705c000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f705c000 end: f707f000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/liblzma.so -map: start: f707f000 end: f7080000 offset: 22000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/liblzma.so -map: start: f7080000 end: f7081000 offset: 23000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/liblzma.so -map: start: f7081000 end: f7088000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f7088000 end: f7230000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/libc-2.19.so -map: start: f7230000 end: f7231000 offset: 1a8000 load_bias: 0 flags: 0 name: /lib/i386-linux-gnu/libc-2.19.so -map: start: f7231000 end: f7233000 offset: 1a8000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/libc-2.19.so -map: start: f7233000 end: f7234000 offset: 1aa000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/libc-2.19.so -map: start: f7234000 end: f7237000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f7237000 end: f727b000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/libm-2.19.so -map: start: f727b000 end: f727c000 offset: 43000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/libm-2.19.so -map: start: f727c000 end: f727d000 offset: 44000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/libm-2.19.so -map: start: f727d000 end: f7299000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/libgcc_s.so.1 -map: start: f7299000 end: f729a000 offset: 1b000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/libgcc_s.so.1 -map: start: f729a000 end: f72b8000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/libtinfo.so.5.9 -map: start: f72b8000 end: f72b9000 offset: 1e000 load_bias: 0 flags: 0 name: /lib/i386-linux-gnu/libtinfo.so.5.9 -map: start: f72b9000 end: f72bb000 offset: 1e000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/libtinfo.so.5.9 -map: start: f72bb000 end: f72bc000 offset: 20000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/libtinfo.so.5.9 -map: start: f72bc000 end: f72bd000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f72bd000 end: f72e0000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/libncurses.so.5.9 -map: start: f72e0000 end: f72e1000 offset: 22000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/libncurses.so.5.9 -map: start: f72e1000 end: f72e2000 offset: 23000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/libncurses.so.5.9 -map: start: f72e2000 end: f72e5000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/libdl-2.19.so -map: start: f72e5000 end: f72e6000 offset: 2000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/libdl-2.19.so -map: start: f72e6000 end: f72e7000 offset: 3000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/libdl-2.19.so -map: start: f72e7000 end: f72ee000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/librt-2.19.so -map: start: f72ee000 end: f72ef000 offset: 6000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/librt-2.19.so -map: start: f72ef000 end: f72f0000 offset: 7000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/librt-2.19.so -map: start: f72f0000 end: f7308000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/libpthread-2.19.so -map: start: f7308000 end: f7309000 offset: 18000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/libpthread-2.19.so -map: start: f7309000 end: f730a000 offset: 19000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/libpthread-2.19.so -map: start: f730a000 end: f730c000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f732f000 end: f7331000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f7331000 end: f7425000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libc++.so -map: start: f7425000 end: f7426000 offset: f4000 load_bias: 0 flags: 0 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libc++.so -map: start: f7426000 end: f742a000 offset: f4000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libc++.so -map: start: f742a000 end: f742b000 offset: f8000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libc++.so -map: start: f742b000 end: f742d000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f742d000 end: f7446000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libunwind.so -map: start: f7446000 end: f7447000 offset: 18000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libunwind.so -map: start: f7447000 end: f7448000 offset: 19000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libunwind.so -map: start: f7448000 end: f7457000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f7457000 end: f745c000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/liblog.so -map: start: f745c000 end: f745d000 offset: 4000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/liblog.so -map: start: f745d000 end: f745e000 offset: 5000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/liblog.so -map: start: f745e000 end: f7467000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libcutils.so -map: start: f7467000 end: f7468000 offset: 9000 load_bias: 0 flags: 0 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libcutils.so -map: start: f7468000 end: f7469000 offset: 9000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libcutils.so -map: start: f7469000 end: f746a000 offset: a000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libcutils.so -map: start: f746a000 end: f7477000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbase.so -map: start: f7477000 end: f7478000 offset: c000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbase.so -map: start: f7478000 end: f7479000 offset: d000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbase.so -map: start: f7479000 end: f7489000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbacktrace.so -map: start: f7489000 end: f748a000 offset: f000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbacktrace.so -map: start: f748a000 end: f748b000 offset: 10000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbacktrace.so -map: start: f748b000 end: f748c000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f748c000 end: f748d000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbacktrace_test.so -map: start: f748d000 end: f748e000 offset: 0 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbacktrace_test.so -map: start: f748e000 end: f748f000 offset: 1000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib/libbacktrace_test.so -map: start: f748f000 end: f7491000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f7491000 end: f74b1000 offset: 0 load_bias: 0 flags: 5 name: /lib/i386-linux-gnu/ld-2.19.so -map: start: f74b1000 end: f74b2000 offset: 1f000 load_bias: 0 flags: 1 name: /lib/i386-linux-gnu/ld-2.19.so -map: start: f74b2000 end: f74b3000 offset: 20000 load_bias: 0 flags: 3 name: /lib/i386-linux-gnu/ld-2.19.so -map: start: f74b3000 end: f77c6000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/nativetest/backtrace_test/backtrace_test32 -map: start: f77c6000 end: f77c7000 offset: 0 load_bias: ffffe000 flags: 5 name: [vdso] -map: start: f77c7000 end: f77d4000 offset: 313000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/nativetest/backtrace_test/backtrace_test32 -map: start: f77d4000 end: f77d5000 offset: 320000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/nativetest/backtrace_test/backtrace_test32 -map: start: f77d5000 end: f77d6000 offset: 0 load_bias: 0 flags: 3 name: -map: start: f7ec6000 end: f7ee7000 offset: 0 load_bias: 0 flags: 3 name: [heap] -map: start: ffe4e000 end: ffe70000 offset: 0 load_bias: 0 flags: 3 name: [stack] -ucontext: 96 0000000000000000000000000000000000000000abdae6ff00000000afdae6ff78dae6ff150000001c000000b8f132f7a0f132f7d0df48f7a0ca48f728d9e6ff000000000000000000000000ceca48f7a8dae6ff000000000000000000000000 -stack: start: f732c000 end: f7330000 size: 16384 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009d9d49f761b009f71e382ff7000000000000000000000000000000000000000002000000f6372ff704c82bf70000000000204bf7f0a908f7ceca48f728d9e6fff4a449f70000000020f332f720f332f7d0df48f7f8f132f794c748f720f332f70c144205978142a8d4be08f7d0df48f720f332f7a0ca48f71c000000150000000e000000070000001c000000a0ca48f7d0df48f748f232f739c848f7070000000e000000150000001c000000a0ca48f720f332f70000000000000000d0df48f720f332f7a0ca48f7100000000c000000080000000400000010000000a0ca48f7d0df48f798f232f7c9c848f704000000080000000c00000010000000a0ca48f720f332f70000000000000000d0df48f720f332f7a0ca48f70800000006000000040000000200000008000000a0ca48f7d0df48f7e8f232f759c948f702000000040000000600000008000000a0ca48f720f332f70000000000000000d0df48f720f332f7a0ca48f7040000000300000002000000010000000046bdaa00000000d0df48f738f332f77cca48f701000000020000000300000004000000a0ca48f720f332f700000000f83b7df7696d4df7d0df48f788dae6ff28d9e6ff28d9e6ff88dae6ff58f332f70046bdaa40fb32f7f83b7df758f332f78d6d4df728d9e6ff88dae6fff83b7df728d9e6ff28d9e6ff009030f728f432f7726f2ff728d9e6ff40fb32f740fb32f740fb32f790f332f700000000000000000000000000000000000000000000000000000000009030f740fb32f7000f3d0028f432f703b12c75032f144e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a06e2ff700000000000f3d00000000008e3f17f740fb32f7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a03823f7c4fd32f700000000e0341df7e02e1df7e03d1df70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040fb32f7188eecf740fb32f70100000030647cf70046bdaa28658876000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060a705f7a4b130f7f2860000f1860000b0fb32f7ecffffff000000000000000090f332f7000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccfb32f70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000c2638cfa7f3e1d0000000000000000000000000000000000406d4df728d9e6ff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c032f7004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -function: start: 0 end: f748c740 name: unknown_start -function: start: f748c740 end: f748c7c0 name: test_level_four -function: start: f748c7c0 end: f748c850 name: test_level_three -function: start: f748c850 end: f748c8e0 name: test_level_two -function: start: f748c8e0 end: f748c970 name: test_level_one -function: start: f748c970 end: f748ca10 name: test_recursive_call -function: start: f748ca10 end: ffffffff name: test_get_context_and_wait -function: start: ffffffff end: ffffffff name: unknown_end diff --git a/libbacktrace/testdata/x86_64/libbacktrace_test_eh_frame.so b/libbacktrace/testdata/x86_64/libbacktrace_test_eh_frame.so Binary files differdeleted file mode 100755 index f116658..0000000 --- a/libbacktrace/testdata/x86_64/libbacktrace_test_eh_frame.so +++ /dev/null diff --git a/libbacktrace/testdata/x86_64/offline_testdata b/libbacktrace/testdata/x86_64/offline_testdata deleted file mode 100644 index c6bb241..0000000 --- a/libbacktrace/testdata/x86_64/offline_testdata +++ /dev/null @@ -1,93 +0,0 @@ -pid: 25683 tid: 25692 -map: start: 7fd5aa784000 end: 7fd5aa93e000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/libc-2.19.so -map: start: 7fd5aa93e000 end: 7fd5aab3e000 offset: 1ba000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/libc-2.19.so -map: start: 7fd5aab3e000 end: 7fd5aab42000 offset: 1ba000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/libc-2.19.so -map: start: 7fd5aab42000 end: 7fd5aab44000 offset: 1be000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/libc-2.19.so -map: start: 7fd5aab44000 end: 7fd5aab49000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5aab49000 end: 7fd5aac4e000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/libm-2.19.so -map: start: 7fd5aac4e000 end: 7fd5aae4d000 offset: 105000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/libm-2.19.so -map: start: 7fd5aae4d000 end: 7fd5aae4e000 offset: 104000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/libm-2.19.so -map: start: 7fd5aae4e000 end: 7fd5aae4f000 offset: 105000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/libm-2.19.so -map: start: 7fd5aae4f000 end: 7fd5aae65000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/libgcc_s.so.1 -map: start: 7fd5aae65000 end: 7fd5ab064000 offset: 16000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/libgcc_s.so.1 -map: start: 7fd5ab064000 end: 7fd5ab065000 offset: 15000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/libgcc_s.so.1 -map: start: 7fd5ab065000 end: 7fd5ab08a000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/libtinfo.so.5.9 -map: start: 7fd5ab08a000 end: 7fd5ab289000 offset: 25000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/libtinfo.so.5.9 -map: start: 7fd5ab289000 end: 7fd5ab28d000 offset: 24000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/libtinfo.so.5.9 -map: start: 7fd5ab28d000 end: 7fd5ab28e000 offset: 28000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/libtinfo.so.5.9 -map: start: 7fd5ab28e000 end: 7fd5ab2b0000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/libncurses.so.5.9 -map: start: 7fd5ab2b0000 end: 7fd5ab4af000 offset: 22000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/libncurses.so.5.9 -map: start: 7fd5ab4af000 end: 7fd5ab4b0000 offset: 21000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/libncurses.so.5.9 -map: start: 7fd5ab4b0000 end: 7fd5ab4b1000 offset: 22000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/libncurses.so.5.9 -map: start: 7fd5ab4b1000 end: 7fd5ab4b4000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/libdl-2.19.so -map: start: 7fd5ab4b4000 end: 7fd5ab6b3000 offset: 3000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/libdl-2.19.so -map: start: 7fd5ab6b3000 end: 7fd5ab6b4000 offset: 2000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/libdl-2.19.so -map: start: 7fd5ab6b4000 end: 7fd5ab6b5000 offset: 3000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/libdl-2.19.so -map: start: 7fd5ab6b5000 end: 7fd5ab6bc000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/librt-2.19.so -map: start: 7fd5ab6bc000 end: 7fd5ab8bb000 offset: 7000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/librt-2.19.so -map: start: 7fd5ab8bb000 end: 7fd5ab8bc000 offset: 6000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/librt-2.19.so -map: start: 7fd5ab8bc000 end: 7fd5ab8bd000 offset: 7000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/librt-2.19.so -map: start: 7fd5ab8bd000 end: 7fd5ab8d6000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/libpthread-2.19.so -map: start: 7fd5ab8d6000 end: 7fd5abad5000 offset: 19000 load_bias: 0 flags: 0 name: /lib/x86_64-linux-gnu/libpthread-2.19.so -map: start: 7fd5abad5000 end: 7fd5abad6000 offset: 18000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/libpthread-2.19.so -map: start: 7fd5abad6000 end: 7fd5abad7000 offset: 19000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/libpthread-2.19.so -map: start: 7fd5abad7000 end: 7fd5abadb000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abadb000 end: 7fd5abafe000 offset: 0 load_bias: 0 flags: 5 name: /lib/x86_64-linux-gnu/ld-2.19.so -map: start: 7fd5abb17000 end: 7fd5abb1a000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abb1a000 end: 7fd5abb40000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/liblzma.so -map: start: 7fd5abb40000 end: 7fd5abb41000 offset: 25000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/liblzma.so -map: start: 7fd5abb41000 end: 7fd5abb42000 offset: 26000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/liblzma.so -map: start: 7fd5abb42000 end: 7fd5abb4b000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abb6a000 end: 7fd5abb70000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abb70000 end: 7fd5abc62000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libc++.so -map: start: 7fd5abc62000 end: 7fd5abc63000 offset: f2000 load_bias: 0 flags: 0 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libc++.so -map: start: 7fd5abc63000 end: 7fd5abc6b000 offset: f2000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libc++.so -map: start: 7fd5abc6b000 end: 7fd5abc6c000 offset: fa000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libc++.so -map: start: 7fd5abc6c000 end: 7fd5abc70000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abc70000 end: 7fd5abc8d000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libunwind.so -map: start: 7fd5abc8d000 end: 7fd5abc8e000 offset: 1c000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libunwind.so -map: start: 7fd5abc8e000 end: 7fd5abc8f000 offset: 1d000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libunwind.so -map: start: 7fd5abc8f000 end: 7fd5abcb8000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abcb8000 end: 7fd5abcbe000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/liblog.so -map: start: 7fd5abcbe000 end: 7fd5abcbf000 offset: 6000 load_bias: 0 flags: 0 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/liblog.so -map: start: 7fd5abcbf000 end: 7fd5abcc0000 offset: 6000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/liblog.so -map: start: 7fd5abcc0000 end: 7fd5abcc1000 offset: 7000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/liblog.so -map: start: 7fd5abcc1000 end: 7fd5abcc2000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abcc2000 end: 7fd5abccd000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libcutils.so -map: start: 7fd5abccd000 end: 7fd5abcce000 offset: b000 load_bias: 0 flags: 0 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libcutils.so -map: start: 7fd5abcce000 end: 7fd5abccf000 offset: b000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libcutils.so -map: start: 7fd5abccf000 end: 7fd5abcd0000 offset: c000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libcutils.so -map: start: 7fd5abcd0000 end: 7fd5abcdf000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbase.so -map: start: 7fd5abcdf000 end: 7fd5abce0000 offset: f000 load_bias: 0 flags: 0 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbase.so -map: start: 7fd5abce0000 end: 7fd5abce1000 offset: f000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbase.so -map: start: 7fd5abce1000 end: 7fd5abce2000 offset: 10000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbase.so -map: start: 7fd5abce2000 end: 7fd5abcf5000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbacktrace.so -map: start: 7fd5abcf5000 end: 7fd5abcf6000 offset: 12000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbacktrace.so -map: start: 7fd5abcf6000 end: 7fd5abcf7000 offset: 13000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbacktrace.so -map: start: 7fd5abcf7000 end: 7fd5abcf8000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbacktrace_test.so -map: start: 7fd5abcf8000 end: 7fd5abcf9000 offset: 1000 load_bias: 0 flags: 0 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbacktrace_test.so -map: start: 7fd5abcf9000 end: 7fd5abcfa000 offset: 1000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbacktrace_test.so -map: start: 7fd5abcfa000 end: 7fd5abcfb000 offset: 2000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/lib64/libbacktrace_test.so -map: start: 7fd5abcfb000 end: 7fd5abcfd000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abcfd000 end: 7fd5abcfe000 offset: 22000 load_bias: 0 flags: 1 name: /lib/x86_64-linux-gnu/ld-2.19.so -map: start: 7fd5abcfe000 end: 7fd5abcff000 offset: 23000 load_bias: 0 flags: 3 name: /lib/x86_64-linux-gnu/ld-2.19.so -map: start: 7fd5abcff000 end: 7fd5abd00000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5abd00000 end: 7fd5ac053000 offset: 0 load_bias: 0 flags: 5 name: /ssd/android/aosp_master/out/host/linux-x86/nativetest64/backtrace_test/backtrace_test64 -map: start: 7fd5ac053000 end: 7fd5ac054000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5ac054000 end: 7fd5ac06f000 offset: 353000 load_bias: 0 flags: 1 name: /ssd/android/aosp_master/out/host/linux-x86/nativetest64/backtrace_test/backtrace_test64 -map: start: 7fd5ac06f000 end: 7fd5ac070000 offset: 36e000 load_bias: 0 flags: 3 name: /ssd/android/aosp_master/out/host/linux-x86/nativetest64/backtrace_test/backtrace_test64 -map: start: 7fd5ac070000 end: 7fd5ac071000 offset: 0 load_bias: 0 flags: 3 name: -map: start: 7fd5ad54e000 end: 7fd5ad56f000 offset: 0 load_bias: 0 flags: 3 name: [heap] -map: start: 7ffcf47ed000 end: 7ffcf480f000 offset: 0 load_bias: 0 flags: 3 name: [stack] -map: start: 7ffcf48d5000 end: 7ffcf48d7000 offset: 0 load_bias: ffffffffff700000 flags: 5 name: [vdso] -map: start: ffffffffff600000 end: ffffffffff601000 offset: 0 load_bias: 0 flags: 5 name: [vsyscall] -ucontext: 224 00000000000000000000000000000000000000000000000000000000000000000000000000000000b07bcfabd57f000098deb6abd57f0000b82455add57f0000010000000000000000000000000000000000000000000000c0e354add57f000000e7b6abd57f0000c8b080f4fc7f00000e0000000000000080ddb6abd57f000000000000000000001500000000000000b07bcfabd57f00001c0000000000000060ddb6abd57f0000d07bcfabd57f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -stack: start: 7fd5abb6b000 end: 7fd5abb6f000 size: 16384 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006c4eaeabd57f00000000000000000000978142a8000000000f0000000000000012000000000000003888b4abd57f0000e657aeabd57f00000000000000000000a0dcb6abd57f0000307d78aad57f0000b0ddb6abd57f000028d978aad57f0000060aa10200000000a0ddb6abd57f0000000000000000000000000000000000002091b1abd57f0000e094b4abd57f000017008cabd57f0000c84d79aad57f000028e28babd57f00000000000005000000d503000001000000000000000000000068deb6abd57f000040deb6abd57f00002091b1abd57f00000100000000000000e0f3c6abd57f000088f0c6abd57f00006159aeabd57f000000000000000000002091b1abd57f000005000000000000000000000000000000010000000000000088f0c6abd57f00000000000000000000d07bcfabd57f00000000000000000000000000000000000098deb6abd57f000098deb6abd57f0000b0ddb6abd57f00006179cfabd57f000098deb6abd57f0000b07bcfabd57f00001c000000150000000e00000007000000f0ddb6abd57f0000e179cfabd57f00000000000000000000150000001c00000098deb6abd57f0000b07bcfabd57f0000100000000c000000080000000400000030deb6abd57f0000417acfabd57f000000000000000000000c0000001000000098deb6abd57f0000b07bcfabd57f00000800000006000000040000000200000070deb6abd57f0000a17acfabd57f00000000000000000000060000000800000098deb6abd57f0000b07bcfabd57f000004000000030000000200000001000000b0deb6abd57f0000817bcfabd57f0000000000000000000074b480f4fc7f0000c8b080f4fc7f0000c8b080f4fc7f000074b480f4fc7f000000006a80f3f73cf1d0deb6abd57f00002a52d5abd57f0000c8b080f4fc7f0000c8b080f4fc7f0000000000000000000084518cabd57f0000000000000000000000e7b6abd57f000000e7b6abd57f00008f990b1e3bad5a6700000000000000000000000000000000c0e354add57f000000e7b6abd57f00008f99cba356faf1988f9991bc23faf1980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7b6abd57f00007de387aad57f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006030b4aad57f0000b8edb6abd57f00000000000000000000000000000000000080b88eaad57f0000000000000000000080b28eaad57f0000000000000000000080c18eaad57f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e7b6abd57f0000402555add57f000000e7b6abd57f00000100000000000000000000000000000000006a80f3f73cf1058f9d56adb3c7cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000407ab1abd57f000030a3adabd57f00005c64000053640000e0e9b6abd57f0000e0e9b6abd57f0000e0ffffffffffffff00000000000000000000000000000000f0deb6abd57f00000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010eab6abd57f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000c46ad90f52391d00000000000000000000000000000000000000000000000000f051d5abd57f0000c8b080f4fc7f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0b6abd57f000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -function: start: 0 end: 7fd5abcf7930 name: unknown_start -function: start: 7fd5abcf7930 end: 7fd5abcf7990 name: test_level_four -function: start: 7fd5abcf7990 end: 7fd5abcf79f0 name: test_level_three -function: start: 7fd5abcf79f0 end: 7fd5abcf7a50 name: test_level_two -function: start: 7fd5abcf7a50 end: 7fd5abcf7ab0 name: test_level_one -function: start: 7fd5abcf7ab0 end: 7fd5abcf7b30 name: test_recursive_call -function: start: 7fd5abcf7b30 end: ffffffffffffffff name: test_get_context_and_wait -function: start: ffffffffffffffff end: ffffffffffffffff name: unknown_end |