pub struct UnitTable { /* private fields */ }
Expand description

A table of units that will be stored in the .debug_info section.

Implementations

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 }.

Create a new unit and add it to the table.

address_size must be in bytes.

Returns the UnitId of the new unit.

Return the number of units.

Return the id of a unit.

Panics

Panics if index >= self.count().

Get a reference to a unit.

Panics

Panics if id is invalid.

Get a mutable reference to a unit.

Panics

Panics if id is invalid.

Write the units to the given sections.

strings must contain the .debug_str offsets of the corresponding StringTable.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.