Struct framehop::ExplicitModuleSectionInfo
source · pub struct ExplicitModuleSectionInfo<D> {Show 14 fields
pub base_svma: u64,
pub text_svma: Option<Range<u64>>,
pub text: Option<D>,
pub stubs_svma: Option<Range<u64>>,
pub stub_helper_svma: Option<Range<u64>>,
pub got_svma: Option<Range<u64>>,
pub unwind_info: Option<D>,
pub eh_frame_svma: Option<Range<u64>>,
pub eh_frame: Option<D>,
pub eh_frame_hdr_svma: Option<Range<u64>>,
pub eh_frame_hdr: Option<D>,
pub debug_frame: Option<D>,
pub text_segment_svma: Option<Range<u64>>,
pub text_segment: Option<D>,
}
Expand description
Explicit addresses and data of various sections in the module. This implements
the ModuleSectionInfo
trait.
Unless otherwise stated, these are SVMAs, “stated virtual memory addresses”, i.e. addresses as stated in the object, as opposed to AVMAs, “actual virtual memory addresses”, i.e. addresses in the virtual memory of the profiled process.
Code addresses inside a module’s unwind information are usually written down as SVMAs, or as relative addresses. For example, DWARF CFI can have code addresses expressed as relative-to-.text addresses or as absolute SVMAs. And mach-O compact unwind info contains addresses relative to the image base address.
Fields§
§base_svma: u64
The image base address, as stated in the object. For mach-O objects, this is the
vmaddr of the __TEXT
segment. For ELF objects, this is zero.
This is used to convert between SVMAs and relative addresses.
text_svma: Option<Range<u64>>
The address range of the __text
or .text
section. This is where most of the compiled
code is stored.
This is used to detect whether we need to do instruction analysis for an address.
text: Option<D>
The data of the __text
or .text
section. This is where most of the compiled code is
stored. For mach-O binaries, this does not need to be supplied if text_segment
is supplied.
This is used to handle function prologues and epilogues in some cases.
stubs_svma: Option<Range<u64>>
The address range of the mach-O __stubs
section. Contains small pieces of
executable code for calling imported functions. Code inside this section is not
covered by the unwind information in __unwind_info
.
This is used to exclude addresses in this section from incorrectly applying
__unwind_info
opcodes. It is also used to infer unwind rules for the known
structure of stub functions.
stub_helper_svma: Option<Range<u64>>
The address range of the mach-O __stub_helper
section. Contains small pieces of
executable code for calling imported functions. Code inside this section is not
covered by the unwind information in __unwind_info
.
This is used to exclude addresses in this section from incorrectly applying
__unwind_info
opcodes. It is also used to infer unwind rules for the known
structure of stub helper
functions.
got_svma: Option<Range<u64>>
The address range of the .got
section (Global Offset Table). This is used
during DWARF CFI processing, to resolve got-relative addresses.
unwind_info: Option<D>
The data of the __unwind_info
section of mach-O binaries.
eh_frame_svma: Option<Range<u64>>
The address range of the __eh_frame
or .eh_frame
section. This is used during DWARF CFI
processing, to resolve eh_frame-relative addresses.
eh_frame: Option<D>
The data of the __eh_frame
or .eh_frame
section. This is used during DWARF CFI
processing, to resolve eh_frame-relative addresses.
eh_frame_hdr_svma: Option<Range<u64>>
The address range of the .eh_frame_hdr
section. This is used during DWARF CFI processing,
to resolve eh_frame_hdr-relative addresses.
eh_frame_hdr: Option<D>
The data of the .eh_frame_hdr
section. This is used during DWARF CFI processing, to
resolve eh_frame_hdr-relative addresses.
debug_frame: Option<D>
The data of the .debug_frame
section. The related address range is not needed.
text_segment_svma: Option<Range<u64>>
The address range of the __TEXT
segment of mach-O binaries, if available.
text_segment: Option<D>
The data of the __TEXT
segment of mach-O binaries, if available.
Trait Implementations§
source§impl<D: Clone> Clone for ExplicitModuleSectionInfo<D>
impl<D: Clone> Clone for ExplicitModuleSectionInfo<D>
source§fn clone(&self) -> ExplicitModuleSectionInfo<D>
fn clone(&self) -> ExplicitModuleSectionInfo<D>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<D: Debug> Debug for ExplicitModuleSectionInfo<D>
impl<D: Debug> Debug for ExplicitModuleSectionInfo<D>
source§impl<D: Default> Default for ExplicitModuleSectionInfo<D>
impl<D: Default> Default for ExplicitModuleSectionInfo<D>
source§fn default() -> ExplicitModuleSectionInfo<D>
fn default() -> ExplicitModuleSectionInfo<D>
source§impl<D> ModuleSectionInfo<D> for ExplicitModuleSectionInfo<D>
impl<D> ModuleSectionInfo<D> for ExplicitModuleSectionInfo<D>
source§fn section_svma_range(&mut self, name: &[u8]) -> Option<Range<u64>>
fn section_svma_range(&mut self, name: &[u8]) -> Option<Range<u64>>
source§fn section_data(&mut self, name: &[u8]) -> Option<D>
fn section_data(&mut self, name: &[u8]) -> Option<D>
source§fn segment_svma_range(&mut self, name: &[u8]) -> Option<Range<u64>>
fn segment_svma_range(&mut self, name: &[u8]) -> Option<Range<u64>>
source§fn segment_data(&mut self, name: &[u8]) -> Option<D>
fn segment_data(&mut self, name: &[u8]) -> Option<D>
source§impl<D: PartialEq> PartialEq for ExplicitModuleSectionInfo<D>
impl<D: PartialEq> PartialEq for ExplicitModuleSectionInfo<D>
source§fn eq(&self, other: &ExplicitModuleSectionInfo<D>) -> bool
fn eq(&self, other: &ExplicitModuleSectionInfo<D>) -> bool
self
and other
values to be equal, and is used
by ==
.