class AddressRange

Defined at line 22 of file ../../src/developer/debug/shared/address_range.h

Represents a range of addresses with common operations.

Since end() is one-past-the-end, we technically can't represent the last byte in the address

space. It might be better to change this class to be (begin, size) to avoid this problem but

that's a difficult change.

Public Methods

AddressRange Union (const AddressRange & other)

Implemented out-of-line to avoid bringing

<algorithm

> into all headers that use address_range.h.

Defined at line 14 of file ../../src/developer/debug/shared/address_range.cc

std::string ToString ()

Returns a string representing this set of ranges for debugging purposes.

Defined at line 22 of file ../../src/developer/debug/shared/address_range.cc

void AddressRange ()

Defined at line 24 of file ../../src/developer/debug/shared/address_range.h

void AddressRange (uint64_t begin, uint64_t end)

Defined at line 25 of file ../../src/developer/debug/shared/address_range.h

AddressRange Everything ()

Returns an address range covering the entire address space. Since our end() is one-past-the

end, it won't technically cover the last byte.

Defined at line 31 of file ../../src/developer/debug/shared/address_range.h

uint64_t begin ()

Defined at line 35 of file ../../src/developer/debug/shared/address_range.h

uint64_t end ()

Defined at line 36 of file ../../src/developer/debug/shared/address_range.h

uint64_t size ()

Defined at line 38 of file ../../src/developer/debug/shared/address_range.h

bool empty ()

Defined at line 39 of file ../../src/developer/debug/shared/address_range.h

bool InRange (uint64_t addr)

Defined at line 41 of file ../../src/developer/debug/shared/address_range.h

bool Contains (const AddressRange & other)

Callers need to consider the semantics they want for empty ranges.

An empty range whose start and end are within this range is considered to Contain/Overlap

this one. If you want to consider empty ranges as being unoverlapping with anything you will

need to perform an extra check.

Defined at line 48 of file ../../src/developer/debug/shared/address_range.h

bool Overlaps (const AddressRange & other)

Defined at line 51 of file ../../src/developer/debug/shared/address_range.h

bool OverlapsOrAdjacent (const AddressRange & other)

Defined at line 54 of file ../../src/developer/debug/shared/address_range.h

bool operator== (const AddressRange & other)

Defined at line 63 of file ../../src/developer/debug/shared/address_range.h

bool operator!= (const AddressRange & other)

Defined at line 66 of file ../../src/developer/debug/shared/address_range.h

void Serialize (Serializer & ser, uint32_t ver)

Defined at line 71 of file ../../src/developer/debug/shared/address_range.h