pub fn find_variable_source_information<R: Reader<Offset = usize>>(
dwarf: &Dwarf<R>,
unit: &Unit<R>,
die: &DebuggingInformationEntry<'_, '_, R>,
cwd: &str,
) -> Result<SourceInformation>
Expand description
Retrieve the variables source location where it was declared.
Description:
dwarf
- A reference to gimli-rsDwarf
struct.unit
- A reference to gimli-rsUnit
struct, which the given DIE is located in.die
- A reference to DIE.cwd
- The work directory of the debugged program.
This function will retrieve the source code location where the variable was declared.
The information is retrieved from the attributes starting with DW_AT_decl_
in the given DIE,
or in the DIE found in the attribute DW_AT_abstract_origin
.