/system/core/libunwindstack/tests/ |
D | RegsStepIfSignalHandlerTest.cpp | 56 RegsArm regs; in ArmStepIfSignalHandlerNonRt() local 57 regs[ARM_REG_PC] = 0x5000; in ArmStepIfSignalHandlerNonRt() 58 regs[ARM_REG_SP] = addr; in ArmStepIfSignalHandlerNonRt() 66 ASSERT_TRUE(regs.StepIfSignalHandler(0x5000, elf_.get(), &process_memory_)); in ArmStepIfSignalHandlerNonRt() 67 EXPECT_EQ(0x100U, regs[ARM_REG_SP]); in ArmStepIfSignalHandlerNonRt() 68 EXPECT_EQ(0x120U, regs[ARM_REG_PC]); in ArmStepIfSignalHandlerNonRt() 69 EXPECT_EQ(0x100U, regs.sp()); in ArmStepIfSignalHandlerNonRt() 70 EXPECT_EQ(0x120U, regs.pc()); in ArmStepIfSignalHandlerNonRt() 86 RegsArm regs; in ArmStepIfSignalHandlerRt() local 87 regs[ARM_REG_PC] = 0x5000; in ArmStepIfSignalHandlerRt() [all …]
|
D | DwarfSectionImplTest.cpp | 99 RegsImplFake<TypeParam> regs(10); in TYPED_TEST_P() local 102 regs.set_pc(0x100); in TYPED_TEST_P() 103 regs.set_sp(0x2000); in TYPED_TEST_P() 104 regs[5] = 0x20; in TYPED_TEST_P() 105 regs[9] = 0x3000; in TYPED_TEST_P() 108 ASSERT_FALSE(this->section_->Eval(&cie, &this->memory_, loc_regs, ®s, &finished)); in TYPED_TEST_P() 115 RegsImplFake<TypeParam> regs(10); in TYPED_TEST_P() local 118 regs.set_pc(0x100); in TYPED_TEST_P() 119 regs.set_sp(0x2000); in TYPED_TEST_P() 120 regs[5] = 0x20; in TYPED_TEST_P() [all …]
|
D | ElfInterfaceArmTest.cpp | 276 RegsArm regs; in TEST_F() local 277 regs[ARM_REG_SP] = 0x1000; in TEST_F() 278 regs[ARM_REG_LR] = 0x20000; in TEST_F() 279 regs.set_sp(regs[ARM_REG_SP]); in TEST_F() 280 regs.set_pc(0x1234); in TEST_F() 281 ASSERT_FALSE(interface.StepExidx(0x7000, ®s, &process_memory_, &finished)); in TEST_F() 287 ASSERT_FALSE(interface.StepExidx(0x7000, ®s, &process_memory_, &finished)); in TEST_F() 292 ASSERT_TRUE(interface.StepExidx(0x7000, ®s, &process_memory_, &finished)); in TEST_F() 295 ASSERT_EQ(0x1000U, regs.sp()); in TEST_F() 296 ASSERT_EQ(0x1000U, regs[ARM_REG_SP]); in TEST_F() [all …]
|
D | RegsInfoTest.cpp | 29 RegsImplFake<uint32_t> regs(10); in TEST() local 30 RegsInfo<uint32_t> info(®s); in TEST() 32 regs[1] = 0x100; in TEST() 38 ASSERT_EQ(value, ®s[1]); in TEST() 39 regs[1] = 0x200; in TEST() 42 ASSERT_EQ(0x200U, regs[1]); in TEST() 46 RegsImplFake<uint64_t> regs(20); in TEST() local 47 RegsInfo<uint64_t> info(®s); in TEST() 49 regs[3] = 0x300; in TEST() 55 ASSERT_EQ(value, ®s[3]); in TEST() [all …]
|
D | RegsTest.cpp | 217 uint32_t* regs = reinterpret_cast<uint32_t*>(arm.RawData()); in TEST_F() local 218 regs[13] = 0x100; in TEST_F() 219 regs[15] = 0x200; in TEST_F() 226 uint64_t* regs = reinterpret_cast<uint64_t*>(arm64.RawData()); in TEST_F() local 227 regs[31] = 0xb100000000ULL; in TEST_F() 228 regs[32] = 0xc200000000ULL; in TEST_F() 235 uint32_t* regs = reinterpret_cast<uint32_t*>(x86.RawData()); in TEST_F() local 236 regs[4] = 0x23450000; in TEST_F() 237 regs[8] = 0xabcd0000; in TEST_F() 244 uint64_t* regs = reinterpret_cast<uint64_t*>(x86_64.RawData()); in TEST_F() local [all …]
|
D | UnwindTest.cpp | 129 static void VerifyUnwind(pid_t pid, Maps* maps, Regs* regs, in VerifyUnwind() argument 133 Unwinder unwinder(512, maps, regs, process_memory); in VerifyUnwind() 162 std::unique_ptr<Regs> regs(Regs::CreateFromLocal()); in InnerFunction() local 163 RegsGetLocal(regs.get()); in InnerFunction() 170 unwinder.reset(new Unwinder(512, maps.get(), regs.get(), process_memory)); in InnerFunction() 173 ASSERT_TRUE(unwinder_from_pid->Init(regs->Arch())); in InnerFunction() 174 unwinder_from_pid->SetRegs(regs.get()); in InnerFunction() 260 std::unique_ptr<Regs> regs(Regs::RemoteGet(pid)); in TEST_F() local 261 ASSERT_TRUE(regs.get() != nullptr); in TEST_F() 263 VerifyUnwind(pid, &maps, regs.get(), kFunctionOrder); in TEST_F() [all …]
|
D | ArmExidxDecodeTest.cpp | 251 ASSERT_EQ(0x10U, (*exidx_->regs())[15]); in TEST_P() 293 ASSERT_EQ(0x20U, (*exidx_->regs())[4]); in TEST_P() 294 ASSERT_EQ(0x21U, (*exidx_->regs())[5]); in TEST_P() 295 ASSERT_EQ(0x22U, (*exidx_->regs())[6]); in TEST_P() 296 ASSERT_EQ(0x23U, (*exidx_->regs())[7]); in TEST_P() 297 ASSERT_EQ(0x24U, (*exidx_->regs())[8]); in TEST_P() 298 ASSERT_EQ(0x25U, (*exidx_->regs())[9]); in TEST_P() 299 ASSERT_EQ(0x26U, (*exidx_->regs())[10]); in TEST_P() 300 ASSERT_EQ(0x27U, (*exidx_->regs())[11]); in TEST_P() 301 ASSERT_EQ(0x28U, (*exidx_->regs())[12]); in TEST_P() [all …]
|
/system/extras/simpleperf/ |
D | OfflineUnwinder.cpp | 51 static unwindstack::Regs* GetBacktraceRegs(const RegSet& regs) { in GetBacktraceRegs() argument 52 switch (regs.arch) { in GetBacktraceRegs() 61 arm_user_regs.regs[i] = static_cast<uint32_t>(regs.data[i]); in GetBacktraceRegs() 72 memcpy(&arm64_user_regs.regs[unwindstack::ARM64_REG_R0], ®s.data[PERF_REG_ARM64_X0], in GetBacktraceRegs() 74 arm64_user_regs.sp = regs.data[PERF_REG_ARM64_SP]; in GetBacktraceRegs() 75 arm64_user_regs.pc = regs.data[PERF_REG_ARM64_PC]; in GetBacktraceRegs() 81 x86_user_regs.eax = static_cast<uint32_t>(regs.data[PERF_REG_X86_AX]); in GetBacktraceRegs() 82 x86_user_regs.ebx = static_cast<uint32_t>(regs.data[PERF_REG_X86_BX]); in GetBacktraceRegs() 83 x86_user_regs.ecx = static_cast<uint32_t>(regs.data[PERF_REG_X86_CX]); in GetBacktraceRegs() 84 x86_user_regs.edx = static_cast<uint32_t>(regs.data[PERF_REG_X86_DX]); in GetBacktraceRegs() [all …]
|
/system/core/libunwindstack/ |
D | RegsX86_64.cpp | 96 RegsX86_64* regs = new RegsX86_64(); in Read() local 97 (*regs)[X86_64_REG_RAX] = user->rax; in Read() 98 (*regs)[X86_64_REG_RBX] = user->rbx; in Read() 99 (*regs)[X86_64_REG_RCX] = user->rcx; in Read() 100 (*regs)[X86_64_REG_RDX] = user->rdx; in Read() 101 (*regs)[X86_64_REG_R8] = user->r8; in Read() 102 (*regs)[X86_64_REG_R9] = user->r9; in Read() 103 (*regs)[X86_64_REG_R10] = user->r10; in Read() 104 (*regs)[X86_64_REG_R11] = user->r11; in Read() 105 (*regs)[X86_64_REG_R12] = user->r12; in Read() [all …]
|
D | RegsInfo.h | 30 RegsInfo(RegsImpl<AddressType>* regs) : regs(regs) {} in RegsInfo() 32 RegsImpl<AddressType>* regs = nullptr; member 40 return (*regs)[reg]; in Get() 50 saved_regs[reg] = (*regs)[reg]; in Save() 51 return &(*regs)[reg]; in Save() 63 inline uint16_t Total() { return regs->total_regs(); } in Total()
|
D | RegsX86.cpp | 87 RegsX86* regs = new RegsX86(); in Read() local 88 (*regs)[X86_REG_EAX] = user->eax; in Read() 89 (*regs)[X86_REG_EBX] = user->ebx; in Read() 90 (*regs)[X86_REG_ECX] = user->ecx; in Read() 91 (*regs)[X86_REG_EDX] = user->edx; in Read() 92 (*regs)[X86_REG_EBP] = user->ebp; in Read() 93 (*regs)[X86_REG_EDI] = user->edi; in Read() 94 (*regs)[X86_REG_ESI] = user->esi; in Read() 95 (*regs)[X86_REG_ESP] = user->esp; in Read() 96 (*regs)[X86_REG_EIP] = user->eip; in Read() [all …]
|
D | LocalUnwinder.cpp | 89 std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::CreateFromLocal()); in Unwind() local 90 unwindstack::RegsGetLocal(regs.get()); in Unwind() 91 ArchEnum arch = regs->Arch(); in Unwind() 96 uint64_t cur_pc = regs->pc(); in Unwind() 97 uint64_t cur_sp = regs->sp(); in Unwind() 109 pc_adjustment = regs->GetPcAdjustment(rel_pc, elf); in Unwind() 116 if (elf->StepIfSignalHandler(rel_pc, regs.get(), process_memory_.get())) { in Unwind() 118 } else if (!elf->Step(step_pc, regs.get(), process_memory_.get(), &finished)) { in Unwind() 137 (cur_pc == regs->pc() && cur_sp == regs->sp())) { in Unwind()
|
D | Regs.cpp | 113 Regs* regs; in CreateFromLocal() local 115 regs = new RegsArm(); in CreateFromLocal() 117 regs = new RegsArm64(); in CreateFromLocal() 119 regs = new RegsX86(); in CreateFromLocal() 121 regs = new RegsX86_64(); in CreateFromLocal() 123 regs = new RegsMips(); in CreateFromLocal() 125 regs = new RegsMips64(); in CreateFromLocal() 129 return regs; in CreateFromLocal()
|
D | RegsMips64.cpp | 111 RegsMips64* regs = new RegsMips64(); in Read() local 112 uint64_t* reg_data = reinterpret_cast<uint64_t*>(regs->RawData()); in Read() 114 memcpy(regs->RawData(), &user->regs[MIPS64_EF_R0], (MIPS64_REG_R31 + 1) * sizeof(uint64_t)); in Read() 116 reg_data[MIPS64_REG_PC] = user->regs[MIPS64_EF_CP0_EPC]; in Read() 117 return regs; in Read() 123 RegsMips64* regs = new RegsMips64(); in CreateFromUcontext() local 125 memcpy(regs->RawData(), &mips64_ucontext->uc_mcontext.sc_regs[0], 32 * sizeof(uint64_t)); in CreateFromUcontext() 126 (*regs)[MIPS64_REG_PC] = mips64_ucontext->uc_mcontext.sc_pc; in CreateFromUcontext() 127 return regs; in CreateFromUcontext()
|
D | RegsMips.cpp | 111 RegsMips* regs = new RegsMips(); in Read() local 112 uint32_t* reg_data = reinterpret_cast<uint32_t*>(regs->RawData()); in Read() 114 memcpy(regs->RawData(), &user->regs[MIPS32_EF_R0], (MIPS_REG_R31 + 1) * sizeof(uint32_t)); in Read() 116 reg_data[MIPS_REG_PC] = user->regs[MIPS32_EF_CP0_EPC]; in Read() 117 return regs; in Read() 123 RegsMips* regs = new RegsMips(); in CreateFromUcontext() local 126 (*regs)[MIPS_REG_R0 + i] = mips_ucontext->uc_mcontext.sc_regs[i]; in CreateFromUcontext() 128 (*regs)[MIPS_REG_PC] = mips_ucontext->uc_mcontext.sc_pc; in CreateFromUcontext() 129 return regs; in CreateFromUcontext()
|
D | RegsArm64.cpp | 111 RegsArm64* regs = new RegsArm64(); in Read() local 112 memcpy(regs->RawData(), &user->regs[0], (ARM64_REG_R31 + 1) * sizeof(uint64_t)); in Read() 113 uint64_t* reg_data = reinterpret_cast<uint64_t*>(regs->RawData()); in Read() 116 return regs; in Read() 122 RegsArm64* regs = new RegsArm64(); in CreateFromUcontext() local 123 memcpy(regs->RawData(), &arm64_ucontext->uc_mcontext.regs[0], ARM64_REG_LAST * sizeof(uint64_t)); in CreateFromUcontext() 124 return regs; in CreateFromUcontext()
|
D | RegsArm.cpp | 117 RegsArm* regs = new RegsArm(); in Read() local 118 memcpy(regs->RawData(), &user->regs[0], ARM_REG_LAST * sizeof(uint32_t)); in Read() 119 return regs; in Read() 125 RegsArm* regs = new RegsArm(); in CreateFromUcontext() local 126 memcpy(regs->RawData(), &arm_ucontext->uc_mcontext.regs[0], ARM_REG_LAST * sizeof(uint32_t)); in CreateFromUcontext() 127 return regs; in CreateFromUcontext()
|
D | ElfInterfaceArm.cpp | 103 bool ElfInterfaceArm::Step(uint64_t pc, Regs* regs, Memory* process_memory, bool* finished) { in Step() argument 108 return ElfInterface32::Step(pc, regs, process_memory, finished) || in Step() 109 StepExidx(pc, regs, process_memory, finished); in Step() 112 bool ElfInterfaceArm::StepExidx(uint64_t pc, Regs* regs, Memory* process_memory, bool* finished) { in StepExidx() argument 120 RegsArm* regs_arm = reinterpret_cast<RegsArm*>(regs); in StepExidx()
|
/system/core/libbacktrace/ |
D | UnwindStack.cpp | 44 bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, in Unwind() argument 50 regs, stack_map->process_memory()); in Unwind() 52 stack_map->SetArch(regs->Arch()); in Unwind() 54 unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch()); in Unwind() 58 unwinder.SetDexFiles(stack_map->GetDexFiles(), regs->Arch()); in Unwind() 132 bool Backtrace::UnwindOffline(unwindstack::Regs* regs, BacktraceMap* back_map, in UnwindOffline() argument 145 return Backtrace::Unwind(regs, back_map, frames, 0U, nullptr, error); in UnwindOffline() 156 std::unique_ptr<unwindstack::Regs> regs; in UnwindFromContext() local 158 regs.reset(unwindstack::Regs::CreateFromLocal()); in UnwindFromContext() 161 unwindstack::RegsGetLocal(regs.get()); in UnwindFromContext() [all …]
|
D | backtrace_testlib.cpp | 82 std::unique_ptr<unwindstack::Regs> regs(unwindstack::Regs::CreateFromLocal()); in GetContextAndExit() local 83 unwindstack::RegsGetLocal(regs.get()); 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() 92 uint32_t* reg_data = reinterpret_cast<uint32_t*>(regs->RawData()); in GetContextAndExit() 108 uint64_t* reg_data = reinterpret_cast<uint64_t*>(regs->RawData()); in GetContextAndExit()
|
/system/core/libunwindstack/tools/ |
D | unwind.cpp | 60 unwindstack::Regs* regs = unwindstack::Regs::RemoteGet(pid); in DoUnwind() local 61 if (regs == nullptr) { in DoUnwind() 67 switch (regs->Arch()) { in DoUnwind() 93 if (!unwinder.Init(regs->Arch())) { in DoUnwind() 98 unwinder.SetRegs(regs); in DoUnwind()
|
/system/core/libunwindstack/include/unwindstack/ |
D | RegsGetLocal.h | 86 extern "C" void AsmGetRegs(void* regs); 90 inline __attribute__((__always_inline__)) void RegsGetLocal(Regs* regs) { in RegsGetLocal() argument 91 AsmGetRegs(regs->RawData()); in RegsGetLocal()
|
/system/core/libpixelflinger/codeflinger/ |
D | GGLAssembler.cpp | 203 Scratch regs(registerFile()); in scanline_core() local 232 build_textures(parts, regs); in scanline_core() 242 mDstPixel.setTo(regs.obtain(), &mCbFormat); in scanline_core() 263 parts.dither = reg_t(regs.obtain()); in scanline_core() 271 pixel.setTo(regs.obtain(), &mCbFormat, FIRST); in scanline_core() 273 build_component(pixel, parts, GGLFormat::ALPHA, regs); in scanline_core() 281 build_component(pixel, parts, GGLFormat::RED, regs); in scanline_core() 282 build_component(pixel, parts, GGLFormat::GREEN, regs); in scanline_core() 283 build_component(pixel, parts, GGLFormat::BLUE, regs); in scanline_core() 299 build_logic_op(pixel, regs); in scanline_core() [all …]
|
/system/core/libpixelflinger/tests/arch-mips64/assembler/ |
D | mips64_assembler_test.cpp | 56 int64_t regs[], int32_t flags[]); 374 int64_t regs[NUM_REGS] = {0}; in dataOpTest() local 382 regs[i] = i; in dataOpTest() 385 regs[Rd] = test.RdValue; in dataOpTest() 386 regs[Rn] = test.RnValue; in dataOpTest() 387 regs[Rs] = test.RsValue; in dataOpTest() 391 regs[test.preCond.Rcond1] = test.preCond.Rcond1Value; in dataOpTest() 392 regs[test.preCond.Rcond2] = test.preCond.Rcond2Value; in dataOpTest() 402 regs[Rm] = (int64_t)((int32_t)(test.RmValue)); in dataOpTest() 407 regs[Rm] = (int64_t)((int32_t)(test.RmValue)); in dataOpTest() [all …]
|
/system/core/libmemunreachable/ |
D | ThreadCapture.cpp | 215 uintptr_t regs[max_num_regs]; in PtraceThreadInfo() local 217 iovec.iov_base = ®s; in PtraceThreadInfo() 218 iovec.iov_len = sizeof(regs); in PtraceThreadInfo() 226 thread_info.regs.assign(®s[0], ®s[num_regs]); in PtraceThreadInfo() 238 offsetof(struct pt_regs, regs[29]) / sizeof(uintptr_t) in PtraceThreadInfo() 246 thread_info.stack = std::pair<uintptr_t, uintptr_t>(regs[sp], 0); in PtraceThreadInfo()
|