LLVM API Documentation
#include <MemoryObject.h>
Public Member Functions | |
| virtual | ~MemoryObject () |
| Destructor - Override as necessary. | |
| virtual uintptr_t | getBase () const =0 |
| virtual uintptr_t | getExtent () const =0 |
| virtual int | readByte (uintptr_t address, uint8_t *ptr) const =0 |
| virtual uintptr_t | readBytes (uintptr_t address, uintptr_t size, uint8_t *buf) const |
Definition at line 20 of file MemoryObject.h.
| virtual llvm::MemoryObject::~MemoryObject | ( | ) | [inline, virtual] |
| virtual uintptr_t llvm::MemoryObject::getBase | ( | ) | const [pure virtual] |
getBase - Returns the lowest valid address in the region.
Referenced by readBytes().
| virtual uintptr_t llvm::MemoryObject::getExtent | ( | ) | const [pure virtual] |
getExtent - Returns the size of the region in bytes. (The region is contiguous, so the highest valid address of the region is getBase() + getExtent() - 1).
Referenced by readBytes().
| virtual int llvm::MemoryObject::readByte | ( | uintptr_t | address, | |
| uint8_t * | ptr | |||
| ) | const [pure virtual] |
readByte - Tries to read a single byte from the region.
| address | - The address of the byte, in the same space as getBase(). | |
| ptr | - A pointer to a byte to be filled in. Must be non-NULL. |
Referenced by readBytes().
| virtual uintptr_t llvm::MemoryObject::readBytes | ( | uintptr_t | address, | |
| uintptr_t | size, | |||
| uint8_t * | buf | |||
| ) | const [inline, virtual] |
readByte - Tries to read a contiguous range of bytes from the region, up to the end of the region. You should override this function if there is a quicker way than going back and forth with individual bytes.
| address | - The address of the first byte, in the same space as getBase(). | |
| size | - The maximum number of bytes to copy. | |
| buf | - A pointer to a buffer to be filled in. Must be non-NULL and large enough to hold size bytes. |
Definition at line 60 of file MemoryObject.h.
References getBase(), getExtent(), and readByte().