pub struct MachOBackend;Expand description
Parser backend for Mach-O executable and relocatable objects.
Implementations§
Source§impl MachOBackend
impl MachOBackend
Sourcepub fn parse_with_debug_companion(
&self,
bytes: &[u8],
debug_companion: Option<&[u8]>,
) -> Result<ArtifactIr, ArtifactError>
pub fn parse_with_debug_companion( &self, bytes: &[u8], debug_companion: Option<&[u8]>, ) -> Result<ArtifactIr, ArtifactError>
Parse a Mach-O artifact with an optional matching dSYM DWARF companion.
The companion must be a Mach-O debug image bearing exactly the same
LC_UUID. A dSYM’s inner Contents/Resources/DWARF/<name> file is the
debug image passed here; neither it nor the inspected artifact is run.
§Errors
Returns an error when either container is malformed or a supplied companion lacks the inspected image’s UUID.
Sourcepub fn parse_with_architecture(
&self,
bytes: &[u8],
debug_companion: Option<&[u8]>,
architecture: Option<&str>,
) -> Result<ArtifactIr, ArtifactError>
pub fn parse_with_architecture( &self, bytes: &[u8], debug_companion: Option<&[u8]>, architecture: Option<&str>, ) -> Result<ArtifactIr, ArtifactError>
Parse a Mach-O artifact while selecting one universal-binary architecture.
A multi-slice input requires architecture; selecting a slice by file
order would make equivalent comparison commands inspect different code.
§Errors
Returns an error when the requested architecture is absent, or when a universal input supplies more than one slice without a selection.
Trait Implementations§
Source§impl ArtifactBackend for MachOBackend
impl ArtifactBackend for MachOBackend
Source§fn format(&self) -> ArtifactFormat
fn format(&self) -> ArtifactFormat
Source§fn parse(&self, bytes: &[u8]) -> Result<ArtifactIr, ArtifactError>
fn parse(&self, bytes: &[u8]) -> Result<ArtifactIr, ArtifactError>
Source§fn capabilities(&self) -> ArtifactCapabilities
fn capabilities(&self) -> ArtifactCapabilities
Source§impl Clone for MachOBackend
impl Clone for MachOBackend
Source§fn clone(&self) -> MachOBackend
fn clone(&self) -> MachOBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more