Home
last modified time | relevance | path

Searched refs:regs_ (Results 1 – 12 of 12) sorted by relevance

/system/unwinding/libunwindstack/
DRegsRiscv64.cpp80 return regs_[RISCV64_REG_PC]; in pc()
84 return regs_[RISCV64_REG_SP]; in sp()
88 regs_[RISCV64_REG_PC] = pc; in set_pc()
92 regs_[RISCV64_REG_SP] = sp; in set_sp()
96 uint64_t ra = regs_[RISCV64_REG_RA]; in SetPcFromReturnAddress()
97 if (regs_[RISCV64_REG_PC] == ra) { in SetPcFromReturnAddress()
101 regs_[RISCV64_REG_PC] = ra; in SetPcFromReturnAddress()
106 fn("pc", regs_[RISCV64_REG_PC]); in IterateRegisters()
107 fn("ra", regs_[RISCV64_REG_RA]); in IterateRegisters()
108 fn("sp", regs_[RISCV64_REG_SP]); in IterateRegisters()
[all …]
DRegsArm64.cpp47 return regs_[ARM64_REG_PC]; in pc()
51 return regs_[ARM64_REG_SP]; in sp()
74 regs_[ARM64_REG_PC] = pc; in set_pc()
78 regs_[ARM64_REG_SP] = sp; in set_sp()
84 regs_[ARM64_REG_PC] = strip_pac(regs_[ARM64_REG_PC], pac_mask_); in fallback_pc()
88 uint64_t lr = regs_[ARM64_REG_LR]; in SetPcFromReturnAddress()
89 if (regs_[ARM64_REG_PC] == lr) { in SetPcFromReturnAddress()
93 regs_[ARM64_REG_PC] = lr; in SetPcFromReturnAddress()
98 fn("x0", regs_[ARM64_REG_R0]); in IterateRegisters()
99 fn("x1", regs_[ARM64_REG_R1]); in IterateRegisters()
[all …]
DRegsX86.cpp38 return regs_[X86_REG_PC]; in pc()
42 return regs_[X86_REG_SP]; in sp()
46 regs_[X86_REG_PC] = static_cast<uint32_t>(pc); in set_pc()
50 regs_[X86_REG_SP] = static_cast<uint32_t>(sp); in set_sp()
56 if (!process_memory->ReadFully(regs_[X86_REG_SP], &new_pc, sizeof(new_pc)) || in SetPcFromReturnAddress()
57 new_pc == regs_[X86_REG_PC]) { in SetPcFromReturnAddress()
61 regs_[X86_REG_PC] = new_pc; in SetPcFromReturnAddress()
66 fn("eax", regs_[X86_REG_EAX]); in IterateRegisters()
67 fn("ebx", regs_[X86_REG_EBX]); in IterateRegisters()
68 fn("ecx", regs_[X86_REG_ECX]); in IterateRegisters()
[all …]
DRegsX86_64.cpp39 return regs_[X86_64_REG_PC]; in pc()
43 return regs_[X86_64_REG_SP]; in sp()
47 regs_[X86_64_REG_PC] = pc; in set_pc()
51 regs_[X86_64_REG_SP] = sp; in set_sp()
57 if (!process_memory->ReadFully(regs_[X86_64_REG_SP], &new_pc, sizeof(new_pc)) || in SetPcFromReturnAddress()
58 new_pc == regs_[X86_64_REG_PC]) { in SetPcFromReturnAddress()
62 regs_[X86_64_REG_PC] = new_pc; in SetPcFromReturnAddress()
67 fn("rax", regs_[X86_64_REG_RAX]); in IterateRegisters()
68 fn("rbx", regs_[X86_64_REG_RBX]); in IterateRegisters()
69 fn("rcx", regs_[X86_64_REG_RCX]); in IterateRegisters()
[all …]
DRegsArm.cpp39 return regs_[ARM_REG_PC]; in pc()
43 return regs_[ARM_REG_SP]; in sp()
47 regs_[ARM_REG_PC] = pc; in set_pc()
51 regs_[ARM_REG_SP] = sp; in set_sp()
55 uint32_t lr = regs_[ARM_REG_LR]; in SetPcFromReturnAddress()
56 if (regs_[ARM_REG_PC] == lr) { in SetPcFromReturnAddress()
60 regs_[ARM_REG_PC] = lr; in SetPcFromReturnAddress()
65 fn("r0", regs_[ARM_REG_R0]); in IterateRegisters()
66 fn("r1", regs_[ARM_REG_R1]); in IterateRegisters()
67 fn("r2", regs_[ARM_REG_R2]); in IterateRegisters()
[all …]
DUnwinder.cpp59 uint64_t dex_pc = regs_->dex_pc(); in FillInDexFrame()
61 frame->sp = regs_->sp(); in FillInDexFrame()
94 frame->sp = regs_->sp(); in FillInFrame()
96 frame->pc = regs_->pc() - pc_adjustment; in FillInFrame()
132 if (maps_->Find(regs_->pc()) == nullptr) { in Unwind()
133 regs_->fallback_pc(); in Unwind()
139 uint64_t cur_pc = regs_->pc(); in Unwind()
140 uint64_t cur_sp = regs_->sp(); in Unwind()
142 std::shared_ptr<MapInfo> map_info = maps_->Find(regs_->pc()); in Unwind()
149 step_pc = regs_->pc(); in Unwind()
[all …]
DArmExidx.h56 : regs_(regs), elf_memory_(elf_memory), process_memory_(process_memory) {} in ArmExidx()
74 RegsArm* regs() { return regs_; } in regs()
106 RegsArm* regs_ = nullptr; variable
DArmExidx.cpp239 if (!process_memory_->Read32(cfa_, &(*regs_)[reg])) { in DecodePrefix_10_00()
250 cfa_ = (*regs_)[ARM_REG_SP]; in DecodePrefix_10_00()
287 cfa_ = (*regs_)[bits]; in DecodePrefix_10_01()
332 if (!process_memory_->Read32(cfa_, &(*regs_)[i])) { in DecodePrefix_10_10()
340 if (!process_memory_->Read32(cfa_, &(*regs_)[ARM_REG_R14])) { in DecodePrefix_10_10()
423 if (!process_memory_->Read32(cfa_, &(*regs_)[reg])) { in DecodePrefix_10_11_0001()
/system/unwinding/libunwindstack/tests/
DDwarfSectionTest.cpp68 static RegsFake regs_; member in unwindstack::DwarfSectionTest
71 RegsFake DwarfSectionTest::regs_(10); member in unwindstack::DwarfSectionTest
90 ASSERT_FALSE(section_->Step(0x1000, &regs_, nullptr, &finished, &is_signal_frame)); in TEST_F()
105 ASSERT_FALSE(section_->Step(0x1000, &regs_, nullptr, &finished, &is_signal_frame)); in TEST_F()
119 EXPECT_CALL(*section_, Eval(&cie, &process, ::testing::_, &regs_, ::testing::_)) in TEST_F()
124 ASSERT_TRUE(section_->Step(0x1000, &regs_, &process, &finished, &is_signal_frame)); in TEST_F()
146 EXPECT_CALL(*section_, Eval(&cie, &process, ::testing::_, &regs_, ::testing::_)) in TEST_F()
151 ASSERT_TRUE(section_->Step(0x1000, &regs_, &process, &finished, &is_signal_frame)); in TEST_F()
152 ASSERT_TRUE(section_->Step(0x1000, &regs_, &process, &finished, &is_signal_frame)); in TEST_F()
153 ASSERT_TRUE(section_->Step(0x1500, &regs_, &process, &finished, &is_signal_frame)); in TEST_F()
[all …]
DUnwinderTest.cpp181 regs_.FakeSetArch(ARCH_ARM); in SetUp()
182 regs_.FakeSetReturnAddressValid(false); in SetUp()
186 static RegsFake regs_; member in unwindstack::UnwinderTest
192 RegsFake UnwinderTest::regs_(5); member in unwindstack::UnwinderTest
201 regs_.set_pc(0x1000); in TEST_F()
202 regs_.set_sp(0x10000); in TEST_F()
207 Unwinder unwinder(64, maps_.get(), &regs_, process_memory_); in TEST_F()
271 regs_.set_pc(0x1000); in TEST_F()
272 regs_.set_sp(0x10000); in TEST_F()
277 Unwinder unwinder(64, maps_.get(), &regs_, process_memory_); in TEST_F()
[all …]
/system/unwinding/libunwindstack/include/unwindstack/
DRegs.h102 : Regs(total_regs, return_loc), regs_(total_regs) {} in RegsImpl()
105 inline AddressType& operator[](size_t reg) { return regs_[reg]; }
107 void* RawData() override { return regs_.data(); } in RawData()
110 for (size_t i = 0; i < regs_.size(); ++i) { in IterateRegisters()
111 fn(std::to_string(i).c_str(), regs_[i]); in IterateRegisters()
116 std::vector<AddressType> regs_;
DUnwinder.h59 regs_(regs), in Unwinder()
93 regs_ = regs; in SetRegs()
94 arch_ = regs_ != nullptr ? regs->Arch() : ARCH_UNKNOWN; in SetRegs()
141 Regs* regs_; variable