/system/core/libunwindstack/tests/ |
D | UnwindOfflineTest.cpp | 201 static std::string DumpFrames(Unwinder& unwinder) { in DumpFrames() argument 203 for (size_t i = 0; i < unwinder.NumFrames(); i++) { in DumpFrames() 204 str += unwinder.FormatFrame(i) + "\n"; in DumpFrames() 213 Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); in TEST_F() local 214 unwinder.Unwind(); in TEST_F() 216 std::string frame_info(DumpFrames(unwinder)); in TEST_F() 217 ASSERT_EQ(4U, unwinder.NumFrames()) << "Unwind:\n" << frame_info; in TEST_F() 224 EXPECT_EQ(0xf31ea9f8U, unwinder.frames()[0].pc); in TEST_F() 225 EXPECT_EQ(0xe9c866f8U, unwinder.frames()[0].sp); in TEST_F() 226 EXPECT_EQ(0xf2da0a1bU, unwinder.frames()[1].pc); in TEST_F() [all …]
|
D | UnwinderTest.cpp | 168 Unwinder unwinder(64, maps_.get(), ®s_, process_memory_); in TEST_F() local 169 unwinder.Unwind(); in TEST_F() 170 EXPECT_EQ(ERROR_NONE, unwinder.LastErrorCode()); in TEST_F() 171 EXPECT_FALSE(unwinder.elf_from_memory_not_file()); in TEST_F() 173 ASSERT_EQ(3U, unwinder.NumFrames()); in TEST_F() 175 auto* frame = &unwinder.frames()[0]; in TEST_F() 190 frame = &unwinder.frames()[1]; in TEST_F() 205 frame = &unwinder.frames()[2]; in TEST_F() 232 Unwinder unwinder(64, maps_.get(), ®s_, process_memory_); in TEST_F() local 233 unwinder.SetResolveNames(false); in TEST_F() [all …]
|
D | VerifyBionicTerminationTest.cpp | 40 static std::string DumpFrames(const UnwinderFromPid& unwinder) { in DumpFrames() argument 42 for (size_t i = 0; i < unwinder.NumFrames(); i++) { in DumpFrames() 43 unwind += unwinder.FormatFrame(i) + '\n'; in DumpFrames() 96 UnwinderFromPid unwinder(512, getpid()); in TEST() local 97 ASSERT_TRUE(unwinder.Init(regs->Arch())); in TEST() 98 unwinder.SetRegs(regs.get()); in TEST() 101 unwinder.Unwind(); in TEST() 102 ASSERT_LT(0U, unwinder.NumFrames()); in TEST() 104 SCOPED_TRACE(DumpFrames(unwinder)); in TEST() 109 const std::vector<FrameData>& frames = unwinder.frames(); in TEST() [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/libunwindstack/tests/fuzz/ |
D | UnwinderFuzz.cpp | 35 void PerformUnwind(FuzzedDataProvider* data_provider, Unwinder* unwinder) { in PerformUnwind() argument 42 unwinder->Unwind(); in PerformUnwind() 48 unwinder->Unwind(&skip_names, nullptr); in PerformUnwind() 54 unwinder->Unwind(nullptr, &ignore_suffixes); in PerformUnwind() 62 unwinder->Unwind(&skip_names, &ignore_suffixes); in PerformUnwind() 87 Unwinder unwinder(max_frames, maps.get(), regs.get(), memory); in LLVMFuzzerTestOneInput() local 88 unwinder.SetJitDebug(jit_debug_ptr.get(), arch); in LLVMFuzzerTestOneInput() 89 unwinder.SetResolveNames(data_provider.ConsumeBool()); in LLVMFuzzerTestOneInput() 91 PerformUnwind(&data_provider, &unwinder); in LLVMFuzzerTestOneInput() 95 unwinder.BuildFrameFromPcOnly(pc); in LLVMFuzzerTestOneInput() [all …]
|
/system/core/debuggerd/libdebuggerd/ |
D | backtrace.cpp | 57 void dump_backtrace_thread(int output_fd, unwindstack::Unwinder* unwinder, in dump_backtrace_thread() argument 65 unwinder->SetRegs(thread.registers.get()); in dump_backtrace_thread() 66 unwinder->Unwind(); in dump_backtrace_thread() 67 if (unwinder->NumFrames() == 0) { in dump_backtrace_thread() 72 log_backtrace(&log, unwinder, " "); in dump_backtrace_thread() 75 void dump_backtrace(android::base::unique_fd output_fd, unwindstack::Unwinder* unwinder, in dump_backtrace() argument 89 dump_backtrace_thread(output_fd.get(), unwinder, target->second); in dump_backtrace() 92 dump_backtrace_thread(output_fd.get(), unwinder, info); in dump_backtrace()
|
D | scudo.cpp | 79 void ScudoCrashData::DumpCause(log_t* log, unwindstack::Unwinder* unwinder) const { in DumpCause() 89 DumpReport(&error_info_.reports[report_num++], log, unwinder); in DumpCause() 94 unwindstack::Unwinder* unwinder) const { in DumpReport() 140 unwinder->SetDisplayBuildID(true); in DumpReport() 143 unwinder->BuildFrameFromPcOnly(report->allocation_trace[i]); in DumpReport() 145 _LOG(log, logtype::BACKTRACE, " %s\n", unwinder->FormatFrame(frame_data).c_str()); in DumpReport() 151 unwinder->SetDisplayBuildID(true); in DumpReport() 154 unwinder->BuildFrameFromPcOnly(report->deallocation_trace[i]); in DumpReport() 156 _LOG(log, logtype::BACKTRACE, " %s\n", unwinder->FormatFrame(frame_data).c_str()); in DumpReport()
|
D | tombstone.cpp | 230 static void dump_all_maps(log_t* log, unwindstack::Unwinder* unwinder, uint64_t addr) { in dump_all_maps() argument 233 unwindstack::Maps* maps = unwinder->GetMaps(); in dump_all_maps() 250 std::shared_ptr<unwindstack::Memory>& process_memory = unwinder->GetProcessMemory(); in dump_all_maps() 372 static bool dump_thread(log_t* log, unwindstack::Unwinder* unwinder, const ThreadInfo& thread_info, in dump_thread() argument 381 dump_signal_info(log, thread_info, process_info, unwinder->GetProcessMemory().get()); in dump_thread() 387 gwp_asan_crash_data = std::make_unique<GwpAsanCrashData>(unwinder->GetProcessMemory().get(), in dump_thread() 390 std::make_unique<ScudoCrashData>(unwinder->GetProcessMemory().get(), process_info); in dump_thread() 396 dump_probable_cause(log, thread_info.siginfo, unwinder->GetMaps(), in dump_thread() 401 dump_abort_message(log, unwinder->GetProcessMemory().get(), process_info.abort_msg_address); in dump_thread() 408 unwinder->SetRegs(regs_copy.get()); in dump_thread() [all …]
|
D | gwp_asan.cpp | 170 void GwpAsanCrashData::DumpDeallocationTrace(log_t* log, unwindstack::Unwinder* unwinder) const { in DumpDeallocationTrace() 184 unwinder->SetDisplayBuildID(true); in DumpDeallocationTrace() 186 unwindstack::FrameData frame_data = unwinder->BuildFrameFromPcOnly(frames.get()[i]); in DumpDeallocationTrace() 188 _LOG(log, logtype::BACKTRACE, " %s\n", unwinder->FormatFrame(frame_data).c_str()); in DumpDeallocationTrace() 197 void GwpAsanCrashData::DumpAllocationTrace(log_t* log, unwindstack::Unwinder* unwinder) const { in DumpAllocationTrace() 211 unwinder->SetDisplayBuildID(true); in DumpAllocationTrace() 213 unwindstack::FrameData frame_data = unwinder->BuildFrameFromPcOnly(frames.get()[i]); in DumpAllocationTrace() 215 _LOG(log, logtype::BACKTRACE, " %s\n", unwinder->FormatFrame(frame_data).c_str()); in DumpAllocationTrace()
|
D | utility.cpp | 437 void log_backtrace(log_t* log, unwindstack::Unwinder* unwinder, const char* prefix) { in log_backtrace() argument 438 if (unwinder->elf_from_memory_not_file()) { in log_backtrace() 450 unwinder->SetDisplayBuildID(true); in log_backtrace() 451 for (size_t i = 0; i < unwinder->NumFrames(); i++) { in log_backtrace() 452 _LOG(log, logtype::BACKTRACE, "%s%s\n", prefix, unwinder->FormatFrame(i).c_str()); in log_backtrace()
|
/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() 284 SaveMapInformation(unwinder.GetProcessMemory(), info, &file_copied); in SaveData() 294 SaveMapInformation(unwinder.GetProcessMemory(), info, &file_copied); in SaveData() 299 for (size_t i = 0; i < unwinder.NumFrames(); i++) { in SaveData() 300 printf("%s\n", unwinder.FormatFrame(i).c_str()); in SaveData()
|
/system/core/libbacktrace/ |
D | UnwindStack.cpp | 50 unwindstack::Unwinder unwinder(MAX_BACKTRACE_FRAMES + num_ignore_frames, stack_map->stack_maps(), in Unwind() local 52 unwinder.SetResolveNames(stack_map->ResolveNames()); in Unwind() 55 unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch()); in Unwind() 59 unwinder.SetDexFiles(stack_map->GetDexFiles(), regs->Arch()); in Unwind() 62 unwinder.Unwind(skip_names, &stack_map->GetSuffixesToIgnore()); in Unwind() 64 switch (unwinder.LastErrorCode()) { in Unwind() 71 error->error_info.addr = unwinder.LastErrorAddress(); in Unwind() 100 if (num_ignore_frames >= unwinder.NumFrames()) { in Unwind() 105 auto unwinder_frames = unwinder.frames(); in Unwind() 106 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 | scudo.h | 34 void DumpCause(log_t* log, unwindstack::Unwinder* unwinder) const; 41 unwindstack::Unwinder* unwinder) const;
|
D | gwp_asan.h | 62 void DumpDeallocationTrace(log_t* log, unwindstack::Unwinder* unwinder) const; 70 void DumpAllocationTrace(log_t* log, unwindstack::Unwinder* unwinder) const;
|
D | tombstone.h | 47 void engrave_tombstone(android::base::unique_fd output_fd, unwindstack::Unwinder* unwinder,
|
D | utility.h | 82 void log_backtrace(log_t* log, unwindstack::Unwinder* unwinder, const char* prefix);
|
/system/core/libunwindstack/benchmarks/ |
D | unwind_benchmarks.cpp | 34 unwindstack::Unwinder unwinder(32, maps, regs.get(), process_memory); in Call6() local 35 unwinder.Unwind(); in Call6() 36 return unwinder.NumFrames(); in Call6()
|
/system/extras/simpleperf/ |
D | OfflineUnwinder_test.cpp | 106 std::unique_ptr<OfflineUnwinderImpl> unwinder(new OfflineUnwinderImpl(false)); in TEST() local 107 unwinder->LoadMetaInfo(info_map); in TEST() 111 unwindstack::Regs* regs = unwinder->GetBacktraceRegs(fake_regs); in TEST()
|
D | OfflineUnwinder.cpp | 247 unwindstack::Unwinder unwinder( in UnwindCallChain() local 251 unwinder.SetResolveNames(false); in UnwindCallChain() 252 unwinder.Unwind(); in UnwindCallChain() 254 for (auto& frame : unwinder.frames()) { in UnwindCallChain() 293 switch (unwinder.LastErrorCode()) { in UnwindCallChain() 298 uint64_t addr = unwinder.LastErrorAddress(); in UnwindCallChain()
|
/system/core/debuggerd/handler/ |
D | debuggerd_fallback.cpp | 89 unwindstack::UnwinderFromPid unwinder(kMaxFrames, getpid()); in debuggerd_fallback_trace() local 90 if (unwinder.Init(arch)) { in debuggerd_fallback_trace() 91 dump_backtrace_thread(output_fd, &unwinder, thread); in debuggerd_fallback_trace()
|
/system/core/debuggerd/ |
D | crash_dump.cpp | 588 unwindstack::UnwinderFromPid unwinder(256, vm_pid); in main() local 589 if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { in main() 596 dump_backtrace(std::move(g_output_fd), &unwinder, thread_info, g_target_thread); in main() 600 populate_fdsan_table(&open_files, unwinder.GetProcessMemory(), in main() 606 … engrave_tombstone(std::move(g_output_fd), &unwinder, thread_info, g_target_thread, process_info, in main()
|