pub struct FilterUnit<'a, R: Reader<Offset = usize>> {
pub read_unit: UnitRef<'a, R>,
pub read_skeleton_unit: Option<UnitRef<'a, R>>,
/* private fields */
}Expand description
The state for identifying which DIEs in a .debug_info unit
need to be converted.
This is created by FilterUnitSection::read_unit.
See FilterUnitSection for an example.
Fields§
§read_unit: UnitRef<'a, R>The unit being read.
read_skeleton_unit: Option<UnitRef<'a, R>>The skeleton unit being read if read_unit is a split unit.
Implementations§
Source§impl<'a, R: Reader<Offset = usize>> FilterUnit<'a, R>
impl<'a, R: Reader<Offset = usize>> FilterUnit<'a, R>
Sourcepub fn null_entry(&self) -> FilterUnitEntry<'a, R>
pub fn null_entry(&self) -> FilterUnitEntry<'a, R>
Return a null DIE for use with FilterUnit::read_entry.
Sourcepub fn read_entry(
&mut self,
entry: &mut FilterUnitEntry<'a, R>,
) -> ConvertResult<bool>
pub fn read_entry( &mut self, entry: &mut FilterUnitEntry<'a, R>, ) -> ConvertResult<bool>
Read the next DIE.
Returns false if the unit has no more DIEs.
This also records dependencies for the DIE:
- the DIE always depends on its parent
- the parent may depend on the DIE
- the DIE depends on any DIEs that are referenced by its attributes
The only task the user needs to perform is to call
FilterUnit::require_entry if the DIE is always required to be
converted. Typically, a DIE will be required if it has a valid address range.
Sourcepub fn require_entry(&mut self, offset: UnitOffset)
pub fn require_entry(&mut self, offset: UnitOffset)
Indicate that the DIE with the given offset is always required to be converted.
Typically, this will be called if the DIE has a valid address range.
This can only be called for offsets within the current unit.