pub struct Unit {
pub line_program: LineProgram,
pub ranges: RangeListTable,
pub locations: LocationListTable,
/* private fields */
}
Expand description
A unit’s debugging information.
Fields
line_program: LineProgram
The line number program for this unit.
ranges: RangeListTable
A table of range lists used by this unit.
locations: LocationListTable
A table of location lists used by this unit.
Implementations
sourceimpl Unit
impl Unit
sourcepub fn new(encoding: Encoding, line_program: LineProgram) -> Self
pub fn new(encoding: Encoding, line_program: LineProgram) -> Self
Create a new Unit
.
sourcepub fn address_size(&self) -> u8
pub fn address_size(&self) -> u8
Return the address size in bytes for this unit.
sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
Return the number of DebuggingInformationEntry
s created for this unit.
This includes entries that no longer have a parent.
sourcepub fn root(&self) -> UnitEntryId
pub fn root(&self) -> UnitEntryId
Return the id of the root entry.
sourcepub fn add(&mut self, parent: UnitEntryId, tag: DwTag) -> UnitEntryId
pub fn add(&mut self, parent: UnitEntryId, tag: DwTag) -> UnitEntryId
Add a new DebuggingInformationEntry
to this unit and return its id.
The parent
must be within the same unit.
Panics
Panics if parent
is invalid.
sourcepub fn get(&self, id: UnitEntryId) -> &DebuggingInformationEntry
pub fn get(&self, id: UnitEntryId) -> &DebuggingInformationEntry
sourcepub fn get_mut(&mut self, id: UnitEntryId) -> &mut DebuggingInformationEntry
pub fn get_mut(&mut self, id: UnitEntryId) -> &mut DebuggingInformationEntry
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more