class Value

Defined at line 18 of file ../../src/developer/debug/zxdb/symbols/value.h

A value is the base class for data with names:

- Variable: Globals, stack variables, and function parameters.

- DataMember: Struct, class, and union members, including static members.

Public Methods

const std::string & GetAssignedName ()

Symbol overrides.

Defined at line 23 of file ../../src/developer/debug/zxdb/symbols/value.h

void set_assigned_name (const std::string & n)

The name of the variable, parameter, or member name. See

Symbol::GetAssignedName().

Defined at line 27 of file ../../src/developer/debug/zxdb/symbols/value.h

const LazySymbol & type ()

May be incomplete for is_external() values.

Defined at line 30 of file ../../src/developer/debug/zxdb/symbols/value.h

void set_type (const LazySymbol & t)

Defined at line 31 of file ../../src/developer/debug/zxdb/symbols/value.h

bool is_external ()

External (DW_AT_external) data members are for static struct data members and extern global

variables. They don't have a location. To find these members, look up the full name in the

symbol index to get the actual non-external definition.

External values might also have different type information. An example is external arrays which

won't have a length, but the real definition will have the length. When dealing with external

data members, always use the type from the real definition.

Defined at line 40 of file ../../src/developer/debug/zxdb/symbols/value.h

void set_is_external (bool e)

Defined at line 41 of file ../../src/developer/debug/zxdb/symbols/value.h

bool artificial ()

Artificial values are ones generated by the compiler that don't appear in the source. The most

common example is "this" parameters to functions. Other examples are GCC-generated "__func__"

variables and the discriminant data member in a rust enum.

Defined at line 46 of file ../../src/developer/debug/zxdb/symbols/value.h

void set_artificial (bool a)

Defined at line 47 of file ../../src/developer/debug/zxdb/symbols/value.h

const ConstValue & const_value ()

The variable may have a constant value. If so, const_value().has_value() will be set and the

value will be contained within this ConstValue object.

Defined at line 51 of file ../../src/developer/debug/zxdb/symbols/value.h

void set_const_value (ConstValue cv)

Defined at line 52 of file ../../src/developer/debug/zxdb/symbols/value.h

Protected Methods

void Value (DwarfTag tag)

This could add the decl_file/line if we need it since normally such entries have this

information.

Defined at line 9 of file ../../src/developer/debug/zxdb/symbols/value.cc

void Value (DwarfTag tag, const std::string & assigned_name, LazySymbol type)

Defined at line 10 of file ../../src/developer/debug/zxdb/symbols/value.cc

void ~Value ()

Defined at line 12 of file ../../src/developer/debug/zxdb/symbols/value.cc

const Value * AsValue ()

Symbol protected overrides.

Defined at line 14 of file ../../src/developer/debug/zxdb/symbols/value.cc