(
unit: UnitRef<'a, Reader<'r>>,
die_ref: &AttributeValue<Reader<'r>>,
)
| 49 | } |
| 50 | |
| 51 | pub fn resolve_die_ref<'a, 'r>( |
| 52 | unit: UnitRef<'a, Reader<'r>>, |
| 53 | die_ref: &AttributeValue<Reader<'r>>, |
| 54 | ) -> Result<Option<write::ConvertUnitEntry<'a, Reader<'r>>>, Error> { |
| 55 | let die = match die_ref { |
| 56 | AttributeValue::UnitRef(unit_offs) => { |
| 57 | Some(write::ConvertUnitEntry::read(unit, *unit_offs)?) |
| 58 | } |
| 59 | // TODO-DebugInfo: support AttributeValue::DebugInfoRef. The trouble is that we don't have |
| 60 | // a fast way to go from a DI offset to a unit offset (which is needed to parse the DIE). |
| 61 | // We would likely need to maintain a cache. |
| 62 | _ => None, |
| 63 | }; |
| 64 | Ok(die) |
| 65 | } |
no test coverage detected