diff options
Diffstat (limited to 'rust/examples')
| -rw-r--r-- | rust/examples/dwarf/dwarf_import/src/types.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/rust/examples/dwarf/dwarf_import/src/types.rs b/rust/examples/dwarf/dwarf_import/src/types.rs index 35794e36..19b38a90 100644 --- a/rust/examples/dwarf/dwarf_import/src/types.rs +++ b/rust/examples/dwarf/dwarf_import/src/types.rs @@ -269,6 +269,29 @@ pub(crate) fn get_type<R: ReaderType>( None } } + } else if let Some(die_reference) = get_attr_die( + dwarf, + unit, + entry, + debug_info_builder_context, + constants::DW_AT_abstract_origin, + ) { + // This needs to recurse first (before the early return below) to ensure all sub-types have been parsed + match die_reference { + DieReference::UnitAndOffset((dwarf, entry_unit, entry_offset)) => { + get_type( + dwarf, + entry_unit, + &entry_unit.entry(entry_offset).unwrap(), + debug_info_builder_context, + debug_info_builder, + ) + } + DieReference::Err => { + warn!("Failed to fetch DIE when getting type through DW_AT_abstract_origin. Debug information may be incomplete."); + None + } + } } else { // This needs to recurse first (before the early return below) to ensure all sub-types have been parsed match resolve_specification(dwarf, unit, entry, debug_info_builder_context) { |
