LLVM  10.0.0svn
Public Member Functions | Public Attributes | List of all members
llvm::gsym::AddressRange Struct Reference

A class that represents an address range. More...

#include "llvm/DebugInfo/GSYM/Range.h"

Collaboration diagram for llvm::gsym::AddressRange:
Collaboration graph
[legend]

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
 

Public Attributes

uint64_t Start
 
uint64_t End
 

Detailed Description

A class that represents an address range.

The range is specified using a start and an end address.

Definition at line 32 of file Range.h.

Constructor & Destructor Documentation

◆ AddressRange() [1/2]

llvm::gsym::AddressRange::AddressRange ( )
inline

Definition at line 35 of file Range.h.

◆ AddressRange() [2/2]

llvm::gsym::AddressRange::AddressRange ( uint64_t  S,
uint64_t  E 
)
inline

Definition at line 36 of file Range.h.

Member Function Documentation

◆ contains()

bool llvm::gsym::AddressRange::contains ( uint64_t  Addr) const
inline

Definition at line 38 of file Range.h.

References End.

Referenced by llvm::gsym::AddressRanges::empty().

◆ decode()

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 76 of file Range.cpp.

References llvm::DataExtractor::getULEB128(), and Size.

Referenced by llvm::gsym::AddressRanges::end(), and operator<().

◆ encode()

void AddressRange::encode ( FileWriter O,
uint64_t  BaseAddr 
) const

Definition at line 70 of file Range.cpp.

References assert().

Referenced by llvm::gsym::AddressRanges::end(), and operator<().

◆ intersects()

bool llvm::gsym::AddressRange::intersects ( const AddressRange R) const
inline

Definition at line 39 of file Range.h.

References End, and Start.

◆ operator!=()

bool llvm::gsym::AddressRange::operator!= ( const AddressRange R) const
inline

Definition at line 46 of file Range.h.

◆ operator<()

bool llvm::gsym::AddressRange::operator< ( const AddressRange R) const
inline

◆ operator==()

bool llvm::gsym::AddressRange::operator== ( const AddressRange R) const
inline

Definition at line 43 of file Range.h.

References End, and Start.

◆ size()

uint64_t llvm::gsym::AddressRange::size ( ) const
inline

Member Data Documentation

◆ End

uint64_t llvm::gsym::AddressRange::End

◆ Start

uint64_t llvm::gsym::AddressRange::Start

The documentation for this struct was generated from the following files: