Home
last modified time | relevance | path

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

/system/unwinding/libunwindstack/
DRegsMips64.cpp40 return regs_[MIPS64_REG_PC]; in pc()
44 return regs_[MIPS64_REG_SP]; in sp()
48 regs_[MIPS64_REG_PC] = pc; in set_pc()
52 regs_[MIPS64_REG_SP] = sp; in set_sp()
56 uint64_t ra = regs_[MIPS64_REG_RA]; in SetPcFromReturnAddress()
57 if (regs_[MIPS64_REG_PC] == ra) { in SetPcFromReturnAddress()
61 regs_[MIPS64_REG_PC] = ra; in SetPcFromReturnAddress()
66 fn("r0", regs_[MIPS64_REG_R0]); in IterateRegisters()
67 fn("r1", regs_[MIPS64_REG_R1]); in IterateRegisters()
68 fn("r2", regs_[MIPS64_REG_R2]); in IterateRegisters()
[all …]
DRegsMips.cpp40 return regs_[MIPS_REG_PC]; in pc()
44 return regs_[MIPS_REG_SP]; in sp()
48 regs_[MIPS_REG_PC] = static_cast<uint32_t>(pc); in set_pc()
52 regs_[MIPS_REG_SP] = static_cast<uint32_t>(sp); in set_sp()
56 uint32_t ra = regs_[MIPS_REG_RA]; in SetPcFromReturnAddress()
57 if (regs_[MIPS_REG_PC] == ra) { in SetPcFromReturnAddress()
61 regs_[MIPS_REG_PC] = ra; in SetPcFromReturnAddress()
66 fn("r0", regs_[MIPS_REG_R0]); in IterateRegisters()
67 fn("r1", regs_[MIPS_REG_R1]); in IterateRegisters()
68 fn("r2", regs_[MIPS_REG_R2]); 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_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 …]
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 …]
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()
103 frame->sp = regs_->sp(); in FillInFrame()
105 frame->pc = regs_->pc() - pc_adjustment; in FillInFrame()
159 if (maps_->Find(regs_->pc()) == nullptr) { in Unwind()
160 regs_->fallback_pc(); in Unwind()
166 uint64_t cur_pc = regs_->pc(); in Unwind()
167 uint64_t cur_sp = regs_->sp(); in Unwind()
169 MapInfo* map_info = maps_->Find(regs_->pc()); in Unwind()
175 step_pc = regs_->pc(); in Unwind()
[all …]
DArmExidx.h57 : regs_(regs), elf_memory_(elf_memory), process_memory_(process_memory) {} in ArmExidx()
75 RegsArm* regs() { return regs_; } in regs()
107 RegsArm* regs_ = nullptr; variable
DArmExidx.cpp238 if (!process_memory_->Read32(cfa_, &(*regs_)[reg])) { in DecodePrefix_10_00()
249 cfa_ = (*regs_)[ARM_REG_SP]; in DecodePrefix_10_00()
286 cfa_ = (*regs_)[bits]; in DecodePrefix_10_01()
331 if (!process_memory_->Read32(cfa_, &(*regs_)[i])) { in DecodePrefix_10_10()
339 if (!process_memory_->Read32(cfa_, &(*regs_)[ARM_REG_R14])) { in DecodePrefix_10_10()
422 if (!process_memory_->Read32(cfa_, &(*regs_)[reg])) { in DecodePrefix_10_11_0001()
/system/unwinding/libunwindstack/tests/
DDwarfSectionTest.cpp62 static RegsFake regs_; member in unwindstack::DwarfSectionTest
65 RegsFake DwarfSectionTest::regs_(10); member in unwindstack::DwarfSectionTest
84 ASSERT_FALSE(section_->Step(0x1000, &regs_, nullptr, &finished, &is_signal_frame)); in TEST_F()
99 ASSERT_FALSE(section_->Step(0x1000, &regs_, nullptr, &finished, &is_signal_frame)); in TEST_F()
113 EXPECT_CALL(*section_, Eval(&cie, &process, ::testing::_, &regs_, ::testing::_)) in TEST_F()
118 ASSERT_TRUE(section_->Step(0x1000, &regs_, &process, &finished, &is_signal_frame)); in TEST_F()
140 EXPECT_CALL(*section_, Eval(&cie, &process, ::testing::_, &regs_, ::testing::_)) in TEST_F()
145 ASSERT_TRUE(section_->Step(0x1000, &regs_, &process, &finished, &is_signal_frame)); in TEST_F()
146 ASSERT_TRUE(section_->Step(0x1000, &regs_, &process, &finished, &is_signal_frame)); in TEST_F()
147 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()
266 regs_.set_pc(0x1000); in TEST_F()
267 regs_.set_sp(0x10000); in TEST_F()
272 Unwinder unwinder(64, maps_.get(), &regs_, process_memory_); in TEST_F()
[all …]
DUnwindOfflineTest.cpp99 regs_.reset(regs); in Init()
105 regs_.reset(regs); in Init()
111 regs_.reset(regs); in Init()
117 regs_.reset(regs); in Init()
164 std::unique_ptr<Regs> regs_; member in unwindstack::UnwindOfflineTest
217 std::unique_ptr<Regs> regs_copy(regs_->Clone()); in TEST_F()
218 Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); in TEST_F()
258 Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); in TEST_F()
279 Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); in TEST_F()
320 std::unique_ptr<JitDebug> jit_debug = CreateJitDebug(regs_->Arch(), process_memory_); in TEST_F()
[all …]
/system/unwinding/libunwindstack/include/unwindstack/
DRegs.h99 : Regs(total_regs, return_loc), regs_(total_regs) {} in RegsImpl()
102 inline AddressType& operator[](size_t reg) { return regs_[reg]; }
104 void* RawData() override { return regs_.data(); } in RawData()
107 for (size_t i = 0; i < regs_.size(); ++i) { in IterateRegisters()
108 fn(std::to_string(i).c_str(), regs_[i]); in IterateRegisters()
113 std::vector<AddressType> regs_;
DUnwinder.h71 regs_(regs), in Unwinder()
102 regs_ = regs; in SetRegs()
103 arch_ = regs_ != nullptr ? regs->Arch() : ARCH_UNKNOWN; in SetRegs()
153 Regs* regs_; variable