Struct rust_debug::variable::Variable[][src]

pub struct Variable<R: Reader<Offset = usize>> {
    pub name: Option<String>,
    pub value: EvaluatorValue<R>,
    pub source: Option<SourceInformation>,
}
Expand description

Defines what debug information a variable has.

Fields

name: Option<String>

The name of the variable.

value: EvaluatorValue<R>

A tree strucured like the variable type in DWARF, but it also contains the values

source: Option<SourceInformation>

The source code location where the variable was declared.

Implementations

Retrieve the variables debug information.

Description:

  • dwarf - A reference to gimli-rs Dwarf struct.
  • registers - A reference to the Registers struct.
  • memory - A reference to a struct that implements the MemoryAccess trait.
  • section_offset - A offset to the compilation unit where the DIE for the variable is located.
  • unit_offset - A offset into the compilation unit where the DIE representing the variable is located.
  • frame_base - The value of the frame base, which is often needed to evaluate the variable.
  • cwd - The work directory of the program being debugged.

This function will go through the DIE in the compilation unit to find the necessary debug information. Then it will use that information to evaluate the value of the variable.

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

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.