class DwarfExpr

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

Represents a DWARF expression. This is a list of bytes that encodes a simple stack machine.

This expression can also reference other parts of the symbols so the symbol associated with

it is also stored.

These expressions are evaluated by the DwarfExprEval.

Public Methods

std::optional<uint64_t> GetAddrBase ()

Returns the DW_AT_addr_base attribute associated with this expression. It will be on the

compilation unit associated with the source of the expression.

This attribute points to the beginning of the compilation unit's contribution to the

.debug_addr section of the module.

Returns a nullopt if there is none (either the source isn't known or the unit has no addr base

attribute).

Defined at line 11 of file ../../src/developer/debug/zxdb/symbols/dwarf_expr.cc

void DwarfExpr ()

Defined at line 25 of file ../../src/developer/debug/zxdb/symbols/dwarf_expr.h

void DwarfExpr (std::vector<uint8_t> data, UncachedLazySymbol source)

The source can be an empty UncachedLazySymbol if there is no corresponding source symbol for

this expression. This should only be the case for tests. This will mean calls to GetAddrBase()

will fail.

The symbol needs to be uncached because this is normally used as a back-reference. A variable

would have one or more expressions indicating its location, and the expression would refer back

to the variable. Using an uncached symbol prevents reference cycles.

Defined at line 34 of file ../../src/developer/debug/zxdb/symbols/dwarf_expr.h

bool empty ()

Defined at line 37 of file ../../src/developer/debug/zxdb/symbols/dwarf_expr.h

const std::vector<uint8_t> & data ()

Defined at line 39 of file ../../src/developer/debug/zxdb/symbols/dwarf_expr.h

const UncachedLazySymbol & source ()

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