Skip to main content

ProcessImage

Struct ProcessImage 

Source
pub struct ProcessImage {
    pub role: ImageRole,
    pub path: PathBuf,
    pub real_path: PathBuf,
    pub install_name: String,
    pub status: ImageLoadStatus,
    pub image: Option<MachOImage>,
    pub plan: ImagePlan,
    pub memory: Option<GuestMemory>,
    pub requested_kind: DylibKind,
    pub exports: Vec<DefinedSymbol>,
    pub export_by_name: HashMap<String, u64>,
    pub file_bytes: Option<FileImage>,
}
Expand description

One image in the process set (mapped or skipped).

Fields§

§role: ImageRole

Main vs dylib.

§path: PathBuf

Host path attempted / opened.

§real_path: PathBuf

Canonical (or best-effort absolute) path, computed once at insert.

Used for duplicate detection and bottle alias matching (libc++ → libSystem) without re-running canonicalize / readlinkat on every bind site (roadmap A4).

§install_name: String

Install name from the load command (or LC_ID_DYLIB when mapped).

§status: ImageLoadStatus

Map outcome.

§image: Option<MachOImage>

Present when status is ImageLoadStatus::Mapped.

§plan: ImagePlan

Full plan when mapped; ImagePlan::empty when skipped.

§memory: Option<GuestMemory>

Guest mapping when mapped.

§requested_kind: DylibKind

How this edge was requested. Main uses DylibKind::Load as sentinel.

§exports: Vec<DefinedSymbol>

Defined external nlist symbols (PR2; empty in PR1).

§export_by_name: HashMap<String, u64>

Preferred-VA index of Self::exports for O(1) bind / chained resolve.

Built in fill_exports (same pass as the nlist scan). Includes the dyld_stub_binder → _dyld_stub_binder alias when present.

§file_bytes: Option<FileImage>

Full on-disk container from the first parse (mmap preferred).

Reused for (1) segment fill without a second disk pass and (2) bind / chained fixups (arm64 thin view). Any guest benefits — not tool-specific. Taken/dropped during bind after use.

Implementations§

Source§

impl ProcessImage

Source

pub fn slide(&self) -> u64

Slide applied to this image (0 if unmapped).

Source

pub fn preferred_base(&self) -> u64

Preferred base from the plan (0 if empty).

Source

pub fn region_infos(&self) -> Vec<MappedRegionInfo>

Region infos for dry-load (empty when skipped).

Trait Implementations§

Source§

impl Debug for ProcessImage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more