class FoundMember

Defined at line 25 of file ../../src/developer/debug/zxdb/expr/found_member.h

The result of finding a member in a collection.

This class consists of a DataMember and how to find it from a given class.

To actually resolve the value when the data_member is not static, the containing object needs to

be known. Typically one would have an object, find a member on it (producing a FoundMember), and

then use that object and the FoundMember to resolve its value.

If the data member is static data_member()->is_external() will be set.

Public Methods

void FoundMember ()

Defined at line 9 of file ../../src/developer/debug/zxdb/expr/found_member.cc

void FoundMember (const Collection * collection, const DataMember * data_member)

Constructs from a data member on a class with no inheritance. This means the DataMember must be

a direct member of the collection it's referring to.

The collection can be null for static data members.

Defined at line 11 of file ../../src/developer/debug/zxdb/expr/found_member.cc

void FoundMember (InheritancePath path, const DataMember * data_member)

Constructs from a data member and an object path.

Defined at line 14 of file ../../src/developer/debug/zxdb/expr/found_member.cc

void ~FoundMember ()

Defined at line 17 of file ../../src/developer/debug/zxdb/expr/found_member.cc

std::optional<uint32_t> GetDataMemberOffset ()

Helper to extract the offset of the data member in the class. This can fail if there is virtual

inheritance or the data member is static (in both cases the data member isn't at a fixed

offset from the collection).

Defined at line 19 of file ../../src/developer/debug/zxdb/expr/found_member.cc

bool is_null ()

Defined at line 40 of file ../../src/developer/debug/zxdb/expr/found_member.h

const InheritancePath & object_path ()

The inheritance path is used to find the member data only for nonstatic members.

Static members will have data_member()->is_external() set and the expression will not depend on

the object. In this case, the object_path() will be empty.

This path can contain synthetic items not strictly in the inheritance tree in the case of

anonymous structs or unions. An InheritedFrom object will be synthesized to represent the

offset of the anonymous struct/union in its enclosing collection.

Defined at line 50 of file ../../src/developer/debug/zxdb/expr/found_member.h

const DataMember * data_member ()

Variable member of the object_var_ that this class represents. Can be null to represent

"not found". Check is_null().

NOTE: that this DataMember isn't necessarily a member of the original object that was queried.

It could be on a base class. In this case, the offset specified on the DataMember data member

will be incorrect since it refers to the offset within its enclosing class. Therefore, one

should always use the data_member_offset_ below.

Defined at line 59 of file ../../src/developer/debug/zxdb/expr/found_member.h

fxl::RefPtr<DataMember> data_member_ref ()

Defined at line 60 of file ../../src/developer/debug/zxdb/expr/found_member.h