Home
last modified time | relevance | path

Searched refs:ucontext (Results 1 – 25 of 38) sorted by relevance

12

/system/core/libbacktrace/
Dbacktrace_testlib.cpp75 std::vector<uint8_t>* ucontext; member
85 ucontext_t ucontext; in GetContextAndExit() local
86 memset(&ucontext, 0, sizeof(ucontext)); in GetContextAndExit()
88 memcpy(&ucontext.uc_mcontext, regs->RawData(), sizeof(uint32_t) * 16); in GetContextAndExit()
90 memcpy(&ucontext.uc_mcontext, regs->RawData(), sizeof(uint64_t) * 33); in GetContextAndExit()
93 ucontext.uc_mcontext.gregs[0] = reg_data[15]; in GetContextAndExit()
94 ucontext.uc_mcontext.gregs[1] = reg_data[14]; in GetContextAndExit()
95 ucontext.uc_mcontext.gregs[2] = reg_data[13]; in GetContextAndExit()
96 ucontext.uc_mcontext.gregs[3] = reg_data[12]; in GetContextAndExit()
97 ucontext.uc_mcontext.gregs[4] = reg_data[7]; in GetContextAndExit()
[all …]
DBacktraceCurrent.h46 bool Unwind(size_t num_ignore_frames, void* ucontext) override;
54 virtual bool UnwindFromContext(size_t num_ignore_frames, void* ucontext) = 0;
DThreadEntry.cpp128 ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(sigcontext); in CopyUcontextFromSigcontext() local
130 memcpy(&ucontext_.uc_mcontext, &ucontext->uc_mcontext, sizeof(ucontext->uc_mcontext)); in CopyUcontextFromSigcontext()
Dbacktrace_offline_test.cpp88 std::vector<uint8_t> ucontext; member
96 BacktraceTest::test_get_context_and_wait_(&fn_arg->ucontext, &fn_arg->exit_flag); in OfflineThreadFunc()
149 testdata += android::base::StringPrintf("ucontext: %zu ", arg.ucontext.size()); in TEST_F()
150 testdata += RawDataToHexString(arg.ucontext.data(), arg.ucontext.size()); in TEST_F()
187 std::vector<uint8_t> ucontext; member
215 testdata->ucontext.clear(); in ReadOfflineTestData()
217 HexStringToRawData(&line[pos], &testdata->ucontext, size); in ReadOfflineTestData()
270 ASSERT_TRUE(backtrace->Unwind(0, testdata.ucontext.data())) << "Failed " << arch_str; in BacktraceOfflineTest()
355 ASSERT_TRUE(backtrace->Unwind(0, testdata.ucontext.data())); in LibUnwindingTest()
DUnwindStack.cpp155 bool UnwindStackCurrent::UnwindFromContext(size_t num_ignore_frames, void* ucontext) { in UnwindFromContext() argument
157 if (ucontext == nullptr) { in UnwindFromContext()
163 regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); in UnwindFromContext()
201 bool UnwindStackOffline::Unwind(size_t num_ignore_frames, void* ucontext) { in Unwind() argument
202 if (ucontext == nullptr) { in Unwind()
224 std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::CreateFromUcontext(arch, ucontext)); in Unwind()
Dbacktrace_test.cpp1513 static void SetUcontextSp(uint64_t sp, ucontext_t* ucontext) { in SetUcontextSp() argument
1515 ucontext->uc_mcontext.arm_sp = sp; in SetUcontextSp()
1517 ucontext->uc_mcontext.sp = sp; in SetUcontextSp()
1519 ucontext->uc_mcontext.gregs[REG_ESP] = sp; in SetUcontextSp()
1521 ucontext->uc_mcontext.gregs[REG_RSP] = sp; in SetUcontextSp()
1524 UNUSED(ucontext); in SetUcontextSp()
1529 static void SetUcontextPc(uint64_t pc, ucontext_t* ucontext) { in SetUcontextPc() argument
1531 ucontext->uc_mcontext.arm_pc = pc; in SetUcontextPc()
1533 ucontext->uc_mcontext.pc = pc; in SetUcontextPc()
1535 ucontext->uc_mcontext.gregs[REG_EIP] = pc; in SetUcontextPc()
[all …]
DBacktraceCurrent.cpp67 bool BacktraceCurrent::Unwind(size_t num_ignore_frames, void* ucontext) { in Unwind() argument
75 if (ucontext) { in Unwind()
76 return UnwindFromContext(num_ignore_frames, ucontext); in Unwind()
/system/core/libunwindstack/
DRegsX86_64.cpp118 void RegsX86_64::SetFromUcontext(x86_64_ucontext_t* ucontext) { in SetFromUcontext() argument
120 memcpy(&regs_[X86_64_REG_R8], &ucontext->uc_mcontext.r8, 8 * sizeof(uint64_t)); in SetFromUcontext()
123 regs_[X86_64_REG_RDI] = ucontext->uc_mcontext.rdi; in SetFromUcontext()
124 regs_[X86_64_REG_RSI] = ucontext->uc_mcontext.rsi; in SetFromUcontext()
125 regs_[X86_64_REG_RBP] = ucontext->uc_mcontext.rbp; in SetFromUcontext()
126 regs_[X86_64_REG_RBX] = ucontext->uc_mcontext.rbx; in SetFromUcontext()
127 regs_[X86_64_REG_RDX] = ucontext->uc_mcontext.rdx; in SetFromUcontext()
128 regs_[X86_64_REG_RAX] = ucontext->uc_mcontext.rax; in SetFromUcontext()
129 regs_[X86_64_REG_RCX] = ucontext->uc_mcontext.rcx; in SetFromUcontext()
130 regs_[X86_64_REG_RSP] = ucontext->uc_mcontext.rsp; in SetFromUcontext()
[all …]
DRegsX86.cpp101 void RegsX86::SetFromUcontext(x86_ucontext_t* ucontext) { in SetFromUcontext() argument
103 regs_[X86_REG_EDI] = ucontext->uc_mcontext.edi; in SetFromUcontext()
104 regs_[X86_REG_ESI] = ucontext->uc_mcontext.esi; in SetFromUcontext()
105 regs_[X86_REG_EBP] = ucontext->uc_mcontext.ebp; in SetFromUcontext()
106 regs_[X86_REG_ESP] = ucontext->uc_mcontext.esp; in SetFromUcontext()
107 regs_[X86_REG_EBX] = ucontext->uc_mcontext.ebx; in SetFromUcontext()
108 regs_[X86_REG_EDX] = ucontext->uc_mcontext.edx; in SetFromUcontext()
109 regs_[X86_REG_ECX] = ucontext->uc_mcontext.ecx; in SetFromUcontext()
110 regs_[X86_REG_EAX] = ucontext->uc_mcontext.eax; in SetFromUcontext()
111 regs_[X86_REG_EIP] = ucontext->uc_mcontext.eip; in SetFromUcontext()
[all …]
DRegs.cpp74 Regs* Regs::CreateFromUcontext(ArchEnum arch, void* ucontext) { in CreateFromUcontext() argument
77 return RegsX86::CreateFromUcontext(ucontext); in CreateFromUcontext()
79 return RegsX86_64::CreateFromUcontext(ucontext); in CreateFromUcontext()
81 return RegsArm::CreateFromUcontext(ucontext); in CreateFromUcontext()
83 return RegsArm64::CreateFromUcontext(ucontext); in CreateFromUcontext()
85 return RegsMips::CreateFromUcontext(ucontext); in CreateFromUcontext()
87 return RegsMips64::CreateFromUcontext(ucontext); in CreateFromUcontext()
DRegsArm64.cpp119 Regs* RegsArm64::CreateFromUcontext(void* ucontext) { in CreateFromUcontext() argument
120 arm64_ucontext_t* arm64_ucontext = reinterpret_cast<arm64_ucontext_t*>(ucontext); in CreateFromUcontext()
DRegsArm.cpp122 Regs* RegsArm::CreateFromUcontext(void* ucontext) { in CreateFromUcontext() argument
123 arm_ucontext_t* arm_ucontext = reinterpret_cast<arm_ucontext_t*>(ucontext); in CreateFromUcontext()
DRegsMips64.cpp120 Regs* RegsMips64::CreateFromUcontext(void* ucontext) { in CreateFromUcontext() argument
121 mips64_ucontext_t* mips64_ucontext = reinterpret_cast<mips64_ucontext_t*>(ucontext); in CreateFromUcontext()
/system/core/debuggerd/handler/
Ddebuggerd_fallback.cpp71 static void debuggerd_fallback_trace(int output_fd, ucontext_t* ucontext) { in debuggerd_fallback_trace() argument
85 thread.registers.reset(unwindstack::Regs::CreateFromUcontext(arch, ucontext)); in debuggerd_fallback_trace()
98 static void debuggerd_fallback_tombstone(int output_fd, ucontext_t* ucontext, siginfo_t* siginfo, in debuggerd_fallback_tombstone() argument
106 ucontext); in debuggerd_fallback_tombstone()
195 static void trace_handler(siginfo_t* info, ucontext_t* ucontext) { in trace_handler() argument
218 debuggerd_fallback_trace(fd, ucontext); in trace_handler()
245 debuggerd_fallback_trace(output_fd.get(), ucontext); in trace_handler()
308 static void crash_handler(siginfo_t* info, ucontext_t* ucontext, void* abort_message) { in crash_handler() argument
332 debuggerd_fallback_tombstone(output_fd.get(), ucontext, info, abort_message); in crash_handler()
341 extern "C" void debuggerd_fallback_handler(siginfo_t* info, ucontext_t* ucontext, in debuggerd_fallback_handler() argument
[all …]
/system/core/libunwindstack/include/unwindstack/
DRegsX86_64.h46 void SetFromUcontext(x86_64_ucontext_t* ucontext);
60 static Regs* CreateFromUcontext(void* ucontext);
DRegsX86.h46 void SetFromUcontext(x86_ucontext_t* ucontext);
60 static Regs* CreateFromUcontext(void* ucontext);
DRegsMips.h57 static Regs* CreateFromUcontext(void* ucontext);
DRegsArm64.h57 static Regs* CreateFromUcontext(void* ucontext);
DRegsArm.h57 static Regs* CreateFromUcontext(void* ucontext);
DRegsMips64.h57 static Regs* CreateFromUcontext(void* ucontext);
/system/core/libbacktrace/testdata/arm/
Doffline_testdata_for_libandroid_runtime2 ucontext: 104 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
Doffline_testdata_for_libGLESv2_adreno2 ucontext: 104 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
/system/core/libbacktrace/testdata/arm64/
Doffline_testdata_for_libskia3 ucontext: 464 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
Doffline_testdata_for_eglSubDriverAndroid3 ucontext: 464 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000…
/system/core/libunwindstack/tests/
DUnwindTest.cpp371 void* ucontext; in TEST_F() local
373 ucontext = reinterpret_cast<void*>(g_ucontext.load()); in TEST_F()
374 if (ucontext != nullptr) { in TEST_F()
379 ASSERT_TRUE(ucontext != nullptr) << "Timed out waiting for thread to respond to signal."; in TEST_F()
383 std::unique_ptr<Regs> regs(Regs::CreateFromUcontext(Regs::CurrentArch(), ucontext)); in TEST_F()

12