/system/core/libunwindstack/tests/ |
D | UnwindOfflineTest.cpp | 196 static std::string DumpFrames(Unwinder& unwinder) { in DumpFrames() argument 198 for (size_t i = 0; i < unwinder.NumFrames(); i++) { in DumpFrames() 199 str += unwinder.FormatFrame(i) + "\n"; in DumpFrames() 208 Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); in TEST_F() local 209 unwinder.Unwind(); in TEST_F() 211 std::string frame_info(DumpFrames(unwinder)); in TEST_F() 212 ASSERT_EQ(4U, unwinder.NumFrames()) << "Unwind:\n" << frame_info; in TEST_F() 219 EXPECT_EQ(0xf31ea9f8U, unwinder.frames()[0].pc); in TEST_F() 220 EXPECT_EQ(0xe9c866f8U, unwinder.frames()[0].sp); in TEST_F() 221 EXPECT_EQ(0xf2da0a1bU, unwinder.frames()[1].pc); in TEST_F() [all …]
|
D | UnwinderTest.cpp | 164 Unwinder unwinder(64, maps_.get(), ®s_, process_memory_); in TEST_F() local 165 unwinder.Unwind(); in TEST_F() 166 EXPECT_EQ(ERROR_NONE, unwinder.LastErrorCode()); in TEST_F() 167 EXPECT_FALSE(unwinder.elf_from_memory_not_file()); in TEST_F() 169 ASSERT_EQ(3U, unwinder.NumFrames()); in TEST_F() 171 auto* frame = &unwinder.frames()[0]; in TEST_F() 186 frame = &unwinder.frames()[1]; in TEST_F() 201 frame = &unwinder.frames()[2]; in TEST_F() 228 Unwinder unwinder(64, maps_.get(), ®s_, process_memory_); in TEST_F() local 229 unwinder.SetResolveNames(false); in TEST_F() [all …]
|
D | UnwindTest.cpp | 102 static std::string ErrorMsg(const std::vector<const char*>& function_names, Unwinder* unwinder) { in ErrorMsg() argument 104 for (size_t i = 0; i < unwinder->NumFrames(); i++) { in ErrorMsg() 105 unwind += unwinder->FormatFrame(i) + '\n'; in ErrorMsg() 114 static void VerifyUnwind(Unwinder* unwinder, std::vector<const char*> expected_function_names) { in VerifyUnwind() argument 115 unwinder->Unwind(); in VerifyUnwind() 117 for (auto& frame : unwinder->frames()) { in VerifyUnwind() 126 ASSERT_TRUE(expected_function_names.empty()) << ErrorMsg(expected_function_names, unwinder); in VerifyUnwind() 133 Unwinder unwinder(512, maps, regs, process_memory); in VerifyUnwind() local 134 VerifyUnwind(&unwinder, expected_function_names); in VerifyUnwind() 161 std::unique_ptr<Unwinder> unwinder; in InnerFunction() local [all …]
|
D | LocalUnwinderTest.cpp | 89 extern "C" void LocalInnerFunction(LocalUnwinder* unwinder, bool unwind_through_signal) { in LocalInnerFunction() argument 92 g_unwinder = unwinder; in LocalInnerFunction() 110 ASSERT_TRUE(unwinder->Unwind(&frame_info, 256)); in LocalInnerFunction() 127 extern "C" void LocalMiddleFunction(LocalUnwinder* unwinder, bool unwind_through_signal) { in LocalMiddleFunction() argument 128 LocalInnerFunction(unwinder, unwind_through_signal); in LocalMiddleFunction() 131 extern "C" void LocalOuterFunction(LocalUnwinder* unwinder, bool unwind_through_signal) { in LocalOuterFunction() argument 132 LocalMiddleFunction(unwinder, unwind_through_signal); in LocalOuterFunction()
|
D | TestLocal.cpp | 22 unwindstack::LocalUnwinder* unwinder = in TestlibLevel4() local 26 unwinder->Unwind(frame_info, 256); in TestlibLevel4()
|
/system/core/debuggerd/libdebuggerd/ |
D | backtrace.cpp | 62 void dump_backtrace_thread(int output_fd, unwindstack::Unwinder* unwinder, in dump_backtrace_thread() argument 70 unwinder->SetRegs(thread.registers.get()); in dump_backtrace_thread() 71 unwinder->Unwind(); in dump_backtrace_thread() 72 if (unwinder->NumFrames() == 0) { in dump_backtrace_thread() 77 log_backtrace(&log, unwinder, " "); in dump_backtrace_thread() 80 void dump_backtrace(android::base::unique_fd output_fd, unwindstack::Unwinder* unwinder, in dump_backtrace() argument 94 dump_backtrace_thread(output_fd.get(), unwinder, target->second); in dump_backtrace() 97 dump_backtrace_thread(output_fd.get(), unwinder, info); in dump_backtrace()
|
D | tombstone.cpp | 298 static void dump_all_maps(log_t* log, unwindstack::Unwinder* unwinder, uint64_t addr) { in dump_all_maps() argument 301 unwindstack::Maps* maps = unwinder->GetMaps(); in dump_all_maps() 318 std::shared_ptr<unwindstack::Memory>& process_memory = unwinder->GetProcessMemory(); in dump_all_maps() 440 static bool dump_thread(log_t* log, unwindstack::Unwinder* unwinder, const ThreadInfo& thread_info, in dump_thread() argument 449 dump_signal_info(log, thread_info, unwinder->GetProcessMemory().get()); in dump_thread() 450 dump_probable_cause(log, thread_info.siginfo, unwinder->GetMaps()); in dump_thread() 454 dump_abort_message(log, unwinder->GetProcessMemory().get(), abort_msg_address); in dump_thread() 461 unwinder->SetRegs(regs_copy.get()); in dump_thread() 462 unwinder->Unwind(); in dump_thread() 463 if (unwinder->NumFrames() == 0) { in dump_thread() [all …]
|
D | utility.cpp | 427 void log_backtrace(log_t* log, unwindstack::Unwinder* unwinder, const char* prefix) { argument 428 if (unwinder->elf_from_memory_not_file()) { 440 unwinder->SetDisplayBuildID(true); 441 for (size_t i = 0; i < unwinder->NumFrames(); i++) { 442 _LOG(log, logtype::BACKTRACE, "%s%s\n", prefix, unwinder->FormatFrame(i).c_str());
|
/system/core/libunwindstack/tools/ |
D | unwind.cpp | 92 unwindstack::UnwinderFromPid unwinder(1024, pid); in DoUnwind() local 93 if (!unwinder.Init(regs->Arch())) { in DoUnwind() 98 unwinder.SetRegs(regs); in DoUnwind() 99 unwinder.Unwind(); in DoUnwind() 102 for (size_t i = 0; i < unwinder.NumFrames(); i++) { in DoUnwind() 103 printf("%s\n", unwinder.FormatFrame(i).c_str()); in DoUnwind()
|
D | unwind_for_offline.cpp | 250 unwindstack::UnwinderFromPid unwinder(1024, pid); in SaveData() local 251 if (!unwinder.Init(regs->Arch())) { in SaveData() 255 unwinder.SetRegs(regs); in SaveData() 257 unwinder.Unwind(); in SaveData() 261 unwindstack::Maps* maps = unwinder.GetMaps(); in SaveData() 269 for (const auto& frame : unwinder.frames()) { in SaveData() 281 SaveMapInformation(unwinder.GetProcessMemory(), info, &file_copied); in SaveData() 291 SaveMapInformation(unwinder.GetProcessMemory(), info, &file_copied); in SaveData() 296 for (size_t i = 0; i < unwinder.NumFrames(); i++) { in SaveData() 297 printf("%s\n", unwinder.FormatFrame(i).c_str()); in SaveData()
|
/system/core/libbacktrace/ |
D | UnwindStack.cpp | 49 unwindstack::Unwinder unwinder(MAX_BACKTRACE_FRAMES + num_ignore_frames, stack_map->stack_maps(), in Unwind() local 51 unwinder.SetResolveNames(stack_map->ResolveNames()); in Unwind() 54 unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch()); in Unwind() 58 unwinder.SetDexFiles(stack_map->GetDexFiles(), regs->Arch()); in Unwind() 61 unwinder.Unwind(skip_names, &stack_map->GetSuffixesToIgnore()); in Unwind() 63 switch (unwinder.LastErrorCode()) { in Unwind() 70 error->error_info.addr = unwinder.LastErrorAddress(); in Unwind() 99 if (num_ignore_frames >= unwinder.NumFrames()) { in Unwind() 104 auto unwinder_frames = unwinder.frames(); in Unwind() 105 frames->resize(unwinder.NumFrames() - num_ignore_frames); in Unwind() [all …]
|
/system/core/debuggerd/libdebuggerd/include/libdebuggerd/ |
D | backtrace.h | 38 void dump_backtrace(android::base::unique_fd output_fd, unwindstack::Unwinder* unwinder, 42 void dump_backtrace_thread(int output_fd, unwindstack::Unwinder* unwinder,
|
D | tombstone.h | 47 void engrave_tombstone(int tombstone_fd, unwindstack::Unwinder* unwinder, 55 void engrave_tombstone(android::base::unique_fd output_fd, unwindstack::Unwinder* unwinder,
|
D | utility.h | 80 void log_backtrace(log_t* log, unwindstack::Unwinder* unwinder, const char* prefix);
|
/system/extras/simpleperf/ |
D | OfflineUnwinder.cpp | 213 unwindstack::Unwinder unwinder(MAX_UNWINDING_FRAMES, &cached_map, unwind_regs.get(), in UnwindCallChain() local 215 unwinder.SetResolveNames(false); in UnwindCallChain() 216 unwinder.Unwind(); in UnwindCallChain() 218 for (auto& frame : unwinder.frames()) { in UnwindCallChain() 257 switch (unwinder.LastErrorCode()) { in UnwindCallChain() 262 uint64_t addr = unwinder.LastErrorAddress(); in UnwindCallChain()
|
/system/core/libunwindstack/benchmarks/ |
D | unwind_benchmarks.cpp | 35 unwindstack::Unwinder unwinder(32, maps, regs.get(), process_memory); in Call6() local 36 unwinder.Unwind(); in Call6() 37 return unwinder.NumFrames(); in Call6()
|
/system/core/debuggerd/handler/ |
D | debuggerd_fallback.cpp | 88 unwindstack::UnwinderFromPid unwinder(kMaxFrames, getpid()); in debuggerd_fallback_trace() local 89 if (unwinder.Init(arch)) { in debuggerd_fallback_trace() 90 dump_backtrace_thread(output_fd, &unwinder, thread); in debuggerd_fallback_trace()
|
/system/core/debuggerd/ |
D | crash_dump.cpp | 576 unwindstack::UnwinderFromPid unwinder(256, vm_pid); in main() local 577 if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { in main() 584 dump_backtrace(std::move(g_output_fd), &unwinder, thread_info, g_target_thread); in main() 588 populate_fdsan_table(&open_files, unwinder.GetProcessMemory(), fdsan_table_address); in main() 593 engrave_tombstone(std::move(g_output_fd), &unwinder, thread_info, g_target_thread, in main()
|
/system/extras/simpleperf/doc/ |
D | README.md | 90 d. It uses the standard Android stack unwinder, so its results are consistent with all other
|