Home
last modified time | relevance | path

Searched refs:backtrace (Results 1 – 22 of 22) sorted by relevance

/system/core/libbacktrace/
Dbacktrace_test.cpp76 Backtrace* backtrace; member
94 std::string DumpFrames(Backtrace* backtrace) { in DumpFrames() argument
95 if (backtrace->NumFrames() == 0) { in DumpFrames()
100 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in DumpFrames()
101 frame += " " + backtrace->FormatFrameData(i) + '\n'; in DumpFrames()
119 bool ReadyLevelBacktrace(Backtrace* backtrace) { in ReadyLevelBacktrace() argument
122 for (Backtrace::const_iterator it = backtrace->begin(); it != backtrace->end(); ++it) { in ReadyLevelBacktrace()
132 void VerifyLevelDump(Backtrace* backtrace) { in VerifyLevelDump() argument
133 ASSERT_GT(backtrace->NumFrames(), static_cast<size_t>(0)) in VerifyLevelDump()
134 << DumpFrames(backtrace); in VerifyLevelDump()
[all …]
Dbacktrace_offline_test.cpp109 std::unique_ptr<Backtrace> backtrace( in OfflineBacktraceFunctionCall() local
111 ASSERT_TRUE(backtrace != nullptr); in OfflineBacktraceFunctionCall()
114 ASSERT_TRUE(backtrace->Unwind(0, &ucontext)); in OfflineBacktraceFunctionCall()
117 for (size_t i = 0; i < backtrace->NumFrames(); ++i) { in OfflineBacktraceFunctionCall()
118 pc_values->push_back(backtrace->GetFrame(i)->pc); in OfflineBacktraceFunctionCall()
DBacktraceOffline.cpp70 BacktraceOffline* backtrace = reinterpret_cast<BacktraceOffline*>(arg); in FindProcInfo() local
71 bool result = backtrace->FindProcInfo(addr_space, ip, proc_info, need_unwind_info); in FindProcInfo()
86 BacktraceOffline* backtrace = reinterpret_cast<BacktraceOffline*>(arg); in AccessMem() local
88 size_t read_size = backtrace->Read(addr, reinterpret_cast<uint8_t*>(value), sizeof(unw_word_t)); in AccessMem()
100 BacktraceOffline* backtrace = reinterpret_cast<BacktraceOffline*>(arg); in AccessReg() local
102 bool result = backtrace->ReadReg(unwind_reg, &reg_value); in AccessReg()
/system/core/debuggerd/x86/
Dmachine.cpp30 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/x86_64/
Dmachine.cpp31 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/
Delf_utils.cpp36 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()
Dbacktrace.cpp91 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, tid, map)); in dump_thread() local
92 if (backtrace->Unwind(0)) { in dump_thread()
93 dump_backtrace_to_log(backtrace.get(), log, " "); in dump_thread()
96 backtrace->GetErrorString(backtrace->GetError()).c_str()); in dump_thread()
116 void dump_backtrace_to_log(Backtrace* backtrace, log_t* log, const char* prefix) { in dump_backtrace_to_log() argument
117 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in dump_backtrace_to_log()
118 _LOG(log, logtype::BACKTRACE, "%s%s\n", prefix, backtrace->FormatFrameData(i).c_str()); in dump_backtrace_to_log()
Dtombstone.cpp239 Backtrace* backtrace, log_t* log, uintptr_t* sp, size_t words, int label) { in dump_stack_segment() argument
242 …size_t bytes_read = backtrace->Read(*sp, reinterpret_cast<uint8_t*>(&stack_data[0]), sizeof(word_t… in dump_stack_segment()
256 backtrace->FillInMap(stack_data[i], &map); in dump_stack_segment()
260 std::string func_name(backtrace->GetFunctionName(stack_data[i], &offset)); in dump_stack_segment()
275 static void dump_stack(Backtrace* backtrace, log_t* log) { in dump_stack() argument
277 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in dump_stack()
278 const backtrace_frame_data_t* frame = backtrace->GetFrame(i); in dump_stack()
292 word_t sp = backtrace->GetFrame(first)->sp - STACK_WORDS * sizeof(word_t); in dump_stack()
293 dump_stack_segment(backtrace, log, &sp, STACK_WORDS, -1); in dump_stack()
298 const backtrace_frame_data_t* frame = backtrace->GetFrame(i); in dump_stack()
[all …]
Dutility.cpp108 void dump_memory(log_t* log, Backtrace* backtrace, uintptr_t addr, const char* fmt, ...) { argument
136 size_t bytes = backtrace->Read(addr, reinterpret_cast<uint8_t*>(data), sizeof(data));
163 size_t bytes2 = backtrace->Read(addr + start + bytes, reinterpret_cast<uint8_t*>(data) + bytes,
Dmachine.h26 void dump_memory_and_code(log_t* log, Backtrace* backtrace);
Dbacktrace.h36 void dump_backtrace_to_log(Backtrace* backtrace, log_t* log, const char* prefix);
Dutility.h82 void dump_memory(log_t* log, Backtrace* backtrace, uintptr_t addr, const char* fmt, ...);
DAndroid.mk14 backtrace.cpp \
/system/core/debuggerd/arm/
Dmachine.cpp31 void dump_memory_and_code(log_t* log, Backtrace* backtrace) { in dump_memory_and_code() argument
33 if (ptrace(PTRACE_GETREGS, backtrace->Tid(), 0, &regs)) { in dump_memory_and_code()
41 dump_memory(log, backtrace, regs.uregs[reg], "memory near %.2s:", &reg_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/libutils/
DCallStack.cpp44 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, tid)); in update() local
45 if (!backtrace->Unwind(ignoreDepth)) { in update()
48 for (size_t i = 0; i < backtrace->NumFrames(); i++) { in update()
49 mFrameLines.push_back(String8(backtrace->FormatFrameData(i).c_str())); in update()
/system/core/debuggerd/arm64/
Dmachine.cpp33 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/mips/
Dmachine.cpp35 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:", &reg_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/mips64/
Dmachine.cpp35 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:", &reg_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/extras/simpleperf/
Ddwarf_unwind.cpp127 std::unique_ptr<Backtrace> backtrace( in UnwindCallChain() local
130 if (backtrace->Unwind(0, &ucontext)) { in UnwindCallChain()
131 for (auto it = backtrace->begin(); it != backtrace->end(); ++it) { in UnwindCallChain()
/system/core/libmemunreachable/
DMemUnreachable.cpp162 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()
DREADME.md71 …- `malloc_backtrace()`: return the backtrace from when the allocation at the given address was all…
/system/core/libmemunreachable/include/memunreachable/
Dmemunreachable.h49 } backtrace; member