Struct gimli::write::UnitTable [−][src]
A table of units that will be stored in the .debug_info
section.
Implementations
impl UnitTable
[src]
pub fn from<R: Reader<Offset = usize>>(
dwarf: &Dwarf<R>,
line_strings: &mut LineStringTable,
strings: &mut StringTable,
convert_address: &dyn Fn(u64) -> Option<Address>
) -> ConvertResult<UnitTable>
[src]
dwarf: &Dwarf<R>,
line_strings: &mut LineStringTable,
strings: &mut StringTable,
convert_address: &dyn Fn(u64) -> Option<Address>
) -> ConvertResult<UnitTable>
Create a unit table by reading the data in the given sections.
This also updates the given tables with the values that are referenced from attributes in this section.
convert_address
is a function to convert read addresses into the Address
type. For non-relocatable addresses, this function may simply return
Address::Constant(address)
. For relocatable addresses, it is the caller’s
responsibility to determine the symbol and addend corresponding to the address
and return Address::Symbol { symbol, addend }
.
impl UnitTable
[src]
pub fn add(&mut self, unit: Unit) -> UnitId
[src]
Create a new unit and add it to the table.
address_size
must be in bytes.
Returns the UnitId
of the new unit.
pub fn count(&self) -> usize
[src]
Return the number of units.
pub fn id(&self, index: usize) -> UnitId
[src]
pub fn get(&self, id: UnitId) -> &Unit
[src]
pub fn get_mut(&mut self, id: UnitId) -> &mut Unit
[src]
pub fn write<W: Writer>(
&mut self,
sections: &mut Sections<W>,
line_strings: &DebugLineStrOffsets,
strings: &DebugStrOffsets
) -> Result<DebugInfoOffsets>
[src]
&mut self,
sections: &mut Sections<W>,
line_strings: &DebugLineStrOffsets,
strings: &DebugStrOffsets
) -> Result<DebugInfoOffsets>
Write the units to the given sections.
strings
must contain the .debug_str
offsets of the corresponding
StringTable
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UnitTable
impl Send for UnitTable
impl Sync for UnitTable
impl Unpin for UnitTable
impl UnwindSafe for UnitTable
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,