Lines Matching refs:val
41 bool DfxMemory::ReadReg(int regIdx, uintptr_t *val) in ReadReg() argument
43 if (acc_ != nullptr && acc_->AccessReg(regIdx, val, ctx_) == UNW_ERROR_NONE) { in ReadReg()
49 bool DfxMemory::ReadMem(uintptr_t addr, uintptr_t *val) in ReadMem() argument
51 if (acc_ != nullptr && acc_->AccessMem(addr, val, ctx_) == UNW_ERROR_NONE) { in ReadMem()
57 size_t DfxMemory::Read(uintptr_t& addr, void* val, size_t size, bool incre) in Read() argument
61 if (val == nullptr || __builtin_add_overflow(tmpAddr, size, &maxSize)) { in Read()
77 … if (memcpy_s(val, copyBytes, reinterpret_cast<uint8_t*>(&valp) + alignBytes, copyBytes) != 0) { in Read()
81 val = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(val) + copyBytes); in Read()
87 …if (!ReadMem(tmpAddr, &tmpVal) || memcpy_s(val, sizeof(uintptr_t), &tmpVal, sizeof(uintptr_t)) != … in Read()
90 val = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(val) + sizeof(uintptr_t)); in Read()
96 if (!ReadMem(tmpAddr, &tmpVal) || memcpy_s(val, leftOver, &tmpVal, leftOver) != 0) { in Read()
108 bool DfxMemory::ReadU8(uintptr_t& addr, uint8_t *val, bool incre) in ReadU8() argument
110 if (Read(addr, val, sizeof(uint8_t), incre) == sizeof(uint8_t)) { in ReadU8()
116 bool DfxMemory::ReadU16(uintptr_t& addr, uint16_t *val, bool incre) in ReadU16() argument
118 if (Read(addr, val, sizeof(uint16_t), incre) == sizeof(uint16_t)) { in ReadU16()
124 bool DfxMemory::ReadU32(uintptr_t& addr, uint32_t *val, bool incre) in ReadU32() argument
126 if (Read(addr, val, sizeof(uint32_t), incre) == sizeof(uint32_t)) { in ReadU32()
132 bool DfxMemory::ReadU64(uintptr_t& addr, uint64_t *val, bool incre) in ReadU64() argument
134 if (Read(addr, val, sizeof(uint64_t), incre) == sizeof(uint64_t)) { in ReadU64()
140 bool DfxMemory::ReadUptr(uintptr_t& addr, uintptr_t *val, bool incre) in ReadUptr() argument
142 if (Read(addr, val, sizeof(uintptr_t), incre) == sizeof(uintptr_t)) { in ReadUptr()
181 bool DfxMemory::ReadPrel31(uintptr_t& addr, uintptr_t *val) in ReadPrel31() argument
188 *val = addr + offset; in ReadPrel31()
194 uint64_t val = 0; in ReadUleb128() local
202 val |= static_cast<uint64_t>(u8 & 0x7f) << shift; in ReadUleb128()
205 return val; in ReadUleb128()
210 uint64_t val = 0; in ReadSleb128() local
218 val |= static_cast<uint64_t>(byte & 0x7f) << shift; in ReadSleb128()
223 val |= (-1ULL) << shift; in ReadSleb128()
225 return static_cast<int64_t>(val); in ReadSleb128()
255 uintptr_t val = 0; in ReadEncodedValue() local
257 return val; in ReadEncodedValue()
260 return val; in ReadEncodedValue()
263 ReadUptr(addr, &val, true); in ReadEncodedValue()
264 return val; in ReadEncodedValue()
269 ReadUptr(addr, &val, true); in ReadEncodedValue()
270 return val; in ReadEncodedValue()
272 val = static_cast<uintptr_t>(ReadUleb128(addr)); in ReadEncodedValue()
275 val = static_cast<uintptr_t>(ReadSleb128(addr)); in ReadEncodedValue()
280 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
286 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
292 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
298 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
304 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
310 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
316 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
322 val = static_cast<uintptr_t>(tmp); in ReadEncodedValue()
332 val += startAddr; in ReadEncodedValue()
338 val += dataOffset_; in ReadEncodedValue()
341 val += funcOffset_; in ReadEncodedValue()
348 uintptr_t indirectAddr = val; in ReadEncodedValue()
349 ReadUptr(indirectAddr, &val, true); in ReadEncodedValue()
351 return val; in ReadEncodedValue()