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