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: LineProgramThe line number program for this unit.
ranges: RangeListTableA table of range lists used by this unit.
locations: LocationListTableA table of location lists used by this unit.
Implementations§
Source§impl 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 DebuggingInformationEntrys 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 Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnwindSafe for Unit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more