Struct gimli::read::CommonInformationEntry
source · pub struct CommonInformationEntry<R, Offset = <R as Reader>::Offset>where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,{
offset: Offset,
length: Offset,
format: Format,
version: u8,
augmentation: Option<Augmentation>,
address_size: u8,
code_alignment_factor: u64,
data_alignment_factor: i64,
return_address_register: Register,
initial_instructions: R,
}
Expand description
A Common Information Entry holds information that is shared among many Frame Description Entries. There is at least one CIE in every non-empty
.debug_frame
section.
Fields§
§offset: Offset
The offset of this entry from the start of its containing section.
length: Offset
A constant that gives the number of bytes of the CIE structure, not including the length field itself (see Section 7.2.2). The size of the length field plus the value of length must be an integral multiple of the address size.
format: Format
§version: u8
A version number (see Section 7.23). This number is specific to the call frame information and is independent of the DWARF version number.
augmentation: Option<Augmentation>
The parsed augmentation, if any.
address_size: u8
The size of a target address in this CIE and any FDEs that use it, in bytes. If a compilation unit exists for this frame, its address size must match the address size here.
code_alignment_factor: u64
“A constant that is factored out of all advance location instructions (see Section 6.4.2.1).”
data_alignment_factor: i64
A constant that is factored out of certain offset instructions (see below). The resulting value is (operand * data_alignment_factor).
return_address_register: Register
An unsigned LEB128 constant that indicates which column in the rule table represents the return address of the function. Note that this column might not correspond to an actual machine register.
initial_instructions: R
A sequence of rules that are interpreted to create the initial setting of each column in the table.
The default rule for all columns before interpretation of the initial instructions is the undefined rule. However, an ABI authoring body or a compilation system authoring body may specify an alternate default value for any or all columns.
This is followed by DW_CFA_nop
padding until the end of length
bytes
in the input.
Implementations§
source§impl<R: Reader> CommonInformationEntry<R>
impl<R: Reader> CommonInformationEntry<R>
fn parse<Section: UnwindSection<R>>( bases: &BaseAddresses, section: &Section, input: &mut R, ) -> Result<CommonInformationEntry<R>>
fn parse_rest<Section: UnwindSection<R>>( offset: R::Offset, length: R::Offset, format: Format, bases: &BaseAddresses, section: &Section, rest: R, ) -> Result<CommonInformationEntry<R>>
source§impl<R: Reader> CommonInformationEntry<R>
impl<R: Reader> CommonInformationEntry<R>
§Signal Safe Methods
These methods are guaranteed not to allocate, acquire locks, or perform any other signal-unsafe operations.
sourcepub fn offset(&self) -> R::Offset
pub fn offset(&self) -> R::Offset
Get the offset of this entry from the start of its containing section.
sourcepub fn address_size(&self) -> u8
pub fn address_size(&self) -> u8
The size of addresses (in bytes) in this CIE.
sourcepub fn instructions<'a, Section>(
&self,
section: &'a Section,
bases: &'a BaseAddresses,
) -> CallFrameInstructionIter<'a, R>where
Section: UnwindSection<R>,
pub fn instructions<'a, Section>(
&self,
section: &'a Section,
bases: &'a BaseAddresses,
) -> CallFrameInstructionIter<'a, R>where
Section: UnwindSection<R>,
Iterate over this CIE’s initial instructions.
Can be used with
FallibleIterator
.
sourcepub fn entry_len(&self) -> R::Offset
pub fn entry_len(&self) -> R::Offset
A constant that gives the number of bytes of the CIE structure, not including the length field itself (see Section 7.2.2). The size of the length field plus the value of length must be an integral multiple of the address size.
sourcepub fn version(&self) -> u8
pub fn version(&self) -> u8
A version number (see Section 7.23). This number is specific to the call frame information and is independent of the DWARF version number.
sourcepub fn augmentation(&self) -> Option<&Augmentation>
pub fn augmentation(&self) -> Option<&Augmentation>
Get the augmentation data, if any exists.
The only augmentation understood by gimli
is that which is defined by
.eh_frame
.
sourcepub fn lsda_encoding(&self) -> Option<DwEhPe>
pub fn lsda_encoding(&self) -> Option<DwEhPe>
Return the encoding of the LSDA address for this CIE’s FDEs.
sourcepub fn personality_with_encoding(&self) -> Option<(DwEhPe, Pointer)>
pub fn personality_with_encoding(&self) -> Option<(DwEhPe, Pointer)>
Return the encoding and address of the personality routine handler for this CIE’s FDEs.
sourcepub fn personality(&self) -> Option<Pointer>
pub fn personality(&self) -> Option<Pointer>
Return the address of the personality routine handler for this CIE’s FDEs.
sourcepub fn fde_address_encoding(&self) -> Option<DwEhPe>
pub fn fde_address_encoding(&self) -> Option<DwEhPe>
Return the encoding of the addresses for this CIE’s FDEs.
sourcepub fn is_signal_trampoline(&self) -> bool
pub fn is_signal_trampoline(&self) -> bool
True if this CIE’s FDEs are trampolines for signal handlers.
sourcepub fn code_alignment_factor(&self) -> u64
pub fn code_alignment_factor(&self) -> u64
A constant that is factored out of all advance location instructions (see Section 6.4.2.1).
sourcepub fn data_alignment_factor(&self) -> i64
pub fn data_alignment_factor(&self) -> i64
A constant that is factored out of certain offset instructions (see below). The resulting value is (operand * data_alignment_factor).
sourcepub fn return_address_register(&self) -> Register
pub fn return_address_register(&self) -> Register
An unsigned … constant that indicates which column in the rule table represents the return address of the function. Note that this column might not correspond to an actual machine register.
Trait Implementations§
source§impl<R, Offset> Clone for CommonInformationEntry<R, Offset>
impl<R, Offset> Clone for CommonInformationEntry<R, Offset>
source§fn clone(&self) -> CommonInformationEntry<R, Offset>
fn clone(&self) -> CommonInformationEntry<R, Offset>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<R, Offset> Debug for CommonInformationEntry<R, Offset>
impl<R, Offset> Debug for CommonInformationEntry<R, Offset>
source§impl<R, Offset> PartialEq for CommonInformationEntry<R, Offset>
impl<R, Offset> PartialEq for CommonInformationEntry<R, Offset>
source§fn eq(&self, other: &CommonInformationEntry<R, Offset>) -> bool
fn eq(&self, other: &CommonInformationEntry<R, Offset>) -> bool
self
and other
values to be equal, and is used by ==
.impl<R, Offset> Eq for CommonInformationEntry<R, Offset>
impl<R, Offset> StructuralPartialEq for CommonInformationEntry<R, Offset>where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations§
impl<R, Offset> Freeze for CommonInformationEntry<R, Offset>
impl<R, Offset> RefUnwindSafe for CommonInformationEntry<R, Offset>where
Offset: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, Offset> Send for CommonInformationEntry<R, Offset>
impl<R, Offset> Sync for CommonInformationEntry<R, Offset>
impl<R, Offset> Unpin for CommonInformationEntry<R, Offset>
impl<R, Offset> UnwindSafe for CommonInformationEntry<R, Offset>where
Offset: UnwindSafe,
R: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)