class VariableLocation

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

Describes the location of a value. A value can be in different locations depending on what the

value of the IP is at which is represented as a series of ranges. The location for the value

within those ranges is described as an opaque array of bytes (this is the DWARF expression which

will evaluate to the value).

In DWARF, simple variables that are always valid look like this:

DW_AT_location (DW_OP_reg5 RDI)

Complicated ones with ranges look like this:

DW_AT_location:

[0x00000000000ad6be, 0x00000000000ad6c8): DW_OP_reg2 RCX

[0x00000000000ad6c8, 0x00000000000ad780): DW_OP_reg14 R14

Public Methods

void VariableLocation ()

Defined at line 17 of file ../../src/developer/debug/zxdb/symbols/variable_location.cc

void VariableLocation (DwarfExpr expr)

Constructs a Location with a single default expression.

Defined at line 19 of file ../../src/developer/debug/zxdb/symbols/variable_location.cc

void VariableLocation (std::vector<Entry> locations, std::optional<DwarfExpr> default_expr)

Constructs with an extracted array of Entries and an optional default expression that applies

when no other one does.

Defined at line 21 of file ../../src/developer/debug/zxdb/symbols/variable_location.cc

void ~VariableLocation ()

Defined at line 25 of file ../../src/developer/debug/zxdb/symbols/variable_location.cc

const DwarfExpr * ExprForIP (const SymbolContext & symbol_context, uint64_t ip)

Returns the expression that applies to the given IP, or nullptr if none matched.

Defined at line 27 of file ../../src/developer/debug/zxdb/symbols/variable_location.cc

bool is_null ()

Returns whether this location lacks any actual locations.

Defined at line 58 of file ../../src/developer/debug/zxdb/symbols/variable_location.h

const std::vector<Entry> & locations ()

Defined at line 60 of file ../../src/developer/debug/zxdb/symbols/variable_location.h

const DwarfExpr * default_expr ()

DWARF can express a "default" location that applies when none of the other location ranges

match. The return value will be null if there is no default.

Defined at line 64 of file ../../src/developer/debug/zxdb/symbols/variable_location.h

Records