/system/core/libbacktrace/ |
D | backtrace_test.cpp | 80 Backtrace* backtrace; member 91 static std::string DumpFrames(Backtrace* backtrace) { in DumpFrames() argument 92 if (backtrace->NumFrames() == 0) { in DumpFrames() 97 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in DumpFrames() 98 frame += " " + backtrace->FormatFrameData(i) + '\n'; in DumpFrames() 137 static bool ReadyLevelBacktrace(Backtrace* backtrace) { in ReadyLevelBacktrace() argument 140 for (Backtrace::const_iterator it = backtrace->begin(); it != backtrace->end(); ++it) { in ReadyLevelBacktrace() 150 static void VerifyLevelDump(Backtrace* backtrace) { in VerifyLevelDump() argument 151 ASSERT_GT(backtrace->NumFrames(), static_cast<size_t>(0)) in VerifyLevelDump() 152 << DumpFrames(backtrace); in VerifyLevelDump() [all …]
|
D | backtrace_offline_test.cpp | 311 std::unique_ptr<Backtrace> backtrace( in BacktraceOfflineTest() local 313 ASSERT_TRUE(backtrace != nullptr); in BacktraceOfflineTest() 316 ASSERT_TRUE(backtrace->Unwind(0, &ucontext)); in BacktraceOfflineTest() 320 for (size_t i = 0; i < backtrace->NumFrames(); ++i) { in BacktraceOfflineTest() 321 pc_values.push_back(backtrace->GetFrame(i)->pc); in BacktraceOfflineTest() 385 std::unique_ptr<Backtrace> backtrace( in TEST() local 387 ASSERT_TRUE(backtrace != nullptr); in TEST() 390 ASSERT_TRUE(backtrace->Unwind(0, &ucontext)); in TEST() 393 ASSERT_EQ(testdata.symbols.size() + 1, backtrace->NumFrames()); in TEST() 394 for (size_t i = 0; i + 1 < backtrace->NumFrames(); ++i) { in TEST() [all …]
|
D | BacktraceOffline.cpp | 112 BacktraceOffline* backtrace = reinterpret_cast<BacktraceOffline*>(arg); in FindProcInfo() local 113 bool result = backtrace->FindProcInfo(addr_space, ip, proc_info, need_unwind_info); in FindProcInfo() 128 BacktraceOffline* backtrace = reinterpret_cast<BacktraceOffline*>(arg); in AccessMem() local 130 size_t read_size = backtrace->Read(addr, reinterpret_cast<uint8_t*>(value), sizeof(unw_word_t)); in AccessMem() 142 BacktraceOffline* backtrace = reinterpret_cast<BacktraceOffline*>(arg); in AccessReg() local 144 bool result = backtrace->ReadReg(unwind_reg, ®_value); in AccessReg()
|
/system/core/debuggerd/libdebuggerd/x86/ |
D | machine.cpp | 30 void dump_memory_and_code(log_t* log, Backtrace* backtrace) { in dump_memory_and_code() argument 32 if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, &r) == -1) { in dump_memory_and_code() 37 dump_memory(log, backtrace, static_cast<uintptr_t>(r.eax), "memory near eax:"); in dump_memory_and_code() 38 dump_memory(log, backtrace, static_cast<uintptr_t>(r.ebx), "memory near ebx:"); in dump_memory_and_code() 39 dump_memory(log, backtrace, static_cast<uintptr_t>(r.ecx), "memory near ecx:"); in dump_memory_and_code() 40 dump_memory(log, backtrace, static_cast<uintptr_t>(r.edx), "memory near edx:"); in dump_memory_and_code() 41 dump_memory(log, backtrace, static_cast<uintptr_t>(r.esi), "memory near esi:"); in dump_memory_and_code() 42 dump_memory(log, backtrace, static_cast<uintptr_t>(r.edi), "memory near edi:"); in dump_memory_and_code() 44 dump_memory(log, backtrace, static_cast<uintptr_t>(r.eip), "code around eip:"); in dump_memory_and_code()
|
/system/core/debuggerd/libdebuggerd/x86_64/ |
D | machine.cpp | 31 void dump_memory_and_code(log_t* log, Backtrace* backtrace) { in dump_memory_and_code() argument 33 if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, &r) == -1) { in dump_memory_and_code() 38 dump_memory(log, backtrace, static_cast<uintptr_t>(r.rax), "memory near rax:"); in dump_memory_and_code() 39 dump_memory(log, backtrace, static_cast<uintptr_t>(r.rbx), "memory near rbx:"); in dump_memory_and_code() 40 dump_memory(log, backtrace, static_cast<uintptr_t>(r.rcx), "memory near rcx:"); in dump_memory_and_code() 41 dump_memory(log, backtrace, static_cast<uintptr_t>(r.rdx), "memory near rdx:"); in dump_memory_and_code() 42 dump_memory(log, backtrace, static_cast<uintptr_t>(r.rsi), "memory near rsi:"); in dump_memory_and_code() 43 dump_memory(log, backtrace, static_cast<uintptr_t>(r.rdi), "memory near rdi:"); in dump_memory_and_code() 45 dump_memory(log, backtrace, static_cast<uintptr_t>(r.rip), "code around rip:"); in dump_memory_and_code()
|
/system/core/debuggerd/libdebuggerd/ |
D | backtrace.cpp | 67 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, tid, map)); in dump_thread() local 68 if (backtrace->Unwind(0)) { in dump_thread() 69 dump_backtrace_to_log(backtrace.get(), log, " "); in dump_thread() 72 backtrace->GetErrorString(backtrace->GetError()).c_str()); in dump_thread() 108 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, tid)); in dump_backtrace_ucontext() local 109 if (backtrace->Unwind(0, ucontext)) { in dump_backtrace_ucontext() 110 dump_backtrace_to_log(backtrace.get(), &log, " "); in dump_backtrace_ucontext() 113 backtrace->GetErrorString(backtrace->GetError()).c_str()); in dump_backtrace_ucontext() 135 void dump_backtrace_to_log(Backtrace* backtrace, log_t* log, const char* prefix) { in dump_backtrace_to_log() argument 136 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in dump_backtrace_to_log() [all …]
|
D | elf_utils.cpp | 36 Backtrace* backtrace, uintptr_t base_addr, uint8_t* e_ident, std::string* build_id) { in get_build_id() argument 42 if (backtrace->Read(base_addr + EI_NIDENT, reinterpret_cast<uint8_t*>(&hdr) + EI_NIDENT, in get_build_id() 49 if (backtrace->Read(base_addr + hdr.e_phoff + i * hdr.e_phentsize, in get_build_id() 59 … if (backtrace->Read(addr, reinterpret_cast<uint8_t*>(&nhdr), sizeof(nhdr)) != sizeof(nhdr)) { in get_build_id() 72 if (backtrace->Read(addr, build_id_data, nhdr.n_descsz) != nhdr.n_descsz) { in get_build_id() 98 bool elf_get_build_id(Backtrace* backtrace, uintptr_t addr, std::string* build_id) { in elf_get_build_id() argument 101 if (backtrace->Read(addr, e_ident, SELFMAG) != SELFMAG) { in elf_get_build_id() 110 …if (backtrace->Read(addr + SELFMAG, e_ident + SELFMAG, EI_NIDENT - SELFMAG) != EI_NIDENT - SELFMAG… in elf_get_build_id() 115 return get_build_id<Elf32_Ehdr, Elf32_Phdr, Elf32_Nhdr>(backtrace, addr, e_ident, build_id); in elf_get_build_id() 117 return get_build_id<Elf64_Ehdr, Elf64_Phdr, Elf64_Nhdr>(backtrace, addr, e_ident, build_id); in elf_get_build_id()
|
D | tombstone.cpp | 265 Backtrace* backtrace, log_t* log, uintptr_t* sp, size_t words, int label) { in dump_stack_segment() argument 268 …size_t bytes_read = backtrace->Read(*sp, reinterpret_cast<uint8_t*>(&stack_data[0]), sizeof(word_t… in dump_stack_segment() 282 backtrace->FillInMap(stack_data[i], &map); in dump_stack_segment() 286 std::string func_name(backtrace->GetFunctionName(stack_data[i], &offset, &map)); in dump_stack_segment() 301 static void dump_stack(Backtrace* backtrace, log_t* log) { in dump_stack() argument 303 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in dump_stack() 304 const backtrace_frame_data_t* frame = backtrace->GetFrame(i); in dump_stack() 318 word_t sp = backtrace->GetFrame(first)->sp - STACK_WORDS * sizeof(word_t); in dump_stack() 319 dump_stack_segment(backtrace, log, &sp, STACK_WORDS, -1); in dump_stack() 324 const backtrace_frame_data_t* frame = backtrace->GetFrame(i); in dump_stack() [all …]
|
D | utility.cpp | 103 void dump_memory(log_t* log, Backtrace* backtrace, uintptr_t addr, const char* fmt, ...) { argument 131 size_t bytes = backtrace->Read(addr, reinterpret_cast<uint8_t*>(data), sizeof(data)); 158 size_t bytes2 = backtrace->Read(addr + start + bytes, reinterpret_cast<uint8_t*>(data) + bytes,
|
/system/core/libutils/ |
D | CallStack.cpp | 45 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, tid)); in update() local 46 if (!backtrace->Unwind(ignoreDepth)) { in update() 49 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in update() 50 mFrameLines.push_back(String8(backtrace->FormatFrameData(i).c_str())); in update()
|
/system/core/debuggerd/libdebuggerd/arm/ |
D | machine.cpp | 31 void dump_memory_and_code(log_t* log, Backtrace* backtrace) { in dump_memory_and_code() argument 33 if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, ®s)) { in dump_memory_and_code() 41 dump_memory(log, backtrace, regs.uregs[reg], "memory near %.2s:", ®_names[reg * 2]); in dump_memory_and_code() 44 dump_memory(log, backtrace, static_cast<uintptr_t>(regs.ARM_pc), "code around pc:"); in dump_memory_and_code() 47 dump_memory(log, backtrace, static_cast<uintptr_t>(regs.ARM_lr), "code around lr:"); in dump_memory_and_code()
|
/system/core/debuggerd/libdebuggerd/arm64/ |
D | machine.cpp | 33 void dump_memory_and_code(log_t* log, Backtrace* backtrace) { in dump_memory_and_code() argument 39 if (ptrace(PTRACE_GETREGSET, backtrace->Tid(), reinterpret_cast<void*>(NT_PRSTATUS), &io) == -1) { in dump_memory_and_code() 45 dump_memory(log, backtrace, regs.regs[reg], "memory near x%d:", reg); in dump_memory_and_code() 48 dump_memory(log, backtrace, static_cast<uintptr_t>(regs.pc), "code around pc:"); in dump_memory_and_code() 51 dump_memory(log, backtrace, static_cast<uintptr_t>(regs.sp), "code around sp:"); in dump_memory_and_code()
|
/system/core/debuggerd/libdebuggerd/mips64/ |
D | machine.cpp | 35 void dump_memory_and_code(log_t* log, Backtrace* backtrace) { in dump_memory_and_code() argument 37 if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, &r)) { in dump_memory_and_code() 53 dump_memory(log, backtrace, R(r.regs[reg]), "memory near %.2s:", ®_names[reg * 2]); in dump_memory_and_code() 58 dump_memory(log, backtrace, pc, "code around pc:"); in dump_memory_and_code() 60 dump_memory(log, backtrace, ra, "code around ra:"); in dump_memory_and_code()
|
/system/core/debuggerd/libdebuggerd/mips/ |
D | machine.cpp | 35 void dump_memory_and_code(log_t* log, Backtrace* backtrace) { in dump_memory_and_code() argument 37 if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, &r)) { in dump_memory_and_code() 53 dump_memory(log, backtrace, R(r.regs[reg]), "memory near %.2s:", ®_names[reg * 2]); in dump_memory_and_code() 58 dump_memory(log, backtrace, pc, "code around pc:"); in dump_memory_and_code() 60 dump_memory(log, backtrace, ra, "code around ra:"); in dump_memory_and_code()
|
/system/core/debuggerd/client/ |
D | debuggerd_client.cpp | 44 static bool send_signal(pid_t pid, bool backtrace) { in send_signal() argument 46 val.sival_int = backtrace; in send_signal() 158 bool backtrace = dump_type == kDebuggerdBacktrace; in debuggerd_trigger_dump() local 159 send_signal(pid, backtrace); in debuggerd_trigger_dump()
|
/system/extras/simpleperf/ |
D | dwarf_unwind.cpp | 132 std::unique_ptr<Backtrace> backtrace( in UnwindCallChain() local 135 if (backtrace->Unwind(0, &ucontext)) { in UnwindCallChain() 136 for (auto it = backtrace->begin(); it != backtrace->end(); ++it) { in UnwindCallChain()
|
/system/core/debuggerd/libdebuggerd/include/ |
D | machine.h | 26 void dump_memory_and_code(log_t* log, Backtrace* backtrace);
|
D | backtrace.h | 37 void dump_backtrace_to_log(Backtrace* backtrace, log_t* log, const char* prefix);
|
D | utility.h | 84 void dump_memory(log_t* log, Backtrace* backtrace, uintptr_t addr, const char* fmt, ...);
|
/system/core/libmemunreachable/ |
D | MemUnreachable.cpp | 162 leak->backtrace.frames, leak->backtrace.max_frames); in GetUnreachableMemory() 164 leak->backtrace.num_frames = num_backtrace_frames; in GetUnreachableMemory() 166 auto inserted = backtrace_map.emplace(leak->backtrace, leak); in GetUnreachableMemory() 464 if (backtrace.num_frames > 0) { in ToString() 465 oss << backtrace_string(backtrace.frames, backtrace.num_frames); in ToString()
|
D | README.md | 71 …- `malloc_backtrace()`: return the backtrace from when the allocation at the given address was all…
|
/system/core/libmemunreachable/include/memunreachable/ |
D | memunreachable.h | 49 } backtrace; member
|
/system/core/debuggerd/ |
D | crash_dump.cpp | 357 bool backtrace = false; in main() local 365 backtrace = true; in main() 373 if (backtrace) { in main()
|
D | Android.bp | 105 "libdebuggerd/backtrace.cpp",
|
D | debuggerd_test.cpp | 424 TEST_F(CrasherTest, backtrace) { in TEST_F() argument
|