LLVM
12.0.0git
|
A class that represents an address range. More...
#include "llvm/DebugInfo/GSYM/Range.h"
Public Member Functions | |
AddressRange () | |
AddressRange (uint64_t S, uint64_t E) | |
uint64_t | size () const |
bool | contains (uint64_t Addr) const |
bool | intersects (const AddressRange &R) const |
bool | operator== (const AddressRange &R) const |
bool | operator!= (const AddressRange &R) const |
bool | operator< (const AddressRange &R) const |
void | decode (DataExtractor &Data, uint64_t BaseAddr, uint64_t &Offset) |
AddressRange objects are encoded and decoded to be relative to a base address. More... | |
void | encode (FileWriter &O, uint64_t BaseAddr) const |
Static Public Member Functions | |
static void | skip (DataExtractor &Data, uint64_t &Offset) |
Skip an address range object in the specified data a the specified offset. More... | |
Public Attributes | |
uint64_t | Start |
uint64_t | End |
A class that represents an address range.
The range is specified using a start and an end address.
|
inline |
|
inline |
Definition at line 39 of file Range.h.
References Addr, End, and Start.
Referenced by convertFunctionLineTable(), and llvm::gsym::FunctionInfo::lookup().
void AddressRange::decode | ( | DataExtractor & | Data, |
uint64_t | BaseAddr, | ||
uint64_t & | Offset | ||
) |
AddressRange objects are encoded and decoded to be relative to a base address.
This will be the FunctionInfo's start address if the AddressRange is directly contained in a FunctionInfo, or a base address of the containing parent AddressRange or AddressRanges. This allows address ranges to be efficiently encoded using ULEB128 encodings as we encode the offset and size of each range instead of full addresses. This also makes encoded addresses easy to relocate as we just need to relocate one base address.
Definition at line 86 of file Range.cpp.
References llvm::Data, End, Offset, llvm::Check::Size, and Start.
void AddressRange::encode | ( | FileWriter & | O, |
uint64_t | BaseAddr | ||
) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 38 of file Range.h.
Referenced by llvm::gsym::AddressRanges::contains(), encode(), llvm::gsym::AddressRanges::insert(), llvm::gsym::FunctionInfo::lookup(), and llvm::gsym::FunctionInfo::size().
|
static |
Skip an address range object in the specified data a the specified offset.
Data | The binary stream to read the data from. |
Offset | The byte offset within Data. |
Definition at line 114 of file Range.cpp.
References llvm::Data, and Offset.
Referenced by llvm::gsym::AddressRanges::skip().
uint64_t llvm::gsym::AddressRange::End |
Definition at line 35 of file Range.h.
Referenced by contains(), llvm::gsym::AddressRanges::contains(), decode(), llvm::gsym::FunctionInfo::decode(), llvm::gsym::FunctionInfo::endAddress(), llvm::gsym::AddressRanges::insert(), intersects(), llvm::gsym::FunctionInfo::lookup(), operator<(), operator==(), llvm::gsym::FunctionInfo::setEndAddress(), llvm::gsym::FunctionInfo::setSize(), and size().
uint64_t llvm::gsym::AddressRange::Start |
Definition at line 34 of file Range.h.
Referenced by contains(), llvm::gsym::AddressRanges::contains(), convertFunctionLineTable(), decode(), llvm::gsym::FunctionInfo::decode(), encode(), llvm::gsym::FunctionInfo::encode(), llvm::gsym::AddressRanges::insert(), intersects(), llvm::gsym::FunctionInfo::lookup(), operator<(), operator==(), llvm::gsym::FunctionInfo::setSize(), llvm::gsym::FunctionInfo::setStartAddress(), size(), and llvm::gsym::FunctionInfo::startAddress().