Lines Matching refs:addr
33 extern "C" int my_dladdr(const void* addr, Dl_info *info);
114 uint8_t get8(pint_t addr) { in get8() argument
116 memcpy(&val, (void *)addr, sizeof(val)); in get8()
119 uint16_t get16(pint_t addr) { in get16() argument
121 memcpy(&val, (void *)addr, sizeof(val)); in get16()
124 uint32_t get32(pint_t addr) { in get32() argument
126 memcpy(&val, (void *)addr, sizeof(val)); in get32()
129 uint64_t get64(pint_t addr) { in get64() argument
131 memcpy(&val, (void *)addr, sizeof(val)); in get64()
134 double getDouble(pint_t addr) { in getDouble() argument
136 memcpy(&val, (void *)addr, sizeof(val)); in getDouble()
139 v128 getVector(pint_t addr) { in getVector() argument
141 memcpy(&val, (void *)addr, sizeof(val)); in getVector()
144 uintptr_t getP(pint_t addr);
145 static uint64_t getULEB128(pint_t &addr, pint_t end);
146 static int64_t getSLEB128(pint_t &addr, pint_t end);
148 pint_t getEncodedP(pint_t &addr, pint_t end, uint8_t encoding);
149 bool findFunctionName(pint_t addr, char *buf, size_t bufLen,
157 inline uintptr_t LocalAddressSpace::getP(pint_t addr) { in getP() argument
159 return get64(addr); in getP()
161 return get32(addr); in getP()
166 inline uint64_t LocalAddressSpace::getULEB128(pint_t &addr, pint_t end) { in getULEB128() argument
167 const uint8_t *p = (uint8_t *)addr; in getULEB128()
186 addr = (pint_t) p; in getULEB128()
191 inline int64_t LocalAddressSpace::getSLEB128(pint_t &addr, pint_t end) { in getSLEB128() argument
192 const uint8_t *p = (uint8_t *)addr; in getSLEB128()
207 addr = (pint_t) p; in getSLEB128()
211 inline LocalAddressSpace::pint_t LocalAddressSpace::getEncodedP(pint_t &addr, in getEncodedP() argument
214 pint_t startAddr = addr; in getEncodedP()
215 const uint8_t *p = (uint8_t *)addr; in getEncodedP()
221 result = getP(addr); in getEncodedP()
223 addr = (pint_t) p; in getEncodedP()
226 result = (pint_t)getULEB128(addr, end); in getEncodedP()
229 result = get16(addr); in getEncodedP()
231 addr = (pint_t) p; in getEncodedP()
234 result = get32(addr); in getEncodedP()
236 addr = (pint_t) p; in getEncodedP()
239 result = (pint_t)get64(addr); in getEncodedP()
241 addr = (pint_t) p; in getEncodedP()
244 result = (pint_t)getSLEB128(addr, end); in getEncodedP()
248 result = (pint_t)(int16_t)get16(addr); in getEncodedP()
250 addr = (pint_t) p; in getEncodedP()
254 result = (pint_t)(int32_t)get32(addr); in getEncodedP()
256 addr = (pint_t) p; in getEncodedP()
259 result = (pint_t)get64(addr); in getEncodedP()
261 addr = (pint_t) p; in getEncodedP()
314 static inline bool _dyld_find_unwind_sections(void* addr, in _dyld_find_unwind_sections() argument
318 if (!dladdr(addr, &dlinfo)) in _dyld_find_unwind_sections()
384 inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf, in findFunctionName() argument
389 if (dladdr((void *)addr, &dyldInfo)) { in findFunctionName()
392 *offset = (addr - (pint_t) dyldInfo.dli_saddr); in findFunctionName()
415 uint8_t get8(pint_t addr);
416 uint16_t get16(pint_t addr);
417 uint32_t get32(pint_t addr);
418 uint64_t get64(pint_t addr);
419 pint_t getP(pint_t addr);
420 uint64_t getULEB128(pint_t &addr, pint_t end);
421 int64_t getSLEB128(pint_t &addr, pint_t end);
422 pint_t getEncodedP(pint_t &addr, pint_t end, uint8_t encoding);
423 bool findFunctionName(pint_t addr, char *buf, size_t bufLen,
428 void *localCopy(pint_t addr);
433 template <typename P> uint8_t OtherAddressSpace<P>::get8(pint_t addr) { in get8() argument
434 return *((uint8_t *)localCopy(addr)); in get8()
437 template <typename P> uint16_t OtherAddressSpace<P>::get16(pint_t addr) { in get16() argument
438 return P::E::get16(*(uint16_t *)localCopy(addr)); in get16()
441 template <typename P> uint32_t OtherAddressSpace<P>::get32(pint_t addr) { in get32() argument
442 return P::E::get32(*(uint32_t *)localCopy(addr)); in get32()
445 template <typename P> uint64_t OtherAddressSpace<P>::get64(pint_t addr) { in get64() argument
446 return P::E::get64(*(uint64_t *)localCopy(addr)); in get64()
450 typename P::uint_t OtherAddressSpace<P>::getP(pint_t addr) { in getP() argument
451 return P::getP(*(uint64_t *)localCopy(addr)); in getP()
455 uint64_t OtherAddressSpace<P>::getULEB128(pint_t &addr, pint_t end) { in getULEB128() argument
456 uintptr_t size = (end - addr); in getULEB128()
457 LocalAddressSpace::pint_t laddr = (LocalAddressSpace::pint_t) localCopy(addr); in getULEB128()
460 addr += (laddr - sladdr); in getULEB128()
465 int64_t OtherAddressSpace<P>::getSLEB128(pint_t &addr, pint_t end) { in getSLEB128() argument
466 uintptr_t size = (end - addr); in getSLEB128()
467 LocalAddressSpace::pint_t laddr = (LocalAddressSpace::pint_t) localCopy(addr); in getSLEB128()
470 addr += (laddr - sladdr); in getSLEB128()
474 template <typename P> void *OtherAddressSpace<P>::localCopy(pint_t addr) { in localCopy() argument
479 bool OtherAddressSpace<P>::findFunctionName(pint_t addr, char *buf, in findFunctionName() argument