pub struct ElfBackend;Expand description
Parser backend for ELF artifacts.
Implementations§
Source§impl ElfBackend
impl ElfBackend
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 an ELF artifact with an optional, already-read external debug ELF.
The companion is accepted only when both files declare the same GNU build ID. This prevents a path supplied for one build from attributing source locations to a different artifact. No companion means the normal debug-information-absent fallback; neither path opens files or executes inspected code.
§Errors
Returns an error when either input is not an ELF file, or when a supplied companion does not carry the same build ID as the inspected artifact.
Trait Implementations§
Source§impl ArtifactBackend for ElfBackend
impl ArtifactBackend for ElfBackend
Source§fn format(&self) -> ArtifactFormat
fn format(&self) -> ArtifactFormat
Format this backend accepts.
Source§fn parse(&self, bytes: &[u8]) -> Result<ArtifactIr, ArtifactError>
fn parse(&self, bytes: &[u8]) -> Result<ArtifactIr, ArtifactError>
Parse bytes without executing the artifact. Read more
Source§fn capabilities(&self) -> ArtifactCapabilities
fn capabilities(&self) -> ArtifactCapabilities
Facts this backend can potentially provide for a well-formed input.
Source§impl Clone for ElfBackend
impl Clone for ElfBackend
Source§fn clone(&self) -> ElfBackend
fn clone(&self) -> ElfBackend
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ElfBackend
Source§impl Debug for ElfBackend
impl Debug for ElfBackend
Source§impl Default for ElfBackend
impl Default for ElfBackend
Source§fn default() -> ElfBackend
fn default() -> ElfBackend
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ElfBackend
impl RefUnwindSafe for ElfBackend
impl Send for ElfBackend
impl Sync for ElfBackend
impl Unpin for ElfBackend
impl UnsafeUnpin for ElfBackend
impl UnwindSafe for ElfBackend
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