Struct gimli::Evaluation [] [src]

pub struct Evaluation<'context, 'input, Endian, Context> where Endian: 'context + Endianity,
        Context: 'context + EvaluationContext<'input>,
        'input: 'context
{ /* fields omitted */ }

A DWARF expression evaluator.

Methods

impl<'context, 'input, Endian, Context> Evaluation<'context, 'input, Endian, Context> where Endian: 'context + Endianity,
        Context: EvaluationContext<'input>,
        'input: 'context
[src]

Create a new DWARF expression evaluator.

The new evaluator is created without an initial value, without an object address, and without a maximum number of iterations.

Set an initial value to be pushed on the DWARF expression evaluator's stack. This can be used in cases like DW_AT_vtable_elem_location, which require a value on the stack before evaluation commences. If no initial value is set, and the expression uses an opcode requiring the initial value, then evaluation will fail with an error.

Set the enclosing object's address, as used by DW_OP_push_object_address. If no object address is set, and the expression uses an opcode requiring the object address, then evaluation will fail with an error.

Set the maximum number of iterations to be allowed by the expression evaluator.

An iteration corresponds approximately to the evaluation of a single operation in an expression ("approximately" because the implementation may allow two such operations in some cases). The default is not to have a maximum; once set, it's not possible to go back to this default state. This value can be set to avoid denial of service attacks by bad DWARF bytecode.

Evaluate a DWARF expression. If successful, the result will hold a vector of pieces, each describing a part of the final object.

Trait Implementations

impl<'context, 'input, Endian: Debug, Context: Debug> Debug for Evaluation<'context, 'input, Endian, Context> where Endian: 'context + Endianity,
        Context: 'context + EvaluationContext<'input>,
        'input: 'context
[src]

Formats the value using the given formatter.