pub struct Expression { /* private fields */ }
Expand description

The bytecode for a DWARF expression or location description.

Implementations

Create an expression from the input expression.

Create an empty expression.

Create an expression from raw bytecode.

This does not support operations that require references, such as DW_OP_addr.

Add an operation to the expression.

This should only be used for operations that have no explicit operands.

Add a DW_OP_addr operation to the expression.

Add a DW_OP_constu operation to the expression.

This may be emitted as a smaller equivalent operation.

Add a DW_OP_consts operation to the expression.

This may be emitted as a smaller equivalent operation.

Add a DW_OP_const_type or DW_OP_GNU_const_type operation to the expression.

Add a DW_OP_fbreg operation to the expression.

Add a DW_OP_bregx operation to the expression.

This may be emitted as a smaller equivalent operation.

Add a DW_OP_regval_type or DW_OP_GNU_regval_type operation to the expression.

This may be emitted as a smaller equivalent operation.

Add a DW_OP_pick operation to the expression.

This may be emitted as a DW_OP_dup or DW_OP_over operation.

Add a DW_OP_deref operation to the expression.

Add a DW_OP_xderef operation to the expression.

Add a DW_OP_deref_size operation to the expression.

Add a DW_OP_xderef_size operation to the expression.

Add a DW_OP_deref_type or DW_OP_GNU_deref_type operation to the expression.

Add a DW_OP_xderef_type operation to the expression.

Add a DW_OP_plus_uconst operation to the expression.

Add a DW_OP_skip operation to the expression.

Returns the index of the operation. The caller must call set_target with this index to set the target of the branch.

Add a DW_OP_bra operation to the expression.

Returns the index of the operation. The caller must call set_target with this index to set the target of the branch.

Return the index that will be assigned to the next operation.

This can be passed to set_target.

Set the target of a DW_OP_skip or DW_OP_bra operation .

Add a DW_OP_call4 operation to the expression.

Add a DW_OP_call_ref operation to the expression.

Add a DW_OP_convert or DW_OP_GNU_convert operation to the expression.

base is the DIE of the base type, or None for the generic type.

Add a DW_OP_reinterpret or DW_OP_GNU_reinterpret operation to the expression.

base is the DIE of the base type, or None for the generic type.

source

pub fn op_entry_value(&mut self, expression: Expression)

Add a DW_OP_entry_value or DW_OP_GNU_entry_value operation to the expression.

Add a DW_OP_regx operation to the expression.

This may be emitted as a smaller equivalent operation.

Add a DW_OP_implicit_value operation to the expression.

Add a DW_OP_implicit_pointer or DW_OP_GNU_implicit_pointer operation to the expression.

Add a DW_OP_piece operation to the expression.

Add a DW_OP_bit_piece operation to the expression.

Add a DW_OP_GNU_parameter_ref operation to the expression.

Add a DW_OP_WASM_location 0x0 operation to the expression.

Add a DW_OP_WASM_location 0x1 operation to the expression.

Add a DW_OP_WASM_location 0x2 operation to the expression.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.