class TaggedData

Defined at line 17 of file ../../src/developer/debug/zxdb/common/tagged_data.h

A data buffer with per-byte tags for validity. This allows us to express that certain bytes may

be valid while others might be unknown. This can happen for optimized code where, for example,

some portions of a struct are kept in registers so can be known, but other portions of the struct

are optimized out.

Public Methods

void TaggedData (DataBuffer bytes)

Constructs a buffer of entirely valid data. To construct one with different regions of valid

and invalid, use the TaggedDataBuilder.

Defined at line 15 of file ../../src/developer/debug/zxdb/common/tagged_data.cc

bool RangeIsEntirely (size_t begin, size_t length, Tag tag)

Returns true if the given range (which is asserted to be valid) satisfies the condition.

Defined at line 28 of file ../../src/developer/debug/zxdb/common/tagged_data.cc

const DataBuffer & bytes ()

Defined at line 31 of file ../../src/developer/debug/zxdb/common/tagged_data.h

bool RangeIsValid (size_t begin, size_t length)

Defined at line 42 of file ../../src/developer/debug/zxdb/common/tagged_data.h

bool RangeContains (size_t begin, size_t length, Tag tag)

Defined at line 42 of file ../../src/developer/debug/zxdb/common/tagged_data.cc

size_t size ()

Defined at line 46 of file ../../src/developer/debug/zxdb/common/tagged_data.h

bool empty ()

Defined at line 47 of file ../../src/developer/debug/zxdb/common/tagged_data.h

bool all_valid ()

Returns true if the entire buffer is valid.

Defined at line 53 of file ../../src/developer/debug/zxdb/common/tagged_data.h

bool operator== (const TaggedData & other)

Defined at line 56 of file ../../src/developer/debug/zxdb/common/tagged_data.cc

bool operator!= (const TaggedData & other)

Defined at line 60 of file ../../src/developer/debug/zxdb/common/tagged_data.cc

std::optional<TaggedData> Extract (size_t offset, size_t length)

Extracts a subrange of the buffer. Returns nullopt if the range falls outside of the data

range.

Defined at line 62 of file ../../src/developer/debug/zxdb/common/tagged_data.cc

std::string ToString ()

Defined at line 78 of file ../../src/developer/debug/zxdb/common/tagged_data.cc

Enumerations

enum Tag
Name Value
kValid 0
kUnknown 1

Defined at line 19 of file ../../src/developer/debug/zxdb/common/tagged_data.h

Friends

class TaggedDataBuilder