/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 | 100 RegsImplFake<TypeParam> regs(10); in TYPED_TEST_P() local 103 regs.set_pc(0x100); in TYPED_TEST_P() 104 regs.set_sp(0x2000); in TYPED_TEST_P() 105 regs[5] = 0x20; in TYPED_TEST_P() 106 regs[9] = 0x3000; in TYPED_TEST_P() 109 ASSERT_FALSE(this->section_->Eval(&cie, &this->memory_, loc_regs, ®s, &finished)); in TYPED_TEST_P() 116 RegsImplFake<TypeParam> regs(10); in TYPED_TEST_P() local 119 regs.set_pc(0x100); in TYPED_TEST_P() 120 regs.set_sp(0x2000); in TYPED_TEST_P() 121 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 | 198 uint32_t* regs = reinterpret_cast<uint32_t*>(arm.RawData()); in TEST_F() local 199 regs[13] = 0x100; in TEST_F() 200 regs[15] = 0x200; in TEST_F() 207 uint64_t* regs = reinterpret_cast<uint64_t*>(arm64.RawData()); in TEST_F() local 208 regs[31] = 0xb100000000ULL; in TEST_F() 209 regs[32] = 0xc200000000ULL; in TEST_F() 216 uint32_t* regs = reinterpret_cast<uint32_t*>(x86.RawData()); in TEST_F() local 217 regs[4] = 0x23450000; in TEST_F() 218 regs[8] = 0xabcd0000; in TEST_F() 225 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 | VerifyBionicTerminationTest.cpp | 57 dwarf_loc_regs_t regs; in GetReturnAddressLocation() local 58 if (!section->GetCfaLocationInfo(rel_pc, fde, ®s, ARCH_UNKNOWN)) { in GetReturnAddressLocation() 62 auto reg_entry = regs.find(fde->cie->return_address_register); in GetReturnAddressLocation() 63 if (reg_entry == regs.end()) { in GetReturnAddressLocation() 94 std::unique_ptr<Regs> regs(Regs::CreateFromLocal()); in TEST() local 97 ASSERT_TRUE(unwinder.Init(regs->Arch())); in TEST() 98 unwinder.SetRegs(regs.get()); in TEST() 100 RegsGetLocal(regs.get()); in TEST()
|
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/core/libunwindstack/ |
D | RegsX86_64.cpp | 89 RegsX86_64* regs = new RegsX86_64(); in Read() local 90 (*regs)[X86_64_REG_RAX] = user->rax; in Read() 91 (*regs)[X86_64_REG_RBX] = user->rbx; in Read() 92 (*regs)[X86_64_REG_RCX] = user->rcx; in Read() 93 (*regs)[X86_64_REG_RDX] = user->rdx; in Read() 94 (*regs)[X86_64_REG_R8] = user->r8; in Read() 95 (*regs)[X86_64_REG_R9] = user->r9; in Read() 96 (*regs)[X86_64_REG_R10] = user->r10; in Read() 97 (*regs)[X86_64_REG_R11] = user->r11; in Read() 98 (*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 | 80 RegsX86* regs = new RegsX86(); in Read() local 81 (*regs)[X86_REG_EAX] = user->eax; in Read() 82 (*regs)[X86_REG_EBX] = user->ebx; in Read() 83 (*regs)[X86_REG_ECX] = user->ecx; in Read() 84 (*regs)[X86_REG_EDX] = user->edx; in Read() 85 (*regs)[X86_REG_EBP] = user->ebp; in Read() 86 (*regs)[X86_REG_EDI] = user->edi; in Read() 87 (*regs)[X86_REG_ESI] = user->esi; in Read() 88 (*regs)[X86_REG_ESP] = user->esp; in Read() 89 (*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() 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 | RegsMips64.cpp | 103 RegsMips64* regs = new RegsMips64(); in Read() local 104 uint64_t* reg_data = reinterpret_cast<uint64_t*>(regs->RawData()); in Read() 106 memcpy(regs->RawData(), &user->regs[MIPS64_EF_R0], (MIPS64_REG_R31 + 1) * sizeof(uint64_t)); in Read() 108 reg_data[MIPS64_REG_PC] = user->regs[MIPS64_EF_CP0_EPC]; in Read() 109 return regs; in Read() 115 RegsMips64* regs = new RegsMips64(); in CreateFromUcontext() local 117 memcpy(regs->RawData(), &mips64_ucontext->uc_mcontext.sc_regs[0], 32 * sizeof(uint64_t)); in CreateFromUcontext() 118 (*regs)[MIPS64_REG_PC] = mips64_ucontext->uc_mcontext.sc_pc; in CreateFromUcontext() 119 return regs; in CreateFromUcontext()
|
D | RegsMips.cpp | 103 RegsMips* regs = new RegsMips(); in Read() local 104 uint32_t* reg_data = reinterpret_cast<uint32_t*>(regs->RawData()); in Read() 106 memcpy(regs->RawData(), &user->regs[MIPS32_EF_R0], (MIPS_REG_R31 + 1) * sizeof(uint32_t)); in Read() 108 reg_data[MIPS_REG_PC] = user->regs[MIPS32_EF_CP0_EPC]; in Read() 109 return regs; in Read() 115 RegsMips* regs = new RegsMips(); in CreateFromUcontext() local 118 (*regs)[MIPS_REG_R0 + i] = mips_ucontext->uc_mcontext.sc_regs[i]; in CreateFromUcontext() 120 (*regs)[MIPS_REG_PC] = mips_ucontext->uc_mcontext.sc_pc; in CreateFromUcontext() 121 return regs; in CreateFromUcontext()
|
D | RegsArm.cpp | 86 RegsArm* regs = new RegsArm(); in Read() local 87 memcpy(regs->RawData(), &user->regs[0], ARM_REG_LAST * sizeof(uint32_t)); in Read() 88 return regs; in Read() 94 RegsArm* regs = new RegsArm(); in CreateFromUcontext() local 95 memcpy(regs->RawData(), &arm_ucontext->uc_mcontext.regs[0], ARM_REG_LAST * sizeof(uint32_t)); in CreateFromUcontext() 96 return regs; in CreateFromUcontext()
|
D | Regs.cpp | 109 Regs* regs; in CreateFromLocal() local 111 regs = new RegsArm(); in CreateFromLocal() 113 regs = new RegsArm64(); in CreateFromLocal() 115 regs = new RegsX86(); in CreateFromLocal() 117 regs = new RegsX86_64(); in CreateFromLocal() 121 return regs; in CreateFromLocal()
|
D | RegsArm64.cpp | 125 RegsArm64* regs = new RegsArm64(); in Read() local 126 memcpy(regs->RawData(), &user->regs[0], (ARM64_REG_R30 + 1) * sizeof(uint64_t)); in Read() 127 uint64_t* reg_data = reinterpret_cast<uint64_t*>(regs->RawData()); in Read() 131 return regs; in Read() 137 RegsArm64* regs = new RegsArm64(); in CreateFromUcontext() local 138 memcpy(regs->RawData(), &arm64_ucontext->uc_mcontext.regs[0], ARM64_REG_LAST * sizeof(uint64_t)); in CreateFromUcontext() 139 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/extras/simpleperf/ |
D | OfflineUnwinder.cpp | 55 unwindstack::Regs* OfflineUnwinderImpl::GetBacktraceRegs(const RegSet& regs) { in GetBacktraceRegs() argument 56 switch (regs.arch) { in GetBacktraceRegs() 65 arm_user_regs.regs[i] = static_cast<uint32_t>(regs.data[i]); in GetBacktraceRegs() 76 memcpy(&arm64_user_regs.regs[unwindstack::ARM64_REG_R0], ®s.data[PERF_REG_ARM64_X0], in GetBacktraceRegs() 78 arm64_user_regs.sp = regs.data[PERF_REG_ARM64_SP]; in GetBacktraceRegs() 79 arm64_user_regs.pc = regs.data[PERF_REG_ARM64_PC]; in GetBacktraceRegs() 80 auto regs = in GetBacktraceRegs() local 82 regs->SetPACMask(arm64_pac_mask_); in GetBacktraceRegs() 83 return regs; in GetBacktraceRegs() 88 x86_user_regs.eax = static_cast<uint32_t>(regs.data[PERF_REG_X86_AX]); in GetBacktraceRegs() [all …]
|
/system/core/libbacktrace/ |
D | UnwindStack.cpp | 45 bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, in Unwind() argument 51 regs, stack_map->process_memory()); in Unwind() 53 stack_map->SetArch(regs->Arch()); in Unwind() 55 unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch()); in Unwind() 59 unwinder.SetDexFiles(stack_map->GetDexFiles(), regs->Arch()); in Unwind() 147 std::unique_ptr<unwindstack::Regs> regs; in UnwindFromContext() local 149 regs.reset(unwindstack::Regs::CreateFromLocal()); in UnwindFromContext() 152 unwindstack::RegsGetLocal(regs.get()); in UnwindFromContext() 154 regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); in UnwindFromContext() 161 return Backtrace::Unwind(regs.get(), GetMap(), &frames_, num_ignore_frames, &skip_names, &error_); 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/libunwindstack/tests/fuzz/ |
D | UnwinderComponentCreator.cpp | 22 std::unique_ptr<unwindstack::RegsArm> regs = std::make_unique<unwindstack::RegsArm>(); in GetRegisters() local 23 return regs; in GetRegisters() 26 std::unique_ptr<unwindstack::RegsArm64> regs = std::make_unique<unwindstack::RegsArm64>(); in GetRegisters() local 27 return regs; in GetRegisters() 30 std::unique_ptr<unwindstack::RegsX86> regs = std::make_unique<unwindstack::RegsX86>(); in GetRegisters() local 31 return regs; in GetRegisters() 34 std::unique_ptr<unwindstack::RegsX86_64> regs = std::make_unique<unwindstack::RegsX86_64>(); in GetRegisters() local 35 return regs; in GetRegisters() 38 std::unique_ptr<unwindstack::RegsMips> regs = std::make_unique<unwindstack::RegsMips>(); in GetRegisters() local 39 return regs; in GetRegisters() [all …]
|
/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 …]
|